mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Overload withSectionOfChildren that takes Collection instead of varargs
This commit is contained in:
@ -23,6 +23,8 @@ package com.kingsrook.qqq.backend.core.model.metadata.layout;
|
|||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.kingsrook.qqq.backend.core.model.metadata.QInstance;
|
import com.kingsrook.qqq.backend.core.model.metadata.QInstance;
|
||||||
import com.kingsrook.qqq.backend.core.model.metadata.TopLevelMetaDataInterface;
|
import com.kingsrook.qqq.backend.core.model.metadata.TopLevelMetaDataInterface;
|
||||||
@ -357,11 +359,11 @@ public class QAppMetaData implements QAppChildMetaData, MetaDataWithPermissionRu
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
public QAppMetaData withSectionOfChildren(QAppSection section, QAppChildMetaData... children)
|
public QAppMetaData withSectionOfChildren(QAppSection section, Collection<? extends QAppChildMetaData> children)
|
||||||
{
|
{
|
||||||
this.addSection(section);
|
this.addSection(section);
|
||||||
|
|
||||||
for(QAppChildMetaData child : children)
|
for(QAppChildMetaData child : CollectionUtils.nonNullCollection(children))
|
||||||
{
|
{
|
||||||
withChild(child);
|
withChild(child);
|
||||||
if(child instanceof QTableMetaData)
|
if(child instanceof QTableMetaData)
|
||||||
@ -386,6 +388,15 @@ public class QAppMetaData implements QAppChildMetaData, MetaDataWithPermissionRu
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public QAppMetaData withSectionOfChildren(QAppSection section, QAppChildMetaData... children)
|
||||||
|
{
|
||||||
|
return (withSectionOfChildren(section, children == null ? null : Arrays.stream(children).toList()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
** Getter for permissionRules
|
** Getter for permissionRules
|
||||||
|
Reference in New Issue
Block a user