public class AttributeGroup
extends java.lang.Object
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 FormConstructor 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)
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, 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.
|
void |
addAttribute(java.lang.String attributeNameOrPath, java.util.Collection<AttributeGroup> groups)
Add an attribute and the corresponding list of AttributeGroups.
|
void |
addAttributeKey(java.lang.String attributeNameOrPath, AttributeGroup group)
Add a basic attribute or nested attribute with each String representing the key of an attribute of type Map on the path to what needs to be included in the AttributeGroup.
|
void |
addAttributes(java.util.Collection<java.lang.String> attrOrPaths)
Add a set of attributes to the group.
|
AttributeGroup |
clone() |
AttributeGroup |
clone(java.util.Map<AttributeGroup,AttributeGroup> cloneMap)
INTERNAL: This method is used internally in the clone processing.
|
boolean |
containsAttribute(java.lang.String attributeNameOrPath)
Return if the attribute is defined in the group.
|
boolean |
containsAttributeInternal(java.lang.String attributeName)
INTERNAL: Return if the attribute is defined in the group.
|
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this Descriptor to actual class-based settings.
|
boolean |
equals(java.lang.Object obj) |
AttributeGroup |
findGroup(ClassDescriptor type) |
java.util.Map<java.lang.String,org.eclipse.persistence.internal.queries.AttributeItem> |
getAllItems()
INTERNAL:
|
java.util.Set<java.lang.String> |
getAttributeNames() |
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. |
java.util.Map<java.lang.String,org.eclipse.persistence.internal.queries.AttributeItem> |
getItems()
INTERNAL:
|
java.lang.String |
getName() |
java.util.Map<java.lang.Object,AttributeGroup> |
getSubClassGroups()
INTERNAL:
|
java.lang.Class |
getType() |
java.lang.String |
getTypeName()
INTERNAL: Returns the name of the type this group represents
|
boolean |
hasInheritance()
Indicates whether this group is part of an inheritance hierarchy
|
boolean |
hasItems()
Indicates whether the group has at least one attribute.
|
void |
insertSubClass(AttributeGroup group)
INTERNAL: This method will insert the group into the entity hierarchy just below this AttributeGroup.
|
boolean |
isConcurrent()
INTERNAL: Only LoadGroups allow concurrency.
|
boolean |
isCopyGroup()
INTERNAL: This method is used internally when converting to a copy group.
|
boolean |
isFetchGroup() |
boolean |
isLoadGroup() |
boolean |
isSupersetOf(AttributeGroup anotherGroup)
Return true if this AttributeGroup is a super-set of the passed in AttributeGroup.
|
void |
removeAttribute(java.lang.String attributeNameOrPath)
Remove an attribute from the group.
|
void |
setAllSubclasses(java.util.Map<java.lang.Object,AttributeGroup> subclasses)
INTERNAL:
|
void |
setAttributeNames(java.util.Set attributeNames) |
void |
setName(java.lang.String name) |
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) |
java.lang.String |
toString() |
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 java.lang.String getName()
public void setName(java.lang.String name)
public AttributeGroup findGroup(ClassDescriptor type)
public java.util.Set<java.lang.String> getAttributeNames()
public java.lang.Class getType()
public java.lang.String getTypeName()
public void setAttributeNames(java.util.Set attributeNames)
public void setAllSubclasses(java.util.Map<java.lang.Object,AttributeGroup> subclasses)
public boolean hasItems()
public boolean hasInheritance()
public java.util.Map<java.lang.Object,AttributeGroup> getSubClassGroups()
public java.util.Map<java.lang.String,org.eclipse.persistence.internal.queries.AttributeItem> getItems()
public java.util.Map<java.lang.String,org.eclipse.persistence.internal.queries.AttributeItem> getAllItems()
public boolean containsAttributeInternal(java.lang.String attributeName)
public boolean containsAttribute(java.lang.String attributeNameOrPath)
public void addAttribute(java.lang.String attributeNameOrPath)
Example: group.addAttribute("firstName");
group.addAttribute("manager.address");
attrPathOrName
- A simple attribute, array or attributes forming a pathpublic 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 void addAttribute(java.lang.String attributeNameOrPath, java.util.Collection<AttributeGroup> groups)
attrPathOrName
- A simple attribute, array or attributes forming a pathgroup
- - a collection of AttributeGroups to be added.public void addAttributeKey(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 path to a Map keygroup
- - an AttributeGroup to be added.public void addAttributes(java.util.Collection<java.lang.String> attrOrPaths)
public AttributeGroup getGroup(java.lang.String attributeNameOrPath)
public org.eclipse.persistence.internal.queries.AttributeItem getItem(java.lang.String attributeNameOrPath)
AttributeItem
for the provided attribute name or path.java.lang.IllegalArgumentException
- if name is not valid attribute name or pathpublic void removeAttribute(java.lang.String attributeNameOrPath)
public boolean isSupersetOf(AttributeGroup anotherGroup)
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
classLoader
-public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isFetchGroup()
public FetchGroup toFetchGroup()
public FetchGroup toFetchGroup(java.util.Map<AttributeGroup,FetchGroup> cloneMap)
cloneMap
-public boolean isCopyGroup()
cloneMap
-public CopyGroup toCopyGroup()
public CopyGroup toCopyGroup(java.util.Map<AttributeGroup,CopyGroup> cloneMap, java.util.Map copies)
cloneMap
-public boolean isLoadGroup()
public LoadGroup toLoadGroup()
public LoadGroup toLoadGroup(java.util.Map<AttributeGroup,LoadGroup> cloneMap, boolean loadOnly)
public AttributeGroup clone()
clone
in class java.lang.Object
public AttributeGroup clone(java.util.Map<AttributeGroup,AttributeGroup> cloneMap)
cloneMap
-public boolean isConcurrent()
public void insertSubClass(AttributeGroup group)
group
-