Module eclipselink
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
FieldsModifier and TypeFieldDescriptionprotected Map<String, ATTRIBUTE_GROUP> protected DESCRIPTOR_EVENT_MANAGERprotected FIELDprotected INHERITANCE_POLICYprotected INSTANTIATION_POLICYprotected OBJECT_BUILDER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttributeGroup(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_MANAGERPUBLIC: Get the event manager for the descriptor.abstract INHERITANCE_POLICYPUBLIC: The inheritance policy is used to define how a descriptor takes part in inheritance.abstract INSTANTIATION_POLICYINTERNAL: Returns the instantiation policy.abstract <T> Class<T> PUBLIC: Return the java class.abstract OBJECT_BUILDERINTERNAL: Return the object builderPUBLIC: Return the names of all the primary keys.INTERNAL: Return all the primary key fieldsabstract FIELDgetTypedField(FIELD field) INTERNAL: searches first descriptor than its ReturningPolicy for an equal fieldabstract booleanINTERNAL: returns true if a DescriptorEventManager has been set.abstract booleanINTERNAL: 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(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 list of all the primary key field names if primary key is composite.abstract voidsetPrimaryKeyFields(List<FIELD> primaryKeyFields) PUBLIC: User can specify a list 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
protected CoreDescriptor()Default constructor.
-
-
Method Details
-
addAttributeGroup
Adds the attribute group to this descriptor. -
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 list of all the primary key field names if primary key is composite.- See Also:
-
setPrimaryKeyFields
PUBLIC: User can specify a list of all the primary key field names if primary key is composite.- See Also:
-