public class AttributeGroup extends CoreAttributeGroup<org.eclipse.persistence.internal.queries.AttributeItem> implements java.io.Serializable, java.lang.Cloneable
FetchGroup
.
LoadGroup
CopyGroup
To reference nested attributes a dot ('.') notation is used to reference related attributes. All attribute names provided are assumed to be correct until processed against the mappings during usage of the group.
FetchGroup
,
LoadGroup
,
CopyGroup
,
Serialized Formallsubclasses, isValidated, items, name, subClasses, superClassGroup, type, typeName
Constructor and Description |
---|
AttributeGroup() |
AttributeGroup(java.lang.String name) |
AttributeGroup(java.lang.String name,
java.lang.Class type,
boolean isValidated)
INTERNAL:
This constructer is to only be used by EclipseLink internally
|
AttributeGroup(java.lang.String name,
java.lang.String type,
boolean isValidated) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String attributeNameOrPath,
AttributeGroup 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.
|
AttributeGroup |
clone() |
AttributeGroup |
findGroup(ClassDescriptor type) |
AttributeGroup |
getGroup(java.lang.String attributeNameOrPath)
Returns AttributeGroup corresponding to the passed (possibly nested)
attribute.
|
org.eclipse.persistence.internal.queries.AttributeItem |
getItem(java.lang.String attributeNameOrPath)
INTERNAL:
Lookup the
AttributeItem for the provided attribute name or path. |
boolean |
isConcurrent()
INTERNAL:
Only LoadGroups allow concurrency.
|
boolean |
isCopyGroup()
INTERNAL:
This method is used internally when converting to a copy group.
|
boolean |
isLoadGroup() |
boolean |
isSupersetOf(AttributeGroup anotherGroup)
Return true if this AttributeGroup is a super-set of the passed in
AttributeGroup.
|
protected AttributeGroup |
newGroup(java.lang.String name,
CoreAttributeGroup parent)
Subclass may create different types.
|
protected org.eclipse.persistence.internal.queries.AttributeItem |
newItem(AttributeGroup group,
java.lang.String attrName)
Subclass may create different types.
|
protected org.eclipse.persistence.internal.queries.AttributeItem |
newItem(CoreAttributeGroup group,
java.lang.String attrName)
Subclass may create different types.
|
CopyGroup |
toCopyGroup()
Convert the group to a CopyGroup for usage with the copy() API.
|
CopyGroup |
toCopyGroup(java.util.Map<AttributeGroup,CopyGroup> cloneMap,
java.util.Map copies)
INTERNAL:
This method is used internally when converting to a copy group.
|
FetchGroup |
toFetchGroup()
Convert the group to a FetchGroup for usage with queries.
|
FetchGroup |
toFetchGroup(java.util.Map<AttributeGroup,FetchGroup> cloneMap)
INTERNAL:
This method is used internally when converting to a copy group.
|
LoadGroup |
toLoadGroup()
Convert the group to a LoadGroup for usage with queries.
|
LoadGroup |
toLoadGroup(java.util.Map<AttributeGroup,LoadGroup> cloneMap,
boolean loadOnly) |
addAttribute, addAttribute, addAttribute, addAttributeKey, addAttributes, clone, containsAttribute, containsAttributeInternal, convert, convertClassNamesToClasses, equals, getAllItems, getAttributeNames, getItem, getItems, getName, getSubClassGroups, getType, getTypeName, hasInheritance, hasItems, insertSubClass, isFetchGroup, isSupersetOf, isValidated, removeAttribute, setAllSubclasses, setAttributeNames, setName, toString, toStringAdditionalInfo, toStringItems, toStringPath
public AttributeGroup(java.lang.String name)
public AttributeGroup(java.lang.String name, java.lang.Class type, boolean isValidated)
name
- type
- public AttributeGroup(java.lang.String name, java.lang.String type, boolean isValidated)
public AttributeGroup()
public void addAttribute(java.lang.String attributeNameOrPath, AttributeGroup group)
Example:
group.addAttribute("firstName", group1);
Note that existing group corresponding to attributeNameOrPath
will be overridden with the passed group.
group.addAttribute("manager.address", group2);
attrPathOrName
- A simple attribute, array or attributes forming a pathgroup
- - an AttributeGroup to be added.public AttributeGroup getGroup(java.lang.String attributeNameOrPath)
getGroup
in class CoreAttributeGroup<org.eclipse.persistence.internal.queries.AttributeItem>
public boolean isSupersetOf(AttributeGroup anotherGroup)
public org.eclipse.persistence.internal.queries.AttributeItem getItem(java.lang.String attributeNameOrPath)
AttributeItem
for the provided attribute name or path.getItem
in class CoreAttributeGroup<org.eclipse.persistence.internal.queries.AttributeItem>
java.lang.IllegalArgumentException
- if name is not valid attribute name or pathprotected org.eclipse.persistence.internal.queries.AttributeItem newItem(AttributeGroup group, java.lang.String attrName)
public AttributeGroup findGroup(ClassDescriptor type)
findGroup
in class CoreAttributeGroup<org.eclipse.persistence.internal.queries.AttributeItem>
public FetchGroup toFetchGroup()
public FetchGroup toFetchGroup(java.util.Map<AttributeGroup,FetchGroup> cloneMap)
cloneMap
- public boolean isCopyGroup()
isCopyGroup
in class CoreAttributeGroup<org.eclipse.persistence.internal.queries.AttributeItem>
cloneMap
- public CopyGroup toCopyGroup()
public CopyGroup toCopyGroup(java.util.Map<AttributeGroup,CopyGroup> cloneMap, java.util.Map copies)
cloneMap
- public boolean isLoadGroup()
isLoadGroup
in class CoreAttributeGroup<org.eclipse.persistence.internal.queries.AttributeItem>
public LoadGroup toLoadGroup()
public LoadGroup toLoadGroup(java.util.Map<AttributeGroup,LoadGroup> cloneMap, boolean loadOnly)
public AttributeGroup clone()
clone
in class CoreAttributeGroup<org.eclipse.persistence.internal.queries.AttributeItem>
public boolean isConcurrent()
isConcurrent
in class CoreAttributeGroup<org.eclipse.persistence.internal.queries.AttributeItem>
protected org.eclipse.persistence.internal.queries.AttributeItem newItem(CoreAttributeGroup group, java.lang.String attrName)
newItem
in class CoreAttributeGroup<org.eclipse.persistence.internal.queries.AttributeItem>
protected AttributeGroup newGroup(java.lang.String name, CoreAttributeGroup parent)
newGroup
in class CoreAttributeGroup<org.eclipse.persistence.internal.queries.AttributeItem>