docs: 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()]);
      }