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 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:
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 List,OBJECT_BUILDER extends org.eclipse.persistence.internal.core.descriptors.CoreObjectBuilder>
extends Object
implements Serializable
INTERNAL
A abstraction of descriptor capturing behavior common to all persistence
types.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map<String,
ATTRIBUTE_GROUP> protected DESCRIPTOR_EVENT_MANAGER
protected FIELD
protected INHERITANCE_POLICY
protected INSTANTIATION_POLICY
protected OBJECT_BUILDER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeGroup
(ATTRIBUTE_GROUP group) Adds the attribute group to this descriptor.getAttributeGroup
(String name) PUBLIC: Returns the attribute group corresponding to the name provided.ADVANCED: Returns the attribute groups for this Descriptor.abstract DESCRIPTOR_EVENT_MANAGER
PUBLIC: Get the event manager for the descriptor.abstract INHERITANCE_POLICY
PUBLIC: The inheritance policy is used to define how a descriptor takes part in inheritance.abstract INSTANTIATION_POLICY
INTERNAL: Returns the instantiation policy.abstract Class
PUBLIC: Return the java class.abstract OBJECT_BUILDER
INTERNAL: Return the object builderPUBLIC: Return the names of all the primary keys.INTERNAL: Return all the primary key fieldsabstract FIELD
getTypedField
(FIELD field) INTERNAL: searches first descriptor than its ReturningPolicy for an equal fieldabstract boolean
INTERNAL: returns true if a DescriptorEventManager has been set.abstract boolean
INTERNAL: Return if this descriptor is involved in inheritance, (is child or parent).abstract void
setEventManager
(DESCRIPTOR_EVENT_MANAGER eventManager) INTERNAL: Set the event manager for the descriptor.abstract void
setInheritancePolicy
(INHERITANCE_POLICY inheritancePolicy) INTERNAL: Sets the inheritance policy.abstract void
setInstantiationPolicy
(INSTANTIATION_POLICY instantiationPolicy) INTERNAL: Sets the instantiation policy.abstract void
setJavaClass
(Class javaClass) PUBLIC: Set the Java class that this descriptor maps.protected abstract void
setObjectBuilder
(OBJECT_BUILDER objectBuilder) INTERNAL: Set the ObjectBuilder.abstract void
setPrimaryKeyFieldNames
(LIST primaryKeyFieldNames) PUBLIC: User can specify a vector of all the primary key field names if primary key is composite.abstract void
setPrimaryKeyFields
(List<FIELD> primaryKeyFields) PUBLIC: User can specify a vector of all the primary key field names if primary key is composite.
-
Field Details
-
eventManager
-
field
-
instantiationPolicy
protected INSTANTIATION_POLICY extends org.eclipse.persistence.internal.core.descriptors.CoreInstantiationPolicy instantiationPolicy -
inheritancePolicy
-
objectBuilder
protected OBJECT_BUILDER extends org.eclipse.persistence.internal.core.descriptors.CoreObjectBuilder objectBuilder -
attributeGroups
-
-
Constructor Details
-
CoreDescriptor
public CoreDescriptor()
-
-
Method Details
-
addAttributeGroup
Adds the attribute group to this descriptor.- Parameters:
group
-
-
getAttributeGroup
PUBLIC: Returns the attribute group corresponding to the name provided. If no group is found with the specified name, null is returned. -
getAttributeGroups
ADVANCED: Returns the attribute groups for this Descriptor. -
getEventManager
PUBLIC: Get the event manager for the descriptor. The event manager is responsible for managing the pre/post selectors. -
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
INTERNAL: Returns the instantiation policy. -
getJavaClass
PUBLIC: Return the java class. -
getObjectBuilder
INTERNAL: Return the object builder -
getPrimaryKeyFieldNames
PUBLIC: Return the names of all the primary keys. -
getPrimaryKeyFields
INTERNAL: Return all the primary key fields -
getTypedField
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:
-
setEventManager
INTERNAL: Set the event manager for the descriptor. The event manager is responsible for managing the pre/post selectors. -
setInheritancePolicy
INTERNAL: Sets the inheritance policy. -
setInstantiationPolicy
INTERNAL: Sets the instantiation policy. -
setJavaClass
PUBLIC: Set the Java class that this descriptor maps. Every descriptor maps one and only one class. -
setObjectBuilder
INTERNAL: Set the ObjectBuilder. -
setPrimaryKeyFieldNames
PUBLIC: User can specify a vector of all the primary key field names if primary key is composite. -
setPrimaryKeyFields
PUBLIC: User can specify a vector of all the primary key field names if primary key is composite.
-