Top Description Fields Constructors Methods
org.eclipse.persistence.core.queries

public Class 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>>

extends Object
implements Serializable, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, java.io.Serializable
Known Direct Subclasses
org.eclipse.persistence.queries.AttributeGroup
Imports
java.io.Serializable, .StringWriter, java.util.Collection, .HashMap, .HashSet, .IdentityHashMap, .Iterator, .Map, .Set, org.eclipse.persistence.core.descriptors.CoreDescriptor, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.internal.core.queries.CoreAttributeConverter, org.eclipse.persistence.internal.helper.StringHelper, org.eclipse.persistence.internal.security.PrivilegedAccessHelper

INTERNAL Purpose: A generic super class for AttributeGroup and other subclasses
Author
Matt MacIvor
Since
EclipseLink 2.5
See Also
org.eclipse.persistence.queries.AttributeGroup

Field Summary

Modifier and TypeField and Description
protected Map<Object, 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>>>
allsubclasses

This attribute is used to store all of the classes in this hierarchy keyed by type.

private static final String
FIELD_SEP

Name parts separator.

protected boolean
isValidated

Marks this AttributeGroup as having been validated by the builder and does not require further validation

protected Map<String, ATTRIBUTE_ITEM>
items

Specified attributes in the group mapped to their AttributeItems

protected String
name

Name of the group.

protected transient Set<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>>>
subClasses

This attribute references the immediate subclass groups for this attributeGroup.

protected 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>>
superClassGroup

To add inheritance support the two following attrbutes are used to create a model of the inheritance tree This attribute points to the parent AttributeGroup of this attribute group.

private int
protected Class<?>
type

The class represented by this AttrbuteGroup.

protected String
typeName

The name of the class represented by this AttrbuteGroup.

Constructor Summary

AccessConstructor and Description
public
public
CoreAttributeGroup(String name, String type, boolean isValidated)

public
CoreAttributeGroup(String name, Class<?> type, boolean isValidated)

INTERNAL: This constructer is to only be used by EclipseLink internally

public

Method Summary

Modifier and TypeMethod and Description
public void
addAttribute(String
A simple attribute, array or attributes forming a path
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.

public void
addAttribute(String
A simple attribute, array or attributes forming a path
attributeNameOrPath
,
Collection<? extends 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>>>
- a collection of AttributeGroups to be added.
groups
)

Add an attribute and the corresponding list of AttributeGroups.

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
)

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.

public void
addAttributeKey(String
A simple attribute, array or attributes forming a path to a Map key
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
)

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.

public void
addAttributes(Collection<String> attrOrPaths)

Add a set of attributes to the group.

public 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>>
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.
public 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>>
clone(Map<CoreAttributeGroup<ATTRIBUTE_ITEM, DESCRIPTOR>, CoreAttributeGroup<ATTRIBUTE_ITEM, DESCRIPTOR>> cloneMap)

INTERNAL: This method is used internally in the clone processing.

public boolean
containsAttribute(String attributeNameOrPath)

Return if the attribute is defined in the group.

public boolean
containsAttributeInternal(String attributeName)

INTERNAL: Return if the attribute is defined in the group.

protected String[]
convert(String... nameOrPath)

Convert a provided name or path which could be a single attributeName, a single string with dot separated attribute names, or an array of attribute names defining the path.

public void
convertClassNamesToClasses(ClassLoader classLoader)

INTERNAL: Convert all the class-name-based settings in this Descriptor to actual class-based settings.

public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public 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>>
findGroup(DESCRIPTOR type)

public Map<String, ATTRIBUTE_ITEM>
getAllItems()

INTERNAL:

public Set<String>
public 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>>
getGroup(String attributeNameOrPath)

Returns AttributeGroup corresponding to the passed (possibly nested) attribute.

public ATTRIBUTE_ITEM

Returns:

item or null
getItem
(String attributeNameOrPath)

INTERNAL: Lookup the AttributeItem for the provided attribute name or path.

protected ATTRIBUTE_ITEM
getItem(String[] attributePath, boolean
indicates if intermediate AttributeGroup required within the specified path should be created as needed. When checking the state of the map callers should set this to false to avoid changing the state unexpectedly
create
)

Locate the AttributeGroup where the leaf attribute in the path should be applied to.

public Map<String, ATTRIBUTE_ITEM>

Returns:

Non-null Map of attributes in the group mapped to their AttributeItems
getItems
()

INTERNAL:

public String
public Map<Object, 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>>>
getSubClassGroups()

INTERNAL:

public Class<?>
public String
getTypeName()

INTERNAL: Returns the name of the type this group represents

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public boolean
hasInheritance()

Indicates whether this group is part of an inheritance hierarchy

