|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.queries.AttributeGroup
public class AttributeGroup
Purpose: An AttributeGroup represents a set of mappings and nested AttributeGroups for relationship mappings for an entity type. Responsibilities:
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 Summary | |
---|---|
AttributeGroup()
|
|
AttributeGroup(String name)
|
Method Summary | |
---|---|
void |
addAttribute(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(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 |
addAttributes(Collection<String> attrOrPaths)
Add a set of attributes to the group. |
AttributeGroup |
clone()
|
boolean |
containsAttribute(String attributeNameOrPath)
Return if the attribute is defined in the group. |
boolean |
equals(Object obj)
|
Set<String> |
getAttributeNames()
|
AttributeGroup |
getGroup(String attributeNameOrPath)
Returns AttributeGroup corresponding to the passed (possibly nested) attribute. |
org.eclipse.persistence.internal.queries.AttributeItem |
getItem(String attributeNameOrPath)
INTERNAL: Lookup the AttributeItem for the provided attribute name or path. |
Map<String,org.eclipse.persistence.internal.queries.AttributeItem> |
getItems()
INTERNAL: |
String |
getName()
|
boolean |
hasItems()
Indicates whether the group has at least one attribute. |
boolean |
isCopyGroup()
|
boolean |
isFetchGroup()
|
boolean |
isLoadGroup()
|
boolean |
isSupersetOf(AttributeGroup anotherGroup)
Return true if this AttributeGroup is a super-set of the passed in AttributeGroup. |
void |
removeAttribute(String attributeNameOrPath)
Remove an attribute from the group. |
void |
setAttributeNames(Set attributeNames)
|
void |
setName(String name)
|
CopyGroup |
toCopyGroup()
|
FetchGroup |
toFetchGroup()
|
LoadGroup |
toLoadGroup()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AttributeGroup(String name)
public AttributeGroup()
Method Detail |
---|
public String getName()
public void setName(String name)
public Set<String> getAttributeNames()
public void setAttributeNames(Set attributeNames)
public boolean hasItems()
public Map<String,org.eclipse.persistence.internal.queries.AttributeItem> getItems()
public boolean containsAttribute(String attributeNameOrPath)
public void addAttribute(String attributeNameOrPath)
Example:
group.addAttribute("firstName");
group.addAttribute("manager.address");
attrPathOrName
- A simple attribute, array or attributes forming a pathpublic void addAttribute(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 addAttributes(Collection<String> attrOrPaths)
public AttributeGroup getGroup(String attributeNameOrPath)
public org.eclipse.persistence.internal.queries.AttributeItem getItem(String attributeNameOrPath)
AttributeItem
for the provided attribute name or path.
IllegalArgumentException
- if name is not valid attribute name or pathpublic void removeAttribute(String attributeNameOrPath)
public boolean isSupersetOf(AttributeGroup anotherGroup)
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public boolean isFetchGroup()
public FetchGroup toFetchGroup()
public boolean isCopyGroup()
public CopyGroup toCopyGroup()
public boolean isLoadGroup()
public LoadGroup toLoadGroup()
public AttributeGroup clone()
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |