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>

java.lang.Object
org.eclipse.persistence.core.mappings.CoreMapping<ATTRIBUTE_ACCESSOR,ABSTRACT_SESSION,CONTAINER_POLICY,DESCRIPTOR,FIELD>
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 Object
INTERNAL A abstraction of mapping capturing behavior common to all persistence types.
  • Constructor Details

    • CoreMapping

      public CoreMapping()
  • Method Details

    • 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 Class getAttributeClassification()
      PUBLIC: The classification type for the attribute this mapping represents
    • getAttributeName

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

      public abstract Object getAttributeValueFromObject(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 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(String attributeName)
      PUBLIC: Sets the name of the attribute in the mapping.
    • setAttributeValueInObject

      public abstract void setAttributeValueInObject(Object object, 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(Vector<FIELD> fields)
      INTERNAL: Set the mapping's field collection.
    • valueFromObject

      public abstract Object valueFromObject(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.