public boolean
hasItems()

Indicates whether the group has at least one attribute.

public void
insertSubClass(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)

INTERNAL: This method will insert the group into the entity hierarchy just below this AttributeGroup.

public boolean
isConcurrent()

INTERNAL: Only LoadGroups allow concurrency.

public boolean
isCopyGroup()

INTERNAL: This method is used internally when converting to a copy group.

public boolean
public boolean
public boolean
isSupersetOf(CoreAttributeGroup<ATTRIBUTE_ITEM, DESCRIPTOR> anotherGroup)

Return true if this AttributeGroup is a super-set of the passed in AttributeGroup.

public boolean

Returns:

the isValidated
isValidated
()

INTERNAL:

protected 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>>
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)

Subclass may create different types.

protected CoreAttributeItem<ATTRIBUTE_GROUP extends 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>>>
newItem(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, String attrName)

Subclass may create different types.

public void
removeAttribute(String attributeNameOrPath)

Remove an attribute from the group.

public void
setAllSubclasses(Map<Object, 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>>> subclasses)

INTERNAL:

public void
setAttributeNames(Set<E> attributeNames)

public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
protected String
toStringAdditionalInfo()

Used by toString to print additional info for derived classes.

protected String
toStringItems()

Used by toString to print attribute items.

protected static String
toStringPath(String[] attributePath, int position)

Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

allsubclassesback to summary
protected Map<Object, 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>>> allsubclasses

This attribute is used to store all of the classes in this hierarchy keyed by type. It is used to find the correct graph for polymorphic groups.

FIELD_SEPback to summary
private static final String FIELD_SEP

Name parts separator. Used in toStringItems() method to build output string.

isValidatedback to summary
protected boolean isValidated

Marks this AttributeGroup as having been validated by the builder and does not require further validation

itemsback to summary
protected Map<String, ATTRIBUTE_ITEM> items

Specified attributes in the group mapped to their AttributeItems

nameback to summary
protected String name

Name of the group. This is used in subclasses where the groups are stored and can be used within a query by name as with FetchGroup. For dynamic groups the name has no functional value.

subClassesback to summary
protected transient Set<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>>> subClasses

This attribute references the immediate subclass groups for this attributeGroup. This is not required but acts as a means to support adding inheritance branches into the an established tree.

superClassGroupback to summary
protected 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>> superClassGroup

To add inheritance support the two following attrbutes are used to create a model of the inheritance tree This attribute points to the parent AttributeGroup of this attribute group.

toStringLoopCountback to summary
private int toStringLoopCount
typeback to summary
protected Class<?> type

The class represented by this AttrbuteGroup. Used to specify overriding groups for subclasses.

typeNameback to summary
protected String typeName

The name of the class represented by this AttrbuteGroup. Used to specify overriding groups for subclasses.

Constructor Detail

CoreAttributeGroupback to summary
public CoreAttributeGroup(String name)
CoreAttributeGroupback to summary
public CoreAttributeGroup(String name, String type, boolean isValidated)
CoreAttributeGroupback to summary
public CoreAttributeGroup(String name, Class<?> type, boolean isValidated)

INTERNAL: This constructer is to only be used by EclipseLink internally

CoreAttributeGroupback to summary
public CoreAttributeGroup()

Method Detail

addAttributeback to summary
public 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.

Example: group.addAttribute("firstName");
group.addAttribute("manager.address");

Parameters
attributeNameOrPath:String

A simple attribute, array or attributes forming a path

addAttributeback to summary
public void addAttribute(String attributeNameOrPath, Collection<? extends 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>>> groups)

Add an attribute and the corresponding list of AttributeGroups. Multiple groups are added in the case of inheritance

Parameters
attributeNameOrPath:String

A simple attribute, array or attributes forming a path

groups:Collection<? extends 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>>>

- a collection of AttributeGroups to be added.

addAttributeback 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)

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: group.addAttribute("firstName", group1);
group.addAttribute("manager.address", group2);
Note that existing group corresponding to attributeNameOrPath will be overridden with the passed group.

Parameters
attributeNameOrPath:String

A simple attribute, array or attributes forming a path

group: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.

addAttributeKeyback to summary
public void addAttributeKey(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)

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.

Example: group.addAttribute("firstName", group1);
group.addAttribute("manager.address", group2);
Note that existing group corresponding to attributeNameOrPath will be overridden with the passed group.

Parameters
attributeNameOrPath:String

A simple attribute, array or attributes forming a path to a Map key

group: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.

addAttributesback to summary
public void addAttributes(Collection<String> attrOrPaths)

Add a set of attributes to the group.

cloneback to summary
public 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>> clone()

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

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 x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

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 super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns: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>>

