*/
protected Query[] buildPrefetchQueries(Collection owners, Collection children)
{
ClassDescriptor cld = getOwnerClassDescriptor();
Class topLevelClass = getBroker().getTopLevelClass(cld.getClassOfObject());
BrokerHelper helper = getBroker().serviceBrokerHelper();
Collection queries = new ArrayList(owners.size());
Collection idsSubset = new HashSet(owners.size());
Object[] fkValues;
Object owner;
Identity id;
Iterator iter = owners.iterator();
while (iter.hasNext())
{
owner = iter.next();
fkValues = helper.extractValueArray(helper.getKeyValues(cld, owner));
id = getBroker().serviceIdentity().buildIdentity(null, topLevelClass, fkValues);
idsSubset.add(id);
if (idsSubset.size() == pkLimit)
{
queries.add(buildPrefetchQuery(idsSubset));