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:
Serializable,Cloneable
- Direct Known Subclasses:
AbstractDirectMapping,MultitenantPrimaryKeyMapping
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.
- See Also:
- Author:
- Guy Pelletier
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping
DatabaseMapping.WriteType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConverterAllows user defined conversion between the object attribute value and the database value.protected Stringprotected org.eclipse.persistence.internal.helper.DatabaseFieldDatabaseField which this mapping represents.protected booleanFlag to support insertable JPA settingprotected booleanFlag to support updatable JPA settingFields inherited from class org.eclipse.persistence.mappings.DatabaseMapping
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isCacheable, isInSopObject, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, unconvertedProperties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcascadePerformRemoveIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects) INTERNAL: Cascade perform delete through mappings that require the cascade.voidcascadeRegisterNewIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects) INTERNAL: Cascade registerNew for Create through mappings that require the cascade.clone()INTERNAL: The mapping clones itself to create deep copy.protected Vector<org.eclipse.persistence.internal.helper.DatabaseField>Returns the field this mapping represents.voidconvertClassNamesToClasses(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.voidfixObjectReferences(Object object, Map objectDescriptors, Map processedObjects, ObjectLevelReadQuery query, DistributedSession session) INTERNAL: An object has been serialized from the server to the client.PUBLIC: Return the converter on the mapping.org.eclipse.persistence.internal.helper.DatabaseFieldgetField()INTERNAL: Returns the field which this mapping represents.abstract ObjectgetFieldValue(Object objectValue, org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Convert the object (attribute or property) value to a field value.abstract ObjectgetObjectValue(Object fieldValue, Session session) INTERNAL: Allows for subclasses to convert the the attribute or property value.booleanIndicates if the mapping has a converter set on it.booleanINTERNAL:protected booleanINTERNAL: Return true if this mapping is insertable.protected booleanINTERNAL: Return true if this mapping is updatable.voiditerate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator) INTERNAL: Iterate on the appropriate attribute.voidsetConverter(Converter converter) PUBLIC: Set the converter on the mapping.voidsetConverterClassName(String converterClassName) PUBLIC: Set the converter class name on the mapping.voidsetField(org.eclipse.persistence.internal.helper.DatabaseField theField) ADVANCED: Set the field in the mapping.toString()INTERNAL:protected abstract voidwriteValueIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.helper.DatabaseField field, Object value) 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, cloneFields, collectQueryParameters, compareForChange, compareObjects, convertConverterClassNamesToClasses, createCloneValueHolder, derivesId, earlyPreDelete, extractNestedExpressions, extractNestedNonAggregateExpressions, 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, hasRootExpressionThatShouldUseOuterJoin, 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, isRemotelyInitialized, 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, remotelyInitialized, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setFields, 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
-
Field Details
-
field
protected org.eclipse.persistence.internal.helper.DatabaseField fieldDatabaseField which this mapping represents. -
converter
Allows user defined conversion between the object attribute value and the database value. -
converterClassName
-
isInsertable
protected boolean isInsertableFlag to support insertable JPA setting -
isUpdatable
protected boolean isUpdatableFlag to support updatable JPA setting
-
-
Constructor Details
-
AbstractColumnMapping
public AbstractColumnMapping()Default constructor.
-
-
Method Details
-
cascadePerformRemoveIfRequired
public void cascadePerformRemoveIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects) INTERNAL: Cascade perform delete through mappings that require the cascade.- Specified by:
cascadePerformRemoveIfRequiredin classDatabaseMapping
-
cascadeRegisterNewIfRequired
public void cascadeRegisterNewIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects) INTERNAL: Cascade registerNew for Create through mappings that require the cascade.- Specified by:
cascadeRegisterNewIfRequiredin classDatabaseMapping
-
clone
INTERNAL: The mapping clones itself to create deep copy.- Overrides:
clonein classDatabaseMapping
-
collectFields
Returns the field this mapping represents.- Overrides:
collectFieldsin classDatabaseMapping
-
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.- Overrides:
convertClassNamesToClassesin classDatabaseMapping
-
fixObjectReferences
public void fixObjectReferences(Object object, Map objectDescriptors, 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:
fixObjectReferencesin classDatabaseMapping
-
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:
getFieldin classDatabaseMapping
-
getFieldValue
public abstract Object getFieldValue(Object objectValue, org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Convert the object (attribute or property) value to a field value. -
getObjectValue
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:
isAbstractColumnMappingin classDatabaseMapping
-
isInsertable
protected boolean isInsertable()INTERNAL: Return true if this mapping is insertable. -
isUpdatable
protected boolean isUpdatable()INTERNAL: Return true if this mapping is updatable. -
iterate
public void iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator) INTERNAL: Iterate on the appropriate attribute.- Specified by:
iteratein classDatabaseMapping
-
setConverter
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: 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
INTERNAL:- Overrides:
toStringin classDatabaseMapping
-
writeValueIntoRow
protected abstract void writeValueIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.helper.DatabaseField field, Object value) INTERNAL:
-