public class LoadGroup extends AttributeGroup
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.
FetchGroup,
Serialized Form| Constructor and Description |
|---|
LoadGroup() |
LoadGroup(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(java.lang.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.
|
void |
addAttribute(java.lang.String attributeNameOrPath,
LoadGroup group) |
LoadGroup |
clone() |
LoadGroup |
getGroup(java.lang.String attributeNameOrPath)
Returns LoadGroup corresponding to the passed (possibly nested) attribute.
|
java.lang.Boolean |
getIsConcurrent()
INTERNAL:
Return if the load group should load its relationships concurrently.
|
boolean |
isConcurrent()
ADVANCED:
Return if the load group should load its relationships concurrently.
|
boolean |
isLoadGroup() |
void |
setIsConcurrent(java.lang.Boolean isConcurrent)
ADVANCED:
Set if the load group should load its relationships concurrently.
|
addAttribute, findGroup, getItem, isCopyGroup, isSupersetOf, toCopyGroup, toCopyGroup, toFetchGroup, toFetchGroup, toLoadGroup, toLoadGroupaddAttribute, addAttribute, addAttributeKey, addAttributes, clone, containsAttribute, containsAttributeInternal, convertClassNamesToClasses, equals, getAllItems, getAttributeNames, getItems, getName, getSubClassGroups, getType, getTypeName, hashCode, hasInheritance, hasItems, insertSubClass, isFetchGroup, isSupersetOf, isValidated, removeAttribute, setAllSubclasses, setAttributeNames, setName, toStringpublic boolean isLoadGroup()
isLoadGroup in class AttributeGrouppublic LoadGroup clone()
clone in class AttributeGrouppublic LoadGroup getGroup(java.lang.String attributeNameOrPath)
getGroup in class AttributeGrouppublic void addAttribute(java.lang.String attributeNameOrPath,
CoreAttributeGroup group)
CoreAttributeGroup
Example:
group.addAttribute("firstName", group1);
Note that existing group corresponding to attributeNameOrPath
will be overridden with the passed group.
group.addAttribute("manager.address", group2);
addAttribute in class CoreAttributeGroup<org.eclipse.persistence.internal.queries.AttributeItem,ClassDescriptor>attributeNameOrPath - A simple attribute, array or attributes forming a pathgroup - - an AttributeGroup to be added.public void addAttribute(java.lang.String attributeNameOrPath,
LoadGroup group)
public java.lang.Boolean getIsConcurrent()
public boolean isConcurrent()
isConcurrent in class AttributeGrouppublic void setIsConcurrent(java.lang.Boolean isConcurrent)