public class CoreAttributeGroup<ATTRIBUTE_ITEM extends CoreAttributeItem,DESCRIPTOR extends CoreDescriptor>
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
AttributeGroup
,
Serialized FormConstructor and Description |
---|
CoreAttributeGroup() |
CoreAttributeGroup(java.lang.String name) |
CoreAttributeGroup(java.lang.String name,
java.lang.Class type,
boolean isValidated)
INTERNAL:
This constructer is to only be used by EclipseLink internally
|
CoreAttributeGroup(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,
java.util.Collection<? extends CoreAttributeGroup> groups)
Add an attribute and the corresponding list of AttributeGroups.
|
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 |
addAttributeKey(java.lang.String attributeNameOrPath,
CoreAttributeGroup 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.
|
CoreAttributeGroup |
clone() |
CoreAttributeGroup |
clone(java.util.Map<CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR>,CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR>> 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) |
CoreAttributeGroup |
findGroup(DESCRIPTOR type) |
java.util.Map<java.lang.String,ATTRIBUTE_ITEM> |
getAllItems()
INTERNAL:
|
java.util.Set<java.lang.String> |
getAttributeNames() |
CoreAttributeGroup |
getGroup(java.lang.String attributeNameOrPath)
Returns AttributeGroup corresponding to the passed (possibly nested)
attribute.
|
ATTRIBUTE_ITEM |
getItem(java.lang.String attributeNameOrPath)
INTERNAL:
Lookup the
AttributeItem for the provided attribute name or path. |
java.util.Map<java.lang.String,ATTRIBUTE_ITEM> |
getItems()
INTERNAL:
|
java.lang.String |
getName() |
java.util.Map<java.lang.Object,CoreAttributeGroup> |
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(CoreAttributeGroup 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(CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR> anotherGroup)
Return true if this AttributeGroup is a super-set of the passed in
AttributeGroup.
|
boolean |
isValidated()
INTERNAL:
|
void |
removeAttribute(java.lang.String attributeNameOrPath)
Remove an attribute from the group.
|
void |
setAllSubclasses(java.util.Map<java.lang.Object,CoreAttributeGroup> subclasses)
INTERNAL:
|
void |
setAttributeNames(java.util.Set attributeNames) |
void |
setName(java.lang.String name) |
java.lang.String |
toString() |
public CoreAttributeGroup(java.lang.String name)
public CoreAttributeGroup(java.lang.String name, java.lang.String type, boolean isValidated)
public CoreAttributeGroup(java.lang.String name, java.lang.Class type, boolean isValidated)
name
- type
- public CoreAttributeGroup()
public void addAttribute(java.lang.String attributeNameOrPath)
Example:
group.addAttribute("firstName");
group.addAttribute("manager.address");
attributeNameOrPath
- A simple attribute, array or attributes forming a pathpublic void addAttribute(java.lang.String attributeNameOrPath, java.util.Collection<? extends CoreAttributeGroup> groups)
attributeNameOrPath
- A simple attribute, array or attributes forming a pathgroups
- - a collection of AttributeGroups to be added.public void addAttribute(java.lang.String attributeNameOrPath, CoreAttributeGroup 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);
attributeNameOrPath
- A simple attribute, array or attributes forming a pathgroup
- - an AttributeGroup to be added.public void addAttributeKey(java.lang.String attributeNameOrPath, CoreAttributeGroup 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);
attributeNameOrPath
- 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 CoreAttributeGroup clone()
clone
in class java.lang.Object
public CoreAttributeGroup clone(java.util.Map<CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR>,CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR>> cloneMap)
cloneMap
- public boolean containsAttribute(java.lang.String attributeNameOrPath)
public boolean containsAttributeInternal(java.lang.String attributeName)
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
classLoader
- public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public CoreAttributeGroup findGroup(DESCRIPTOR type)
public java.util.Map<java.lang.String,ATTRIBUTE_ITEM> getAllItems()
public java.util.Set<java.lang.String> getAttributeNames()
public CoreAttributeGroup getGroup(java.lang.String attributeNameOrPath)
public ATTRIBUTE_ITEM 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 java.util.Map<java.lang.String,ATTRIBUTE_ITEM> getItems()
public java.lang.String getName()
public java.util.Map<java.lang.Object,CoreAttributeGroup> getSubClassGroups()
public java.lang.Class getType()
public java.lang.String getTypeName()
public boolean hasInheritance()
public boolean hasItems()
public void insertSubClass(CoreAttributeGroup group)
group
- public boolean isConcurrent()
public boolean isCopyGroup()
public boolean isFetchGroup()
public boolean isLoadGroup()
public boolean isSupersetOf(CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR> anotherGroup)
public boolean isValidated()
public void removeAttribute(java.lang.String attributeNameOrPath)
public void setAllSubclasses(java.util.Map<java.lang.Object,CoreAttributeGroup> subclasses)
public void setAttributeNames(java.util.Set attributeNames)
public void setName(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference