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>

  • 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.Serializable
    INTERNAL A abstraction of descriptor capturing behavior common to all persistence types.
    See Also:
    Serialized Form
    • Constructor Detail

      • CoreDescriptor

        public CoreDescriptor()
    • 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.
        See Also:
        ClassDescriptor.addPrimaryKeyFieldName(String)
      • 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.
        See Also:
        ClassDescriptor.addPrimaryKeyFieldName(String)