java.lang.Object
org.eclipse.persistence.core.queries.CoreAttributeGroup<AttributeItem,ClassDescriptor>
org.eclipse.persistence.queries.AttributeGroup
org.eclipse.persistence.queries.LoadGroup
- All Implemented Interfaces:
Serializable,Cloneable
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
- See Also:
-
Field Summary
FieldsFields inherited from class org.eclipse.persistence.core.queries.CoreAttributeGroup
allsubclasses, isValidated, items, name, subClasses, superClassGroup, type, typeName -
Constructor Summary
Constructors -
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.voidaddAttribute(String attributeNameOrPath, LoadGroup group) clone()Returns LoadGroup corresponding to the passed (possibly nested) attribute.INTERNAL: Return if the load group should load its relationships concurrently.booleanADVANCED: Return if the load group should load its relationships concurrently.booleanprotected LoadGroupnewGroup(String name, CoreAttributeGroup parent) Subclass may create different types.voidsetIsConcurrent(Boolean isConcurrent) ADVANCED: Set if the load group should load its relationships concurrently.Methods inherited from class org.eclipse.persistence.queries.AttributeGroup
addAttribute, findGroup, getItem, isCopyGroup, isSupersetOf, newItem, newItem, toCopyGroup, toCopyGroup, toFetchGroup, toFetchGroup, toLoadGroup, toLoadGroupMethods inherited from class org.eclipse.persistence.core.queries.CoreAttributeGroup
addAttribute, addAttribute, addAttributeKey, addAttributes, clone, containsAttribute, containsAttributeInternal, convert, convertClassNamesToClasses, equals, getAllItems, getAttributeNames, getItem, getItems, getName, getSubClassGroups, getType, getTypeName, hashCode, hasInheritance, hasItems, insertSubClass, isFetchGroup, isSupersetOf, isValidated, removeAttribute, setAllSubclasses, setAttributeNames, setName, toString, toStringAdditionalInfo, toStringItems, toStringPath
-
Field Details
-
isConcurrent
-
-
Constructor Details
-
LoadGroup
public LoadGroup() -
LoadGroup
-
-
Method Details
-
newGroup
Description copied from class:AttributeGroupSubclass may create different types.- Overrides:
newGroupin classAttributeGroup
-
isLoadGroup
public boolean isLoadGroup()- Overrides:
isLoadGroupin classAttributeGroup
-
clone
- Overrides:
clonein classAttributeGroup
-
getGroup
Returns LoadGroup corresponding to the passed (possibly nested) attribute.- Overrides:
getGroupin classAttributeGroup
-
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 classCoreAttributeGroup<AttributeItem,ClassDescriptor> - Parameters:
attributeNameOrPath- A simple attribute, array or attributes forming a pathgroup- - an AttributeGroup to be added.
-
addAttribute
-
getIsConcurrent
INTERNAL: Return if the load group should load its relationships concurrently. -
isConcurrent
public boolean isConcurrent()ADVANCED: Return if the load group should load its relationships concurrently. This will use the session's server platform's thread pool. Each of the query results objects relationships will be loaded on a different thread. This can improve performance by processing many queries at once. Concurrent load is only supported when a shared cache is used.- Overrides:
isConcurrentin classAttributeGroup
-
setIsConcurrent
ADVANCED: Set if the load group should load its relationships concurrently. This will use the session's server platform's thread pool. Each of the query results objects relationships will be loaded on a different thread. This can improve performance by processing many queries at once. Concurrent load is only supported when a shared cache is used.
-