Class CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup,DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager,FIELD extends org.eclipse.persistence.internal.core.helper.CoreField,INHERITANCE_POLICY extends CoreInheritancePolicy,INSTANTIATION_POLICY extends org.eclipse.persistence.internal.core.descriptors.CoreInstantiationPolicy,LIST extends java.util.List,OBJECT_BUILDER extends org.eclipse.persistence.internal.core.descriptors.CoreObjectBuilder>
- java.lang.Object
-
- org.eclipse.persistence.core.descriptors.CoreDescriptor<ATTRIBUTE_GROUP,DESCRIPTOR_EVENT_MANAGER,FIELD,INHERITANCE_POLICY,INSTANTIATION_POLICY,LIST,OBJECT_BUILDER>
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ClassDescriptor
public abstract class CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup,DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager,FIELD extends org.eclipse.persistence.internal.core.helper.CoreField,INHERITANCE_POLICY extends CoreInheritancePolicy,INSTANTIATION_POLICY extends org.eclipse.persistence.internal.core.descriptors.CoreInstantiationPolicy,LIST extends java.util.List,OBJECT_BUILDER extends org.eclipse.persistence.internal.core.descriptors.CoreObjectBuilder> extends java.lang.Object implements java.io.SerializableINTERNAL A abstraction of descriptor capturing behavior common to all persistence types.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,ATTRIBUTE_GROUP>attributeGroupsprotected DESCRIPTOR_EVENT_MANAGEReventManagerprotected FIELDfieldprotected INHERITANCE_POLICYinheritancePolicyprotected INSTANTIATION_POLICYinstantiationPolicyprotected OBJECT_BUILDERobjectBuilder
-
Constructor Summary
Constructors Constructor Description CoreDescriptor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddAttributeGroup(ATTRIBUTE_GROUP group)Adds the attribute group to this descriptor.ATTRIBUTE_GROUPgetAttributeGroup(java.lang.String name)PUBLIC: Returns the attribute group corresponding to the name provided.java.util.Map<java.lang.String,ATTRIBUTE_GROUP>getAttributeGroups()ADVANCED: Returns the attribute groups for this Descriptor.abstract DESCRIPTOR_EVENT_MANAGERgetEventManager()PUBLIC: Get the event manager for the descriptor.abstract INHERITANCE_POLICYgetInheritancePolicy()PUBLIC: The inheritance policy is used to define how a descriptor takes part in inheritance.abstract INSTANTIATION_POLICYgetInstantiationPolicy()INTERNAL: Returns the instantiation policy.abstract java.lang.ClassgetJavaClass()PUBLIC: Return the java class.abstract OBJECT_BUILDERgetObjectBuilder()INTERNAL: Return the object builderabstract java.util.List<java.lang.String>getPrimaryKeyFieldNames()PUBLIC: Return the names of all the primary keys.abstract java.util.List<FIELD>getPrimaryKeyFields()INTERNAL: Return all the primary key fieldsabstract FIELDgetTypedField(FIELD field)INTERNAL: searches first descriptor than its ReturningPolicy for an equal fieldabstract booleanhasEventManager()INTERNAL: returns true if a DescriptorEventManager has been set.abstract booleanhasInheritance()INTERNAL: Return if this descriptor is involved in inheritance, (is child or parent).abstract voidsetEventManager(DESCRIPTOR_EVENT_MANAGER eventManager)INTERNAL: Set the event manager for the descriptor.abstract voidsetInheritancePolicy(INHERITANCE_POLICY inheritancePolicy)INTERNAL: Sets the inheritance policy.abstract voidsetInstantiationPolicy(INSTANTIATION_POLICY instantiationPolicy)INTERNAL: Sets the instantiation policy.abstract voidsetJavaClass(java.lang.Class javaClass)PUBLIC: Set the Java class that this descriptor maps.protected abstract voidsetObjectBuilder(OBJECT_BUILDER objectBuilder)INTERNAL: Set the ObjectBuilder.abstract voidsetPrimaryKeyFieldNames(LIST primaryKeyFieldNames)PUBLIC: User can specify a vector of all the primary key field names if primary key is composite.abstract voidsetPrimaryKeyFields(java.util.List<FIELD> primaryKeyFields)PUBLIC: User can specify a vector of all the primary key field names if primary key is composite.
-
-
-
Field Detail
-
eventManager
protected DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager eventManager
-
field
protected FIELD extends org.eclipse.persistence.internal.core.helper.CoreField field
-
instantiationPolicy
protected INSTANTIATION_POLICY extends org.eclipse.persistence.internal.core.descriptors.CoreInstantiationPolicy instantiationPolicy
-
inheritancePolicy
protected INHERITANCE_POLICY extends CoreInheritancePolicy inheritancePolicy
-
objectBuilder
protected OBJECT_BUILDER extends org.eclipse.persistence.internal.core.descriptors.CoreObjectBuilder objectBuilder
-
attributeGroups
protected java.util.Map<java.lang.String,ATTRIBUTE_GROUP extends CoreAttributeGroup> attributeGroups
-
-
Method Detail
-
addAttributeGroup
public void addAttributeGroup(ATTRIBUTE_GROUP group)
Adds the attribute group to this descriptor.- Parameters:
group-
-
getAttributeGroup
public ATTRIBUTE_GROUP getAttributeGroup(java.lang.String name)
PUBLIC: Returns the attribute group corresponding to the name provided. If no group is found with the specified name, null is returned.
-
getAttributeGroups
public java.util.Map<java.lang.String,ATTRIBUTE_GROUP> getAttributeGroups()
ADVANCED: Returns the attribute groups for this Descriptor.
-
getEventManager
public abstract DESCRIPTOR_EVENT_MANAGER getEventManager()
PUBLIC: Get the event manager for the descriptor. The event manager is responsible for managing the pre/post selectors.
-
getInheritancePolicy
public abstract INHERITANCE_POLICY getInheritancePolicy()
PUBLIC: The inheritance policy is used to define how a descriptor takes part in inheritance. All inheritance properties for both child and parent classes is configured in inheritance policy. Caution must be used in using this method as it lazy initializes an inheritance policy. Calling this on a descriptor that does not use inheritance will cause problems, #hasInheritance() must always first be called.
-
getInstantiationPolicy
public abstract INSTANTIATION_POLICY getInstantiationPolicy()
INTERNAL: Returns the instantiation policy.
-
getJavaClass
public abstract java.lang.Class getJavaClass()
PUBLIC: Return the java class.
-
getObjectBuilder
public abstract OBJECT_BUILDER getObjectBuilder()
INTERNAL: Return the object builder
-
getPrimaryKeyFieldNames
public abstract java.util.List<java.lang.String> getPrimaryKeyFieldNames()
PUBLIC: Return the names of all the primary keys.
-
getPrimaryKeyFields
public abstract java.util.List<FIELD> getPrimaryKeyFields()
INTERNAL: Return all the primary key fields
-
getTypedField
public abstract FIELD getTypedField(FIELD field)
INTERNAL: searches first descriptor than its ReturningPolicy for an equal field
-
hasEventManager
public abstract boolean hasEventManager()
INTERNAL: returns true if a DescriptorEventManager has been set.
-
hasInheritance
public abstract boolean hasInheritance()
INTERNAL: Return if this descriptor is involved in inheritance, (is child or parent). Note: If this class is part of table per class inheritance strategy this method will return false.- See Also:
ClassDescriptor.hasTablePerClassPolicy()
-
setEventManager
public abstract void setEventManager(DESCRIPTOR_EVENT_MANAGER eventManager)
INTERNAL: Set the event manager for the descriptor. The event manager is responsible for managing the pre/post selectors.
-
setInheritancePolicy
public abstract void setInheritancePolicy(INHERITANCE_POLICY inheritancePolicy)
INTERNAL: Sets the inheritance policy.
-
setInstantiationPolicy
public abstract void setInstantiationPolicy(INSTANTIATION_POLICY instantiationPolicy)
INTERNAL: Sets the instantiation policy.
-
setJavaClass
public abstract void setJavaClass(java.lang.Class javaClass)
PUBLIC: Set the Java class that this descriptor maps. Every descriptor maps one and only one class.
-
setObjectBuilder
protected abstract void setObjectBuilder(OBJECT_BUILDER objectBuilder)
INTERNAL: Set the ObjectBuilder.
-
setPrimaryKeyFieldNames
public abstract void setPrimaryKeyFieldNames(LIST primaryKeyFieldNames)
PUBLIC: User can specify a vector of all the primary key field names if primary key is composite.
-
setPrimaryKeyFields
public abstract void setPrimaryKeyFields(java.util.List<FIELD> primaryKeyFields)
PUBLIC: User can specify a vector of all the primary key field names if primary key is composite.
-
-