Module org.eclipse.persistence.core
Class EntityFetchGroup
java.lang.Object
org.eclipse.persistence.core.queries.CoreAttributeGroup<AttributeItem,ClassDescriptor>
org.eclipse.persistence.queries.AttributeGroup
org.eclipse.persistence.queries.FetchGroup
org.eclipse.persistence.internal.queries.EntityFetchGroup
- All Implemented Interfaces:
Serializable,Cloneable
EntityFetchGroup reflects the state of the object.
Because EntityFetchGroup doesn't attempt to track
the state of related objects it is flat (non-nested).
- Since:
- EclipseLink 2.1
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.queries.FetchGroup
entityFetchGroup, rootEntityFields inherited from class org.eclipse.persistence.core.queries.CoreAttributeGroup
allsubclasses, isValidated, items, name, subClasses, superClassGroup, type, typeName -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEntityFetchGroup(String attributeName) EntityFetchGroup(String[] attributeNames) EntityFetchGroup(Collection<String> attributeNames) EntityFetchGroup(FetchGroup fetchGroup) EntityFetchGroup(FetchGroup fetchGroup, String attributeName) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String attributeNameOrPath, CoreAttributeGroup group) Add a basic attribute or nested attribute with each String representing an attribute on the path to what needs to be included in the AttributeGroup.booleanbooleanisSupersetOf(CoreAttributeGroup anotherGroup) Return true if this EntityFetchGroup is a super-set of the passed in EntityFetchGroup.onUnfetchedAttribute(FetchGroupTracker entity, String attributeName) Called on attempt to get value of an attribute that hasn't been fetched yet.onUnfetchedAttributeForSet(FetchGroupTracker entity, String attributeName) Called on attempt to assign value to an attribute that hasn't been fetched yet.voidremoveAttribute(String attributeNameOrPath) Remove an attribute from the group.voidsetOnEntity(Object entity, AbstractSession session) Set this EntityFetchGroup on an entity implementingFetchGroupTracker.Methods inherited from class org.eclipse.persistence.queries.FetchGroup
addAttribute, addAttributeKey, clone, getEntityFetchGroup, getGroup, getRootEntity, isFetchGroup, newGroup, setRootEntity, setShouldLoad, setShouldLoadAll, setSubclassShouldLoad, shouldLoad, toLoadGroup, toLoadGroupLoadOnlyMethods inherited from class org.eclipse.persistence.queries.AttributeGroup
addAttribute, findGroup, getItem, isConcurrent, isCopyGroup, isLoadGroup, isSupersetOf, newItem, newItem, toCopyGroup, toCopyGroup, toFetchGroup, toFetchGroup, toLoadGroupMethods inherited from class org.eclipse.persistence.core.queries.CoreAttributeGroup
addAttribute, addAttributes, clone, containsAttribute, containsAttributeInternal, convert, convertClassNamesToClasses, equals, getAllItems, getAttributeNames, getItem, getItems, getName, getSubClassGroups, getType, getTypeName, hashCode, hasInheritance, hasItems, insertSubClass, isValidated, setAllSubclasses, setAttributeNames, setName, toString, toStringAdditionalInfo, toStringItems, toStringPath
-
Constructor Details
-
EntityFetchGroup
protected EntityFetchGroup() -
EntityFetchGroup
-
EntityFetchGroup
-
EntityFetchGroup
-
EntityFetchGroup
-
EntityFetchGroup
-
-
Method Details
-
addAttribute
Description copied from class:CoreAttributeGroupAdd a basic attribute or nested attribute with each String representing an attribute on the path to what needs to be included in the AttributeGroup.Example:
group.addAttribute("firstName", group1);Note that existing group corresponding to attributeNameOrPath will be overridden with the passed group.
group.addAttribute("manager.address", group2);- Overrides:
addAttributein classFetchGroup- Parameters:
attributeNameOrPath- A simple attribute, array or attributes forming a pathgroup- - an AttributeGroup to be added.
-
onUnfetchedAttribute
Called on attempt to get value of an attribute that hasn't been fetched yet. Returns an error message in case exception should be thrown by the calling method, null otherwise.- Overrides:
onUnfetchedAttributein classFetchGroup
-
onUnfetchedAttributeForSet
Called on attempt to assign value to an attribute that hasn't been fetched yet. Returns an error message in case exception should be thrown by the calling method, null otherwise.- Overrides:
onUnfetchedAttributeForSetin classFetchGroup
-
removeAttribute
Description copied from class:CoreAttributeGroupRemove an attribute from the group.- Overrides:
removeAttributein classCoreAttributeGroup<AttributeItem,ClassDescriptor>
-
setOnEntity
Set this EntityFetchGroup on an entity implementingFetchGroupTracker. -
isEntityFetchGroup
public boolean isEntityFetchGroup()- Overrides:
isEntityFetchGroupin classFetchGroup
-
isSupersetOf
Return true if this EntityFetchGroup is a super-set of the passed in EntityFetchGroup.- Overrides:
isSupersetOfin classCoreAttributeGroup<AttributeItem,ClassDescriptor>
-