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
| Modifier and Type | Field and Description |
|---|---|
| protected Boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method 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. |
| public void | |
| public LoadGroup | clone()
Overrides org. |
| public LoadGroup | getGroup(String attributeNameOrPath)
Overrides org. |
| public Boolean | |
| public boolean | isConcurrent()
Overrides org. |
| public boolean | |
| protected LoadGroup | newGroup(String name, 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>> parent)
Overrides org. |
| public void | setIsConcurrent(Boolean isConcurrent)
ADVANCED: Set if the load group should load its relationships concurrently. |
| isConcurrent | back to summary |
|---|---|
| protected Boolean isConcurrent | |
| LoadGroup | back to summary |
|---|---|
| public LoadGroup() | |
| LoadGroup | back to summary |
|---|---|
| public LoadGroup(String name) | |
| addAttribute | back 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. Doc from org. 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:
| |
| addAttribute | back to summary |
|---|---|
| public void addAttribute(String attributeNameOrPath, LoadGroup group) | |
| clone | back to summary |
|---|---|
| public LoadGroup clone() Overrides org. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by | |
| getGroup | back to summary |
|---|---|
| public LoadGroup getGroup(String attributeNameOrPath) Overrides org. Returns LoadGroup corresponding to the passed (possibly nested) attribute.
| |
| getIsConcurrent | back to summary |
|---|---|
| public Boolean getIsConcurrent() INTERNAL: Return if the load group should load its relationships concurrently. | |
| isConcurrent | back to summary |
|---|---|
| public boolean isConcurrent() Overrides org. 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.
| |
| isLoadGroup | back to summary |
|---|---|
| public boolean isLoadGroup() Overrides org.
| |
| newGroup | back to summary |
|---|---|
| protected LoadGroup newGroup(String name, 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>> parent) Overrides org. Doc from org. Subclass may create different types.
| |
| setIsConcurrent | back to summary |
|---|---|
| public void setIsConcurrent(Boolean isConcurrent) 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. | |