Top Description Fields Constructors Methods
org.eclipse.persistence.mappings.foundation

public abstract Class AbstractColumnMapping

extends DatabaseMapping
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.mappings.foundation.AbstractDirectMapping, org.eclipse.persistence.mappings.MultitenantPrimaryKeyMapping
Imports
java.security.AccessController, .PrivilegedActionException, java.util.*, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.internal.descriptors.DescriptorIterator, org.eclipse.persistence.internal.helper.DatabaseField, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedClassForName, .PrivilegedNewInstanceFromClass, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, .UnitOfWorkImpl, org.eclipse.persistence.internal.sessions.remote.ObjectDescriptor, org.eclipse.persistence.mappings.DatabaseMapping, org.eclipse.persistence.mappings.converters.Converter, org.eclipse.persistence.queries.ObjectLevelReadQuery, org.eclipse.persistence.sessions.Session, org.eclipse.persistence.sessions.remote.DistributedSession

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.
Author
Guy Pelletier
Since
TopLink/Java 1.0
See Also
org.eclipse.persistence.mappings.foundation.AbstractDirectMapping, org.eclipse.persistence.mappings.MultitenantPrimaryKeyMapping

Field Summary

Modifier and TypeField and Description
protected Converter
converter

Allows user defined conversion between the object attribute value and the database value.

protected String
protected DatabaseField
field

DatabaseField which this mapping represents.

protected boolean
isInsertable

Flag to support insertable JPA setting

protected boolean
isUpdatable

Flag to support updatable JPA setting

Inherited from org.eclipse.persistence.mappings.DatabaseMapping:
attributeAccessorattributeNamederivedIdMappingderivesIddescriptorfieldsisCacheableisInSopObjectisJPAIdisLazyisMapKeyMappingisOptionalisPrimaryKeyMappingisReadOnlyisRemotelyInitializedmapsIdValueNO_FIELDSNO_WEIGHTpropertiesunconvertedPropertiesweightWEIGHT_AGGREGATEWEIGHT_DIRECTWEIGHT_TO_ONEWEIGHT_TRANSFORM

Constructor Summary

