@Override public Set<String> getAttributeNames() { return wrappedFetchGroup.getAttributeNames(); }
/** * Return the attribute names on the current FetchGroup. This does not * include the attributes on nested FetchGroups * * @deprecated Use {@link AttributeGroup#getAttributeNames()} */ @Deprecated public Set<String> getAttributes() { return getAttributeNames(); }
/** * Return the attribute names on the current FetchGroup. This does not * include the attributes on nested FetchGroups * * @deprecated Use {@link AttributeGroup#getAttributeNames()} */ @Deprecated public Set<String> getAttributes() { return getAttributeNames(); }
/** * INTERNAL: * Used to retrieve the EntityFetchGroup for this FetchGroup * @return the entityFetchGroup */ public EntityFetchGroup getEntityFetchGroup(FetchGroupManager fetchGroupManager) { if (this.entityFetchGroup == null){ this.entityFetchGroup = fetchGroupManager.getEntityFetchGroup(this.getAttributeNames()); } return entityFetchGroup; }
/** * INTERNAL: * Used to retrieve the EntityFetchGroup for this FetchGroup * @return the entityFetchGroup */ public EntityFetchGroup getEntityFetchGroup(FetchGroupManager fetchGroupManager) { if (this.entityFetchGroup == null){ this.entityFetchGroup = fetchGroupManager.getEntityFetchGroup(this.getAttributeNames()); } return entityFetchGroup; }
private static void traverseFetchGroupAttributes(Set<String> set, FetchGroup fetchGroup, String prefix) { for (String attribute : fetchGroup.getAttributeNames()) { FetchGroup group = fetchGroup.getGroup(attribute); if (group != null) { traverseFetchGroupAttributes(set, group, prefix + attribute + "."); } else { set.add(prefix + attribute); } } } }
/** * INTERNAL: * Add primary key and version attributes to the passed fetch group. */ public void addMinimalFetchGroup(FetchGroup fetchGroup) { if (this.minimalFetchGroup == null) { return; } Iterator<String> it = this.minimalFetchGroup.getAttributeNames().iterator(); while(it.hasNext()) { String name = it.next(); if(!fetchGroup.containsAttribute(name)) { fetchGroup.addAttribute(name); } } }
/** * INTERNAL: * Union two fetch groups. */ public FetchGroup unionFetchGroups(FetchGroup first, FetchGroup second) { if ((first == null) || (second == null)) { return null; } //return the superset if applied if (first == second || first.isSupersetOf(second)) { return first; } else if (second.isSupersetOf(first)) { return second; } Set<String> unionAttributeNames = new HashSet(); unionAttributeNames.addAll(first.getAttributeNames()); unionAttributeNames.addAll(second.getAttributeNames()); return getEntityFetchGroup(unionAttributeNames); }
/** * INTERNAL: * Add primary key and version attributes to the passed fetch group. */ public void addMinimalFetchGroup(FetchGroup fetchGroup) { if (this.minimalFetchGroup == null) { return; } Iterator<String> it = this.minimalFetchGroup.getAttributeNames().iterator(); while(it.hasNext()) { String name = it.next(); if(!fetchGroup.containsAttribute(name)) { fetchGroup.addAttribute(name); } } }
/** * INTERNAL: * Union two fetch groups. */ public FetchGroup unionFetchGroups(FetchGroup first, FetchGroup second) { if ((first == null) || (second == null)) { return null; } //return the superset if applied if (first == second || first.isSupersetOf(second)) { return first; } else if (second.isSupersetOf(first)) { return second; } Set<String> unionAttributeNames = new HashSet(); unionAttributeNames.addAll(first.getAttributeNames()); unionAttributeNames.addAll(second.getAttributeNames()); return getEntityFetchGroup(unionAttributeNames); }
/** * INTERNAL: * Union two fetch groups as EntityFetchGroups. * Ignores all nested attributes. */ public EntityFetchGroup flatUnionFetchGroups(FetchGroup first, FetchGroup second, boolean shouldClone) { if ((first == null) || (second == null)) { return null; } //return the superset if applied if (first == second) { return getEntityFetchGroup(first); } Set<String> unionAttributeNames = new HashSet(); unionAttributeNames.addAll(first.getAttributeNames()); unionAttributeNames.addAll(second.getAttributeNames()); EntityFetchGroup newGroup = getEntityFetchGroup(unionAttributeNames); if (shouldClone){ newGroup = (EntityFetchGroup) newGroup.clone(); newGroup.setRootEntity(second.getRootEntity()); } return newGroup; }
/** * INTERNAL: * Union two fetch groups as EntityFetchGroups. * Ignores all nested attributes. */ public EntityFetchGroup flatUnionFetchGroups(FetchGroup first, FetchGroup second, boolean shouldClone) { if ((first == null) || (second == null)) { return null; } //return the superset if applied if (first == second) { return getEntityFetchGroup(first); } Set<String> unionAttributeNames = new HashSet(); unionAttributeNames.addAll(first.getAttributeNames()); unionAttributeNames.addAll(second.getAttributeNames()); EntityFetchGroup newGroup = getEntityFetchGroup(unionAttributeNames); if (shouldClone){ newGroup = (EntityFetchGroup) newGroup.clone(); newGroup.setRootEntity(second.getRootEntity()); } return newGroup; }
protected void addFetchGroupLines(NonreflectiveMethodDefinition method, FetchGroup fetchGroup, String fetchGroupIdentifier) { method.addLine("FetchGroup " + fetchGroupIdentifier + " = new FetchGroup();"); if (!fetchGroup.getName().equals("")) { method.addLine(fetchGroupIdentifier + ".setName(\"" + fetchGroup.getName() + "\");"); } for (String attribute: fetchGroup.getAttributeNames()) { method.addLine(fetchGroupIdentifier + ".addAttribute(\"" + attribute + "\");"); } }
protected void addFetchGroupLines(NonreflectiveMethodDefinition method, FetchGroup fetchGroup, String fetchGroupIdentifier) { method.addLine("FetchGroup " + fetchGroupIdentifier + " = new FetchGroup();"); if (!fetchGroup.getName().equals("")) { method.addLine(fetchGroupIdentifier + ".setName(\"" + fetchGroup.getName() + "\");"); } for (String attribute: fetchGroup.getAttributeNames()) { method.addLine(fetchGroupIdentifier + ".addAttribute(\"" + attribute + "\");"); } }
FetchGroup fetchGroup = getBaseQuery().getExecutionFetchGroup(); if(fetchGroup != null) { fetchGroupAttributes = fetchGroup.getAttributeNames();
FetchGroup fetchGroup = getBaseQuery().getExecutionFetchGroup(); if(fetchGroup != null) { fetchGroupAttributes = fetchGroup.getAttributeNames();
Set fetchedAttributesClone = fetchGroupInClone.getAttributeNames(); fetchedAttributesCached = fetchGroupInObject.getAttributeNames();
Set fetchedAttributesClone = fetchGroupInClone.getAttributeNames(); fetchedAttributesCached = fetchGroupInObject.getAttributeNames();
Vector mappings = descriptor.getMappings(); boolean isObjectPartial = (fetchGroupInObject != null); Set fetchedAttributes = isObjectPartial ? fetchGroupInObject.getAttributeNames() : null; int size = mappings.size(); for (int index = 0; index < size; index++) {
Vector mappings = descriptor.getMappings(); boolean isObjectPartial = (fetchGroupInObject != null); Set fetchedAttributes = isObjectPartial ? fetchGroupInObject.getAttributeNames() : null; int size = mappings.size(); for (int index = 0; index < size; index++) {