a clone of this instance.

Annotations
@Override
cloneback to summary
public 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>> clone(Map<CoreAttributeGroup<ATTRIBUTE_ITEM, DESCRIPTOR>, CoreAttributeGroup<ATTRIBUTE_ITEM, DESCRIPTOR>> cloneMap)

INTERNAL: This method is used internally in the clone processing.

containsAttributeback to summary
public boolean containsAttribute(String attributeNameOrPath)

Return if the attribute is defined in the group.

containsAttributeInternalback to summary
public boolean containsAttributeInternal(String attributeName)

INTERNAL: Return if the attribute is defined in the group. Only local attribute names are checked.

convertback to summary
protected String[] convert(String... nameOrPath)

Convert a provided name or path which could be a single attributeName, a single string with dot separated attribute names, or an array of attribute names defining the path.

Exceptions
IllegalArgumentException:
if name is not valid attribute name or path.
convertClassNamesToClassesback to summary
public void convertClassNamesToClasses(ClassLoader classLoader)

INTERNAL: Convert all the class-name-based settings in this Descriptor to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
findGroupback to summary
public 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>> findGroup(DESCRIPTOR type)
getAllItemsback to summary
public Map<String, ATTRIBUTE_ITEM> getAllItems()

INTERNAL:

getAttributeNamesback to summary
public Set<String> getAttributeNames()
getGroupback to summary
public 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>> getGroup(String attributeNameOrPath)

Returns AttributeGroup corresponding to the passed (possibly nested) attribute.

getItemback to summary
public ATTRIBUTE_ITEM getItem(String attributeNameOrPath)

INTERNAL: Lookup the AttributeItem for the provided attribute name or path.

Returns:ATTRIBUTE_ITEM

item or null

Exceptions
IllegalArgumentException:
if name is not valid attribute name or path
getItemback to summary
protected ATTRIBUTE_ITEM getItem(String[] attributePath, boolean create)

Locate the AttributeGroup where the leaf attribute in the path should be applied to.

Parameters
create:boolean

indicates if intermediate AttributeGroup required within the specified path should be created as needed. When checking the state of the map callers should set this to false to avoid changing the state unexpectedly

getItemsback to summary
public Map<String, ATTRIBUTE_ITEM> getItems()

INTERNAL:

Returns:Map<String, ATTRIBUTE_ITEM>

Non-null Map of attributes in the group mapped to their AttributeItems

getNameback to summary
public String getName()
getSubClassGroupsback to summary
public Map<Object, 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>>> getSubClassGroups()

INTERNAL:

getTypeback to summary
public Class<?> getType()
getTypeNameback to summary
public String getTypeName()

INTERNAL: Returns the name of the type this group represents

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
hasInheritanceback to summary
public boolean hasInheritance()

Indicates whether this group is part of an inheritance hierarchy

hasItemsback to summary
public boolean hasItems()

Indicates whether the group has at least one attribute.

insertSubClassback to summary
public void insertSubClass(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)

INTERNAL: This method will insert the group into the entity hierarchy just below this AttributeGroup.

isConcurrentback to summary
public boolean isConcurrent()

INTERNAL: Only LoadGroups allow concurrency.

isCopyGroupback to summary
public boolean isCopyGroup()

INTERNAL: This method is used internally when converting to a copy group.

isFetchGroupback to summary
public boolean isFetchGroup()
isLoadGroupback to summary
public boolean isLoadGroup()
isSupersetOfback to summary
public boolean isSupersetOf(CoreAttributeGroup<ATTRIBUTE_ITEM, DESCRIPTOR> anotherGroup)

Return true if this AttributeGroup is a super-set of the passed in AttributeGroup.

isValidatedback to summary
public boolean isValidated()

INTERNAL:

Returns:boolean

the isValidated

newGroupback to summary
protected 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>> 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)

Subclass may create different types.

newItemback to summary
protected CoreAttributeItem<ATTRIBUTE_GROUP extends 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>>> newItem(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, String attrName)

Subclass may create different types.

removeAttributeback to summary
public void removeAttribute(String attributeNameOrPath)

Remove an attribute from the group.

setAllSubclassesback to summary
public void setAllSubclasses(Map<Object, 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>>> subclasses)

INTERNAL:

setAttributeNamesback to summary
public void setAttributeNames(Set<E> attributeNames)
setNameback to summary
public void setName(String name)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
toStringAdditionalInfoback to summary
protected String toStringAdditionalInfo()

Used by toString to print additional info for derived classes.

toStringItemsback to summary
protected String toStringItems()

Used by toString to print attribute items.

toStringPathback to summary
protected static String toStringPath(String[] attributePath, int position)