AccessConstructor and Description
protected
AbstractColumnMapping()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public void
cascadePerformRemoveIfRequired(Object
TODO
object
,
UnitOfWorkImpl
TODO
uow
,
Map<K, V>
TODO
visitedObjects
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.cascadePerformRemoveIfRequired.

INTERNAL: Cascade perform delete through mappings that require the cascade.
public void
cascadeRegisterNewIfRequired(Object
TODO
object
,
UnitOfWorkImpl
TODO
uow
,
Map<K, V>
TODO
visitedObjects
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.cascadeRegisterNewIfRequired.

INTERNAL: Cascade registerNew for Create through mappings that require the cascade.
public Object
clone()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.clone.

INTERNAL: The mapping clones itself to create deep copy.
protected Vector<DatabaseField>
collectFields()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.collectFields.

Returns the field this mapping represents.
public void
convertClassNamesToClasses(ClassLoader
TODO
classLoader
)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.convertClassNamesToClasses.

INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings This method is implemented by subclasses as necessary.
public void
fixObjectReferences(Object
TODO
object
,
Map<Object, ObjectDescriptor>
TODO
objectDescriptors
,
Map<Object, Object>
TODO
processedObjects
,
ObjectLevelReadQuery
TODO
query
,
DistributedSession
TODO
session
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.fixObjectReferences.

INTERNAL: An object has been serialized from the server to the client.
public Converter
getConverter()

PUBLIC: Return the converter on the mapping.

public DatabaseField
getField()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getField.

INTERNAL: Returns the field which this mapping represents.
public abstract Object
getFieldValue(Object objectValue, AbstractSession session)

INTERNAL: Convert the object (attribute or property) value to a field value.

public abstract Object
getObjectValue(Object fieldValue, Session session)

INTERNAL: Allows for subclasses to convert the the attribute or property value.

public boolean

Returns:

true if there is a converter set on the mapping, false otherwise.
hasConverter
()

Indicates if the mapping has a converter set on it.

public boolean
protected boolean
isInsertable()

INTERNAL: Return true if this mapping is insertable.

protected boolean
isUpdatable()

INTERNAL: Return true if this mapping is updatable.

public void
iterate(DescriptorIterator iterator)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.iterate.

INTERNAL: Iterate on the appropriate attribute.
public void
setConverter(Converter converter)

PUBLIC: Set the converter on the mapping.

public void
setConverterClassName(String converterClassName)

PUBLIC: Set the converter class name on the mapping.

public void
setField(DatabaseField theField)

ADVANCED: Set the field in the mapping.

public String
protected abstract void
Inherited from org.eclipse.persistence.mappings.DatabaseMapping:
addUnconvertedPropertybuildBackupClonebuildBackupCloneForPartObjectbuildChangeRecordbuildClonebuildCloneForPartObjectbuildCloneFromRowbuildContainerClonebuildCopybuildExpressionbuildObjectJoinExpressionbuildObjectJoinExpressionbuildShallowOriginalFromRowcalculateDeferredChangescascadeDiscoverAndPersistUnregisteredNewObjectscascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequiredcloneFieldscollectQueryParameterscompareForChangecompareObjectsconvertConverterClassNamesToClassescreateCloneValueHolderderivesIdearlyPreDeleteextractNestedExpressionsextractNestedNonAggregateExpressionsfixRealObjectReferencesgetAttributeAccessorgetAttributeClassificationgetAttributeNamegetAttributeValueFromObjectgetContainerPolicygetDerivedIdMappinggetDescriptorgetFieldClassificationgetFieldsgetGetMethodNamegetMapsIdValuegetObjectCorrespondingTogetOrderByNormalizedExpressionsgetPropertiesgetPropertygetRealAttributeValueFromAttributegetRealAttributeValueFromObjectgetRealCollectionAttributeValueFromObjectgetReferenceDescriptorgetRelationshipPartnergetSelectFieldsgetSelectTablesgetSetMethodNamegetUnconvertedPropertiesgetValueFromRemoteValueHoldergetWeighthasConstraintDependencyhasDependencyhasInverseConstraintDependencyhasMapsIdValuehasNestedIdentityReferencehasRootExpressionThatShouldUseOuterJoinhasUnconvertedPropertiesinitializeinstantiateAttributeisAbstractCompositeCollectionMappingisAbstractCompositeDirectCollectionMappingisAbstractCompositeObjectMappingisAbstractDirectMappingisAggregateCollectionMappingisAggregateMappingisAggregateObjectMappingisAttributeValueFromObjectInstantiatedisCacheableisCandidateForPrivateOwnedRemovalisCascadedLockingSupportedisChangeTrackingSupportedisCloningRequiredisCollectionMappingisDatabaseMappingisDirectCollectionMappingisDirectMapMappingisDirectToFieldMappingisDirectToXMLTypeMappingisEISMappingisElementCollectionMappingisForeignReferenceMappingisInAndOutSopObjectisInOnlySopObjectisInSopObjectisJoiningSupportedisJPAIdisLazyisLockableMappingisManyToManyMappingisManyToOneMappingisMapKeyMappingisMultitenantPrimaryKeyMappingisNestedTableMappingisObjectReferenceMappingisOneToManyMappingisOneToOneMappingisOptionalisOutOnlySopObjectisOutSopObjectisOwnedisPrimaryKeyMappingisPrivateOwnedisReadOnlyisReferenceMappingisRelationalMappingisRemotelyInitializedisStructureMappingisTransformationMappingisUnidirectionalOneToManyMappingisUsingMethodAccessisVariableOneToOneMappingisWriteOnlyisXMLMappingiterateOnRealAttributeValueloadloadAllmergeChangesIntoObjectmergeIntoObjectperformDataModificationEventpostCalculateChangespostCalculateChangesOnDeletedpostDeletepostInitializepostInitializeSourceAndTargetExpressionspostInsertpostUpdatepreDeletepreInitializepreInsertprepareCascadeLockingPolicypreUpdatereadFromResultSetIntoObjectreadFromRowIntoObjectreadOnlyreadWriterecordPrivateOwnedRemovalsrehashFieldDependanciesremoteInitializationremotelyInitializedreplaceValueHoldersInsetAttributeAccessorsetAttributeNamesetAttributeValueInObjectsetChangeListenersetDerivedIdMappingsetDerivesIdsetDescriptorsetFieldssetGetMethodNamesetIsCacheablesetIsInAndOutSopObjectsetIsInSopObjectsetIsJPAIdsetIsLazysetIsMapKeyMappingsetIsOptionalsetIsOutSopObjectsetIsPrimaryKeyMappingsetIsReadOnlysetMapsIdValuesetPropertiessetPropertysetRealAttributeValueInObjectsetSetMethodNamesetWeightsimpleAddToCollectionChangeRecordsimpleRemoveFromCollectionChangeRecordupdateChangeRecordupdateCollectionChangeRecordvalidateAfterInitializationvalidateBeforeInitializationvalueFromObjectvalueFromResultSetvalueFromRowvalueFromRowverifyDeletewriteFromAttributeIntoRowwriteFromObjectIntoRowwriteFromObjectIntoRowForShallowInsertwriteFromObjectIntoRowForShallowInsertWithChangeRecordwriteFromObjectIntoRowForUpdatewriteFromObjectIntoRowForUpdateAfterShallowInsertwriteFromObjectIntoRowForUpdateBeforeShallowDeletewriteFromObjectIntoRowForWhereClausewriteFromObjectIntoRowWithChangeRecordwriteInsertFieldsIntoRowwriteUpdateFieldsIntoRow

Field Detail

converterback to summary
protected Converter converter

Allows user defined conversion between the object attribute value and the database value.

converterClassNameback to summary
protected String converterClassName
fieldback to summary
protected DatabaseField field

DatabaseField which this mapping represents.

isInsertableback to summary
protected boolean isInsertable

Flag to support insertable JPA setting

isUpdatableback to summary
protected boolean isUpdatable

Flag to support updatable JPA setting

Constructor Detail

AbstractColumnMappingback to summary
protected AbstractColumnMapping()

Default constructor.

Method Detail

cascadePerformRemoveIfRequiredback to summary
public void cascadePerformRemoveIfRequired(Object object, UnitOfWorkImpl uow, Map<K, V> visitedObjects)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.cascadePerformRemoveIfRequired.

INTERNAL: Cascade perform delete through mappings that require the cascade.

Parameters
object:Object

Doc from org.eclipse.persistence.mappings.DatabaseMapping.cascadePerformRemoveIfRequired.

TODO

uow:UnitOfWorkImpl

Doc from org.eclipse.persistence.mappings.DatabaseMapping.cascadePerformRemoveIfRequired.

TODO

visitedObjects:Map<K, V>

Doc from org.eclipse.persistence.mappings.DatabaseMapping.cascadePerformRemoveIfRequired.

TODO

Annotations
@Override
cascadeRegisterNewIfRequiredback to summary
public void cascadeRegisterNewIfRequired(Object object, UnitOfWorkImpl uow, Map<K, V> visitedObjects)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.cascadeRegisterNewIfRequired.

INTERNAL: Cascade registerNew for Create through mappings that require the cascade.

Parameters
object:Object

Doc from org.eclipse.persistence.mappings.DatabaseMapping.cascadeRegisterNewIfRequired.

TODO

uow:UnitOfWorkImpl

Doc from org.eclipse.persistence.mappings.DatabaseMapping.cascadeRegisterNewIfRequired.

TODO

visitedObjects:Map<K, V>

Doc from org.eclipse.persistence.mappings.DatabaseMapping.cascadeRegisterNewIfRequired.

TODO

Annotations
@Override
cloneback to summary
public Object clone()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.clone.

INTERNAL: The mapping clones itself to create deep copy.

Returns:Object

Doc from org.eclipse.persistence.mappings.DatabaseMapping.clone.

new instance of itself

Annotations
@Override
collectFieldsback to summary
protected Vector<DatabaseField> collectFields()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.collectFields.

Returns the field this mapping represents.

Returns:Vector<DatabaseField>

Doc from org.eclipse.persistence.mappings.DatabaseMapping.collectFields.

TODO

Annotations
@Override
convertClassNamesToClassesback to summary
public void convertClassNamesToClasses(ClassLoader classLoader)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.convertClassNamesToClasses.

INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings This method is implemented by subclasses as necessary.

Parameters
classLoader:ClassLoader

Doc from org.eclipse.persistence.mappings.DatabaseMapping.convertClassNamesToClasses.

TODO

Annotations
@Override
fixObjectReferencesback to summary
public void fixObjectReferences(Object object, Map<Object, ObjectDescriptor> objectDescriptors, Map<Object, Object> processedObjects, ObjectLevelReadQuery query, DistributedSession session)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.fixObjectReferences.

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.

Parameters
object:Object

Doc from org.eclipse.persistence.mappings.DatabaseMapping.fixObjectReferences.

TODO

objectDescriptors:Map<Object, ObjectDescriptor>

Doc from org.eclipse.persistence.mappings.DatabaseMapping.fixObjectReferences.

TODO

processedObjects:Map<Object, Object>

Doc from org.eclipse.persistence.mappings.DatabaseMapping.fixObjectReferences.

TODO

query:ObjectLevelReadQuery

Doc from org.eclipse.persistence.mappings.DatabaseMapping.fixObjectReferences.

TODO

session:DistributedSession

Doc from org.eclipse.persistence.mappings.DatabaseMapping.fixObjectReferences.

TODO

Annotations
@Override
getConverterback to summary
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.

getFieldback to summary
public DatabaseField getField()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getField.

INTERNAL: Returns the field which this mapping represents.

Returns:DatabaseField

Doc from org.eclipse.persistence.mappings.DatabaseMapping.getField.

TODO

Annotations
@Override
getFieldValueback to summary
public abstract Object getFieldValue(Object objectValue, AbstractSession session)

INTERNAL: Convert the object (attribute or property) value to a field value.

getObjectValueback to summary
public abstract Object getObjectValue(Object fieldValue, Session session)

INTERNAL: Allows for subclasses to convert the the attribute or property value.

hasConverterback to summary
public boolean hasConverter()

Indicates if the mapping has a converter set on it.

Returns:boolean

true if there is a converter set on the mapping, false otherwise.

isAbstractColumnMappingback to summary
public boolean isAbstractColumnMapping()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isAbstractColumnMapping.

INTERNAL:

Annotations
@Override
isInsertableback to summary
protected boolean isInsertable()

INTERNAL: Return true if this mapping is insertable.

isUpdatableback to summary
protected boolean isUpdatable()

INTERNAL: Return true if this mapping is updatable.

iterateback to summary
public void iterate(DescriptorIterator iterator)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.iterate.

INTERNAL: Iterate on the appropriate attribute.

Annotations
@Override
setConverterback to summary
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.

setConverterClassNameback to summary
public void setConverterClassName(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.

setFieldback to summary
public void setField(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.

toStringback to summary
public String toString()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.toString.

INTERNAL:

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.

Annotations
@Override
writeValueIntoRowback to summary
protected abstract void writeValueIntoRow(AbstractRecord row, DatabaseField field, Object value)

INTERNAL: