Class CoreMapping<ATTRIBUTE_ACCESSOR extends CoreAttributeAccessor,​ABSTRACT_SESSION extends org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​CONTAINER_POLICY extends org.eclipse.persistence.internal.core.queries.CoreContainerPolicy,​DESCRIPTOR extends CoreDescriptor,​FIELD extends org.eclipse.persistence.internal.core.helper.CoreField>

  • Direct Known Subclasses:
    DatabaseMapping

    public abstract class CoreMapping<ATTRIBUTE_ACCESSOR extends CoreAttributeAccessor,​ABSTRACT_SESSION extends org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​CONTAINER_POLICY extends org.eclipse.persistence.internal.core.queries.CoreContainerPolicy,​DESCRIPTOR extends CoreDescriptor,​FIELD extends org.eclipse.persistence.internal.core.helper.CoreField>
    extends java.lang.Object
    INTERNAL A abstraction of mapping capturing behavior common to all persistence types.
    • Constructor Summary

      Constructors 
      Constructor Description
      CoreMapping()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract ATTRIBUTE_ACCESSOR getAttributeAccessor()
      ADVANCED: Return the attributeAccessor.
      abstract java.lang.Class getAttributeClassification()
      PUBLIC: The classification type for the attribute this mapping represents
      abstract java.lang.String getAttributeName()
      PUBLIC: Return the name of the attribute set in the mapping.
      abstract java.lang.Object getAttributeValueFromObject​(java.lang.Object object)
      INTERNAL: Return the value of an attribute which this mapping represents for an object.
      abstract CONTAINER_POLICY getContainerPolicy()
      INTERNAL: Return the mapping's containerPolicy.
      abstract DESCRIPTOR getDescriptor()
      INTERNAL: Return the descriptor to which this mapping belongs
      abstract FIELD getField()
      INTERNAL: Return the field associated with this mapping if there is exactly one.
      abstract java.util.Vector<FIELD> getFields()
      INTERNAL: Returns a vector of all the fields this mapping represents.
      abstract DESCRIPTOR getReferenceDescriptor()
      PUBLIC: Return the referenceDescriptor.
      abstract boolean isAbstractCompositeCollectionMapping()
      INTERNAL: Related mapping should implement this method to return true.
      abstract boolean isAbstractCompositeDirectCollectionMapping()
      INTERNAL: Related mapping should implement this method to return true.
      abstract boolean isAbstractCompositeObjectMapping()
      INTERNAL: Related mapping should implement this method to return true.
      abstract boolean isAbstractDirectMapping()
      INTERNAL: Related mapping should implement this method to return true.
      abstract boolean isCollectionMapping()
      INTERNAL: Related mapping should implement this method to return true.
      abstract boolean isDirectToFieldMapping()
      INTERNAL: Related mapping should implement this method to return true.
      abstract boolean isReadOnly()
      INTERNAL: Returns true if mapping is read only else false.
      abstract boolean isReferenceMapping()
      INTERNAL: Related mapping should implement this method to return true.
      abstract boolean isTransformationMapping()
      INTERNAL: Related mapping should implement this method to return true.
      abstract boolean isWriteOnly()
      INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).
      abstract void setAttributeAccessor​(ATTRIBUTE_ACCESSOR attributeAccessor)
      ADVANCED: Set the attributeAccessor.
      abstract void setAttributeName​(java.lang.String attributeName)
      PUBLIC: Sets the name of the attribute in the mapping.
      abstract void setAttributeValueInObject​(java.lang.Object object, java.lang.Object value)
      INTERNAL: Set the value of the attribute mapped by this mapping.
      abstract void setDescriptor​(DESCRIPTOR descriptor)
      INTERNAL: Set the descriptor to which this mapping belongs
      protected abstract void setFields​(java.util.Vector<FIELD> fields)
      INTERNAL: Set the mapping's field collection.
      abstract java.lang.Object valueFromObject​(java.lang.Object anObject, FIELD field, ABSTRACT_SESSION session)
      INTERNAL: A subclass should extract the value from the object for the field, if it does not map the field then it should return null.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CoreMapping

        public CoreMapping()
    • Method Detail

      • getAttributeAccessor

        public abstract ATTRIBUTE_ACCESSOR getAttributeAccessor()
        ADVANCED: Return the attributeAccessor. The attribute accessor is responsible for setting and retrieving the attribute value from the object for this mapping.
      • getAttributeClassification

        public abstract java.lang.Class getAttributeClassification()
        PUBLIC: The classification type for the attribute this mapping represents
      • getAttributeName

        public abstract java.lang.String getAttributeName()
        PUBLIC: Return the name of the attribute set in the mapping.
      • getAttributeValueFromObject

        public abstract java.lang.Object getAttributeValueFromObject​(java.lang.Object object)
        INTERNAL: Return the value of an attribute which this mapping represents for an object.
      • getContainerPolicy

        public abstract CONTAINER_POLICY getContainerPolicy()
        INTERNAL: Return the mapping's containerPolicy.
      • getDescriptor

        public abstract DESCRIPTOR getDescriptor()
        INTERNAL: Return the descriptor to which this mapping belongs
      • getField

        public abstract FIELD getField()
        INTERNAL: Return the field associated with this mapping if there is exactly one. This is required for object relational mapping to print them, but because they are defined in in an Enterprise context they cannot be cast to. Mappings that have a field include direct mappings and object relational mappings.
      • getFields

        public abstract java.util.Vector<FIELD> getFields()
        INTERNAL: Returns a vector of all the fields this mapping represents.
      • getReferenceDescriptor

        public abstract DESCRIPTOR getReferenceDescriptor()
        PUBLIC: Return the referenceDescriptor. This is a descriptor which is associated with the reference class.
      • isAbstractCompositeCollectionMapping

        public abstract boolean isAbstractCompositeCollectionMapping()
        INTERNAL: Related mapping should implement this method to return true.
      • isAbstractCompositeDirectCollectionMapping

        public abstract boolean isAbstractCompositeDirectCollectionMapping()
        INTERNAL: Related mapping should implement this method to return true.
      • isAbstractCompositeObjectMapping

        public abstract boolean isAbstractCompositeObjectMapping()
        INTERNAL: Related mapping should implement this method to return true.
      • isAbstractDirectMapping

        public abstract boolean isAbstractDirectMapping()
        INTERNAL: Related mapping should implement this method to return true.
      • isCollectionMapping

        public abstract boolean isCollectionMapping()
        INTERNAL: Related mapping should implement this method to return true.
      • isDirectToFieldMapping

        public abstract boolean isDirectToFieldMapping()
        INTERNAL: Related mapping should implement this method to return true.
      • isReadOnly

        public abstract boolean isReadOnly()
        INTERNAL: Returns true if mapping is read only else false.
      • isReferenceMapping

        public abstract boolean isReferenceMapping()
        INTERNAL: Related mapping should implement this method to return true.
      • isTransformationMapping

        public abstract boolean isTransformationMapping()
        INTERNAL: Related mapping should implement this method to return true.
      • isWriteOnly

        public abstract boolean isWriteOnly()
        INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).
      • setAttributeAccessor

        public abstract void setAttributeAccessor​(ATTRIBUTE_ACCESSOR attributeAccessor)
        ADVANCED: Set the attributeAccessor. The attribute accessor is responsible for setting and retrieving the attribute value from the object for this mapping. This can be set to an implementor of AttributeAccessor if the attribute requires advanced conversion of the mapping value, or a real attribute does not exist.
      • setAttributeName

        public abstract void setAttributeName​(java.lang.String attributeName)
        PUBLIC: Sets the name of the attribute in the mapping.
      • setAttributeValueInObject

        public abstract void setAttributeValueInObject​(java.lang.Object object,
                                                       java.lang.Object value)
        INTERNAL: Set the value of the attribute mapped by this mapping.
      • setDescriptor

        public abstract void setDescriptor​(DESCRIPTOR descriptor)
        INTERNAL: Set the descriptor to which this mapping belongs
      • setFields

        protected abstract void setFields​(java.util.Vector<FIELD> fields)
        INTERNAL: Set the mapping's field collection.
      • valueFromObject

        public abstract java.lang.Object valueFromObject​(java.lang.Object anObject,
                                                         FIELD field,
                                                         ABSTRACT_SESSION session)
        INTERNAL: A subclass should extract the value from the object for the field, if it does not map the field then it should return null. Return the Value from the object.