org.eclipse.persistence.queries
Class LoadGroup
java.lang.Object
org.eclipse.persistence.queries.AttributeGroup
org.eclipse.persistence.queries.LoadGroup
- All Implemented Interfaces:
- Serializable, Cloneable
public class LoadGroup
- extends AttributeGroup
Purpose: Used to load specified relationship attributes and nested
relationship attributes.
A LoadGroup can be configured for use on a query using
ObjectLevelReadQuery.setLoadGroup(LoadGroup)
or in the case of JPA
users with LOAD_GROUP query hint. Alternatively a FetchGroup
could be
used with FetchGroup.shouldLoad()
set to true and the FetchGroup
configured on a query be executed.
- Since:
- Eclipselink 2.1
- Author:
- ailitchev
- See Also:
FetchGroup
,
Serialized Form
Methods inherited from class org.eclipse.persistence.queries.AttributeGroup |
addAttribute, addAttributes, containsAttribute, equals, getAttributeNames, getItem, getItems, getName, hasItems, isCopyGroup, isFetchGroup, isSupersetOf, removeAttribute, setAttributeNames, setName, toCopyGroup, toFetchGroup, toLoadGroup, toString |
LoadGroup
public LoadGroup()
LoadGroup
public LoadGroup(String name)
isLoadGroup
public boolean isLoadGroup()
- Overrides:
isLoadGroup
in class AttributeGroup
clone
public LoadGroup clone()
- Overrides:
clone
in class AttributeGroup
getGroup
public LoadGroup getGroup(String attributeNameOrPath)
- Returns LoadGroup corresponding to the passed (possibly nested) attribute.
- Overrides:
getGroup
in class AttributeGroup
addAttribute
public void addAttribute(String attributeNameOrPath,
AttributeGroup group)
- Description copied from class:
AttributeGroup
- 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.
- Overrides:
addAttribute
in class AttributeGroup
group
- - an AttributeGroup to be added.
addAttribute
public void addAttribute(String attributeNameOrPath,
LoadGroup group)