Build the multiple queries for one relationship because of limitation of IN(...)
@param owners Collection containing all objects of the ONE side
@param children Collection where related objects found in the cache should be added.
164278
protected Query[] buildPrefetchQueries(Collection owners, Collection children)
    {
        ClassDescriptor cld = getOwnerClassDescriptor();
        ObjectReferenceDescriptor ord = getObjectReferenceDescriptor();
        Collection queries = new ArrayList(owners.size());
        Collection idsSubset = new HashSet(owners.size());
        Iterator iter = owners.iterator();
        Class topLevelClass = getBroker().getTopLevelClass(ord.getItemClass());
        Object[] fkValues;
        Object owner;
        Identity id;
        PersistenceBroker pb = getBroker();
        ObjectCache cache = pb.serviceObjectCache();

        while (iter.hasNext())
        {
            owner = iter.next();
            fkValues = ord.getForeignKeyValues(owner,cld);
            if (isNull(fkValues))
            {
                continue;
            }
            id = pb.serviceIdentity().buildIdentity(null, topLevelClass, fkValues);
            if (cache.lookup(id) != null)
            {
                children.add(pb.getObjectByIdentity(id));
                continue;
            }
            idsSubset.add(id);
            if (idsSubset.size() == pkLimit)
            {
                queries.add(buildPrefetchQuery(idsSubset));
                idsSubset.clear();
            }
        }

        if (idsSubset.size() > 0)
        {
            queries.add(buildPrefetchQuery(idsSubset));
        }

        return (Query[]) queries.toArray(new Query[queries.size()]);
    }
638121
public void setChildren(List<CmsGalleryTreeEntry> children) {

        m_children = children;
        for (CmsGalleryTreeEntry child : m_children) {
            child.setParent(this);
        }
    }
105740
public void setUsers(java.util.Collection<User> users) {
        if (users == null) {
            this.users = null;
            return;
        }

        this.users = new com.amazonaws.internal.SdkInternalList<User>(users);
    }
130655
public void addChildren(int index, List<? extends N> children) {
    List<N> origChildren = Lists.newArrayList(this.children);
    int origNumChildren = this.children.size();
    // Temporarily remove the original children from index onward (in reverse order).
    for (int i = origNumChildren - 1; i >= index; i--) {
      removeChild(i);
    }
    // Add the new children.
    addChildren(children);
    // Add back the original children that we temporarily removed (in correct order).
    addChildren(origChildren.subList(index, origNumChildren));
  }
1064664
private void addChildren(CmsTreeItem parent, List<CmsCategoryTreeEntry> children, List<String> selectedCategories) {

        if (children != null) {
            for (CmsCategoryTreeEntry child : children) {
                // set the category tree item and add to parent tree item
                CmsTreeItem treeItem = buildTreeItem(child, selectedCategories);
                if ((selectedCategories != null) && selectedCategories.contains(child.getPath())) {
                    parent.setOpen(true);
                    openParents(parent);
                }
                parent.addChild(treeItem);
                addChildren(treeItem, child.getChildren(), selectedCategories);
            }
        }
    }
462522
public void setUsers(final List<User> users)
    {
        synchronized(this.getUsers())
        {
            if(users != this.getUsers())
            {
                this.getUsers().clear();
                
                if(users != null)
                {
                    this.getUsers().addAll(users);
                }
            }
        }
    }
1285099
public void setSubEntries(List<CmsClientSitemapEntry> children, I_CmsSitemapController controller) {

        m_childrenLoadedInitially = true;

        m_subEntries.clear();
        if (children != null) {
            m_subEntries.addAll(children);
            for (CmsClientSitemapEntry child : children) {
                child.updateSitePath(CmsStringUtil.joinPaths(m_sitePath, child.getName()), controller);
            }
        }
    }
225212
public final void addSubEntries(final Collection<NavigationEntryInterface> psubEntries) {
    if (!CollectionUtils.isEmpty(psubEntries)) {
      subEntries.addAll(psubEntries);
      subEntries.forEach(subEntry -> subEntry.setParentEntry(this));
    }
  }
143423
public void setQueries(java.util.Collection<QueryInfo> queries) {
        if (queries == null) {
            this.queries = null;
            return;
        }

        this.queries = new com.amazonaws.internal.SdkInternalList<QueryInfo>(queries);
    }
258074
public void addChild(LockedObject newChild) {
        if (_children == null) {
            _children = new LockedObject[0];
        }
        int size = _children.length;
        LockedObject[] newChildren = new LockedObject[size + 1];
        System.arraycopy(_children, 0, newChildren, 0, size);
        newChildren[size] = newChild;
        _children = newChildren;
    }
200395
public void setChildren(com.google.api.ads.admanager.axis.v201811.CustomCriteriaNode[] children) {
        this.children = children;
    }
496745
def add_children(self, children):
        
        if not isinstance(children, list):
            raise TypeError('"children" must be a list')
        for child in children:
            self.add_child(child)
35236
private boolean add(ClusteringFeature[] children, ClusteringFeature child) {
    for(int i = 0; i < children.length; i++) {
      if(children[i] == null) {
        children[i] = child;
        return true;
      }
    }
    return false;
  }
594414
public function addChildren($child) : void
    {
        Assert::isInstanceOfAny($child, [EntityDescriptor::class, EntitiesDescriptor::class]);
        $this->children[] = $child;
    }
302691
public void addChild(CmsGalleryTreeEntry child) {

        if (m_children == null) {
            m_children = new ArrayList<CmsGalleryTreeEntry>();
        }
        m_children.add(child);
        child.setParent(this);
    }
1305677
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null) if (m_recordToSync != null)
        {
            if (!m_recordToSync.getBaseRecord().getTableNames(false).equals(this.getOwner().getBaseRecord().getTableNames(false)))
            {   // Must be the same base tables!
                m_recordToSync = null;
                return;
            }
            m_recordToSync.addListener(new FileRemoveBOnCloseHandler(this));
        }
    }
143367
public void addChildren( Iterable<AstNode> otherChildren ) {
        assert otherChildren != null;
        for (AstNode planNode : otherChildren) {
            this.addLastChild(planNode);
        }
    }