public void fetch(QueryTranslatorImpl q, String entityName) throws QueryException {
   if (isCollectionValued()) {
     q.setCollectionToFetch(
         getCollectionRole(), getCollectionName(), getCollectionOwnerName(), entityName);
   } else {
     q.addEntityToFetch(entityName, getOneToOneOwnerName(), getOwnerAssociationType());
   }
 }
Ejemplo n.º 2
0
 void setCollectionToFetch(String role, String name, String ownerName, String entityName)
     throws QueryException {
   fetchName = name;
   collectionPersister = getCollectionPersister(role);
   collectionOwnerName = ownerName;
   if (collectionPersister.getElementType().isEntityType()) {
     addEntityToFetch(entityName);
   }
 }
Ejemplo n.º 3
0
 void addEntityToFetch(
     String name, String oneToOneOwnerName, AssociationType ownerAssociationType) {
   addEntityToFetch(name);
   if (oneToOneOwnerName != null) oneToOneOwnerNames.put(name, oneToOneOwnerName);
   if (ownerAssociationType != null) uniqueKeyOwnerReferences.put(name, ownerAssociationType);
 }