Class AbstractColumnMapping
- java.lang.Object
-
- org.eclipse.persistence.core.mappings.CoreMapping<AttributeAccessor,org.eclipse.persistence.internal.sessions.AbstractSession,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField>
-
- org.eclipse.persistence.mappings.DatabaseMapping
-
- org.eclipse.persistence.mappings.foundation.AbstractColumnMapping
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
AbstractDirectMapping
,MultitenantPrimaryKeyMapping
public abstract class AbstractColumnMapping extends DatabaseMapping
Purpose: Maps an attribute or some other property to the corresponding database field type. The list of field types that are supported by EclipseLink's direct to field mapping is dependent on the relational database being used.- Since:
- TopLink/Java 1.0
- Author:
- Guy Pelletier
- See Also:
AbstractDirectMapping
,MultitenantPrimaryKeyMapping
, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping
DatabaseMapping.WriteType
-
-
Constructor Summary
Constructors Constructor Description AbstractColumnMapping()
Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
INTERNAL: Cascade perform delete through mappings that require the cascade.void
cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
INTERNAL: Cascade registerNew for Create through mappings that require the cascade.java.lang.Object
clone()
INTERNAL: The mapping clones itself to create deep copy.void
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings This method is implemented by subclasses as necessary.void
fixObjectReferences(java.lang.Object object, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query, DistributedSession session)
INTERNAL: An object has been serialized from the server to the client.Converter
getConverter()
PUBLIC: Return the converter on the mapping.org.eclipse.persistence.internal.helper.DatabaseField
getField()
INTERNAL: Returns the field which this mapping represents.abstract java.lang.Object
getFieldValue(java.lang.Object objectValue, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Convert the object (attribute or property) value to a field value.abstract java.lang.Object
getObjectValue(java.lang.Object fieldValue, Session session)
INTERNAL: Allows for subclasses to convert the the attribute or property value.boolean
hasConverter()
Indicates if the mapping has a converter set on it.boolean
isAbstractColumnMapping()
INTERNAL:void
iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
INTERNAL: Iterate on the appropriate attribute.void
setConverter(Converter converter)
PUBLIC: Set the converter on the mapping.void
setConverterClassName(java.lang.String converterClassName)
PUBLIC: Set the converter class name on the mapping.void
setField(org.eclipse.persistence.internal.helper.DatabaseField theField)
ADVANCED: Set the field in the mapping.java.lang.String
toString()
INTERNAL:-
Methods inherited from class org.eclipse.persistence.mappings.DatabaseMapping
addUnconvertedProperty, buildBackupClone, buildBackupCloneForPartObject, buildChangeRecord, buildClone, buildCloneForPartObject, buildCloneFromRow, buildContainerClone, buildCopy, buildExpression, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, collectQueryParameters, compareForChange, compareObjects, createCloneValueHolder, derivesId, earlyPreDelete, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getContainerPolicy, getDerivedIdMapping, getDescriptor, getFieldClassification, getFields, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getOrderByNormalizedExpressions, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getRealCollectionAttributeValueFromObject, getReferenceDescriptor, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasNestedIdentityReference, hasUnconvertedProperties, initialize, instantiateAttribute, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isAttributeValueFromObjectInstantiated, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isChangeTrackingSupported, isCloningRequired, isCollectionMapping, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isElementCollectionMapping, isForeignReferenceMapping, isInAndOutSopObject, isInOnlySopObject, isInSopObject, isJoiningSupported, isJPAId, isLazy, isLockableMapping, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isMultitenantPrimaryKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOutOnlySopObject, isOutSopObject, isOwned, isPrimaryKeyMapping, isPrivateOwned, isReadOnly, isReferenceMapping, isRelationalMapping, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, iterateOnRealAttributeValue, load, loadAll, mergeChangesIntoObject, mergeIntoObject, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postDelete, postInitialize, postInitializeSourceAndTargetExpressions, postInsert, postUpdate, preDelete, preInitialize, preInsert, prepareCascadeLockingPolicy, preUpdate, readFromResultSetIntoObject, readFromRowIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, remoteInitialization, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setGetMethodName, setIsCacheable, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, updateChangeRecord, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, valueFromRow, verifyDelete, writeFromAttributeIntoRow, writeFromObjectIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow, writeUpdateFieldsIntoRow
-
-
-
-
Method Detail
-
cascadePerformRemoveIfRequired
public void cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
INTERNAL: Cascade perform delete through mappings that require the cascade.- Specified by:
cascadePerformRemoveIfRequired
in classDatabaseMapping
-
cascadeRegisterNewIfRequired
public void cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
INTERNAL: Cascade registerNew for Create through mappings that require the cascade.- Specified by:
cascadeRegisterNewIfRequired
in classDatabaseMapping
-
clone
public java.lang.Object clone()
INTERNAL: The mapping clones itself to create deep copy.- Overrides:
clone
in classDatabaseMapping
-
convertClassNamesToClasses
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings This method is implemented by subclasses as necessary.- Overrides:
convertClassNamesToClasses
in classDatabaseMapping
-
fixObjectReferences
public void fixObjectReferences(java.lang.Object object, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query, DistributedSession session)
INTERNAL: An object has been serialized from the server to the client. Replace the transient attributes of the remote value holders with client-side objects.- Specified by:
fixObjectReferences
in classDatabaseMapping
-
getConverter
public Converter getConverter()
PUBLIC: Return the converter on the mapping. A converter can be used to convert between the object's value and database value of the attribute.
-
getField
public org.eclipse.persistence.internal.helper.DatabaseField getField()
INTERNAL: Returns the field which this mapping represents.- Overrides:
getField
in classDatabaseMapping
-
getFieldValue
public abstract java.lang.Object getFieldValue(java.lang.Object objectValue, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Convert the object (attribute or property) value to a field value.
-
getObjectValue
public abstract java.lang.Object getObjectValue(java.lang.Object fieldValue, Session session)
INTERNAL: Allows for subclasses to convert the the attribute or property value.
-
hasConverter
public boolean hasConverter()
Indicates if the mapping has a converter set on it.- Returns:
- true if there is a converter set on the mapping, false otherwise.
-
isAbstractColumnMapping
public boolean isAbstractColumnMapping()
INTERNAL:- Overrides:
isAbstractColumnMapping
in classDatabaseMapping
-
iterate
public void iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
INTERNAL: Iterate on the appropriate attribute.- Specified by:
iterate
in classDatabaseMapping
-
setConverter
public void setConverter(Converter converter)
PUBLIC: Set the converter on the mapping. A converter can be used to convert between the object's value and database value of the attribute.
-
setConverterClassName
public void setConverterClassName(java.lang.String converterClassName)
PUBLIC: Set the converter class name on the mapping. It will be instantiated during the convertClassNamesToClasses. A converter can be used to convert between the object's value and database value of the attribute.
-
setField
public void setField(org.eclipse.persistence.internal.helper.DatabaseField theField)
ADVANCED: Set the field in the mapping. This can be used for advanced field types, such as XML nodes, or to set the field type.
-
toString
public java.lang.String toString()
INTERNAL:- Overrides:
toString
in classDatabaseMapping
-
-