Top Description Fields Constructors Methods
org.eclipse.persistence.internal.queries

public Class EntityFetchGroup

extends FetchGroup
Class Inheritance
Imports
java.util.Collection, .Iterator, org.eclipse.persistence.core.queries.CoreAttributeGroup, org.eclipse.persistence.internal.localization.ExceptionLocalization, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.queries.AttributeGroup, .FetchGroup, .FetchGroupTracker

EntityFetchGroup reflects the state of the object. Because EntityFetchGroup doesn't attempt to track the state of related objects it is flat (non-nested).
Author
dclarke, ailitchev
Since
EclipseLink 2.1

Field Summary

Inherited from org.eclipse.persistence.queries.FetchGroup:
entityFetchGrouprootEntity

Constructor Summary

AccessConstructor and Description
protected
public
public
EntityFetchGroup(String attributeName)

public
public
EntityFetchGroup(String[] attributeNames)

public
EntityFetchGroup(FetchGroup fetchGroup, String attributeName)

Method Summary

Modifier and TypeMethod and Description
public void
addAttribute(String
A simple attribute, array or attributes forming a path
attributeNameOrPath
,
CoreAttributeGroup<ATTRIBUTE_ITEM extends CoreAttributeItem, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>>
- an AttributeGroup to be added.
group
)

Overrides org.eclipse.persistence.queries.FetchGroup.addAttribute.

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.
public boolean
public boolean
isSupersetOf(CoreAttributeGroup<ATTRIBUTE_ITEM extends CoreAttributeItem, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>> anotherGroup)

Overrides org.eclipse.persistence.core.queries.CoreAttributeGroup.isSupersetOf.

Return true if this EntityFetchGroup is a super-set of the passed in EntityFetchGroup.
public String
onUnfetchedAttribute(FetchGroupTracker entity, String attributeName)

Overrides org.eclipse.persistence.queries.FetchGroup.onUnfetchedAttribute.

Called on attempt to get value of an attribute that hasn't been fetched yet.
public String
onUnfetchedAttributeForSet(FetchGroupTracker entity, String attributeName)

Overrides org.eclipse.persistence.queries.FetchGroup.onUnfetchedAttributeForSet.

Called on attempt to assign value to an attribute that hasn't been fetched yet.
public void
removeAttribute(String attributeNameOrPath)

Overrides org.eclipse.persistence.core.queries.CoreAttributeGroup.removeAttribute.

Remove an attribute from the group.
public void
setOnEntity(Object entity, AbstractSession session)

Set this EntityFetchGroup on an entity implementing FetchGroupTracker.

Inherited from org.eclipse.persistence.queries.FetchGroup:
addAttributeaddAttributeKeyclonegetEntityFetchGroupgetGroupgetRootEntityisFetchGroupnewGroupsetRootEntitysetShouldLoadsetShouldLoadAllsetSubclassShouldLoadshouldLoadtoLoadGrouptoLoadGroupLoadOnly

Constructor Detail

EntityFetchGroupback to summary
protected EntityFetchGroup()
EntityFetchGroupback to summary
public EntityFetchGroup(FetchGroup fetchGroup)
EntityFetchGroupback to summary
public EntityFetchGroup(String attributeName)
EntityFetchGroupback to summary
public EntityFetchGroup(Collection<String> attributeNames)
EntityFetchGroupback to summary
public EntityFetchGroup(String[] attributeNames)
EntityFetchGroupback to summary
public EntityFetchGroup(FetchGroup fetchGroup, String attributeName)

Method Detail

addAttributeback to summary
public void addAttribute(String attributeNameOrPath, CoreAttributeGroup<ATTRIBUTE_ITEM extends CoreAttributeItem, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>> group)

Overrides org.eclipse.persistence.queries.FetchGroup.addAttribute.

Doc from org.eclipse.persistence.core.queries.CoreAttributeGroup.addAttribute.

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.

Example: group.addAttribute("firstName", group1);
group.addAttribute("manager.address", group2);
Note that existing group corresponding to attributeNameOrPath will be overridden with the passed group.

Parameters
attributeNameOrPath:String

A simple attribute, array or attributes forming a path

group:CoreAttributeGroup<ATTRIBUTE_ITEM extends CoreAttributeItem, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>>

- an AttributeGroup to be added.

Annotations
@Override
isEntityFetchGroupback to summary
public boolean isEntityFetchGroup()

Overrides org.eclipse.persistence.queries.FetchGroup.isEntityFetchGroup.

Annotations
@Override
isSupersetOfback to summary
public boolean isSupersetOf(CoreAttributeGroup<ATTRIBUTE_ITEM extends CoreAttributeItem, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>> anotherGroup)

Overrides org.eclipse.persistence.core.queries.CoreAttributeGroup.isSupersetOf.

Return true if this EntityFetchGroup is a super-set of the passed in EntityFetchGroup.

Annotations
@Override
onUnfetchedAttributeback to summary
public String onUnfetchedAttribute(FetchGroupTracker entity, String attributeName)

Overrides org.eclipse.persistence.queries.FetchGroup.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.

Annotations
@Override
onUnfetchedAttributeForSetback to summary
public String onUnfetchedAttributeForSet(FetchGroupTracker entity, String attributeName)

Overrides org.eclipse.persistence.queries.FetchGroup.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.

Annotations
@Override
removeAttributeback to summary
public void removeAttribute(String attributeNameOrPath)

Overrides org.eclipse.persistence.core.queries.CoreAttributeGroup.removeAttribute.

Doc from org.eclipse.persistence.core.queries.CoreAttributeGroup.removeAttribute.

Remove an attribute from the group.

Annotations
@Override
setOnEntityback to summary
public void setOnEntity(Object entity, AbstractSession session)

Set this EntityFetchGroup on an entity implementing FetchGroupTracker.