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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ATTRIBUTE_ACCESSORADVANCED: Return the attributeAccessor.abstract ClassPUBLIC: The classification type for the attribute this mapping representsabstract StringPUBLIC: Return the name of the attribute set in the mapping.abstract ObjectgetAttributeValueFromObject(Object object) INTERNAL: Return the value of an attribute which this mapping represents for an object.abstract CONTAINER_POLICYINTERNAL: Return the mapping's containerPolicy.abstract DESCRIPTORINTERNAL: Return the descriptor to which this mapping belongsabstract FIELDgetField()INTERNAL: Return the field associated with this mapping if there is exactly one.INTERNAL: Returns a vector of all the fields this mapping represents.abstract DESCRIPTORPUBLIC: Return the referenceDescriptor.abstract booleanINTERNAL: Related mapping should implement this method to return true.abstract booleanINTERNAL: Related mapping should implement this method to return true.abstract booleanINTERNAL: Related mapping should implement this method to return true.abstract booleanINTERNAL: Related mapping should implement this method to return true.abstract booleanINTERNAL: Related mapping should implement this method to return true.abstract booleanINTERNAL: Related mapping should implement this method to return true.abstract booleanINTERNAL: Returns true if mapping is read only else false.abstract booleanINTERNAL: Related mapping should implement this method to return true.abstract booleanINTERNAL: Related mapping should implement this method to return true.abstract booleanINTERNAL: Some mappings support no attribute (transformation and multitenant primary key).abstract voidsetAttributeAccessor(ATTRIBUTE_ACCESSOR attributeAccessor) ADVANCED: Set the attributeAccessor.abstract voidsetAttributeName(String attributeName) PUBLIC: Sets the name of the attribute in the mapping.abstract voidsetAttributeValueInObject(Object object, Object value) INTERNAL: Set the value of the attribute mapped by this mapping.abstract voidsetDescriptor(DESCRIPTOR descriptor) INTERNAL: Set the descriptor to which this mapping belongsprotected abstract voidINTERNAL: Set the mapping's field collection.abstract ObjectvalueFromObject(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.
-
Constructor Details
-
CoreMapping
public CoreMapping()
-
-
Method Details
-
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: The classification type for the attribute this mapping represents -
getAttributeName
PUBLIC: Return the name of the attribute set in the mapping. -
getAttributeValueFromObject
INTERNAL: Return the value of an attribute which this mapping represents for an object. -
getContainerPolicy
INTERNAL: Return the mapping's containerPolicy. -
getDescriptor
INTERNAL: Return the descriptor to which this mapping belongs -
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
INTERNAL: Returns a vector of all the fields this mapping represents. -
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
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: Sets the name of the attribute in the mapping. -
setAttributeValueInObject
INTERNAL: Set the value of the attribute mapped by this mapping. -
setDescriptor
INTERNAL: Set the descriptor to which this mapping belongs -
setFields
INTERNAL: Set the mapping's field collection. -
valueFromObject
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.
-