public abstract class AbstractCompositeObjectMapping extends AggregateMapping
DatabaseMapping.WriteType
Modifier and Type | Field and Description |
---|---|
protected Converter |
converter
Allows user defined conversion between the object attribute value and the database value.
|
protected org.eclipse.persistence.internal.helper.DatabaseField |
field
The aggregate object is stored in a single field.
|
hasNestedIdentityReference, referenceClass, referenceClassName, referenceDescriptor
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 and Description |
---|
AbstractCompositeObjectMapping()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract java.lang.Object |
buildCompositeObject(org.eclipse.persistence.internal.descriptors.ObjectBuilder objectBuilder,
org.eclipse.persistence.internal.sessions.AbstractRecord nestedRow,
ObjectBuildingQuery query,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManger,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession) |
protected abstract java.lang.Object |
buildCompositeRow(java.lang.Object attributeValue,
org.eclipse.persistence.internal.sessions.AbstractSession session,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
DatabaseMapping.WriteType writeType) |
Expression |
buildExpression(java.lang.Object queryObject,
QueryByExamplePolicy policy,
Expression expressionBuilder,
java.util.Map processedObjects,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
In case Query By Example is used, this method builds and returns an expression that
corresponds to a single attribute and it's value.
|
void |
buildShallowOriginalFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
java.lang.Object original,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL:
Builds a shallow original object.
|
void |
cascadeDiscoverAndPersistUnregisteredNewObjects(java.lang.Object object,
java.util.Map newObjects,
java.util.Map unregisteredExistingObjects,
java.util.Map visitedObjects,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Set cascadeErrors)
INTERNAL:
Cascade discover and persist new objects during commit.
|
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
|
protected java.util.Vector |
collectFields()
Return the fields mapped by the mapping.
|
Converter |
getConverter()
PUBLIC:
Return the converter on the mapping.
|
org.eclipse.persistence.internal.helper.DatabaseField |
getField()
INTERNAL:
The aggregate object is held in a single field.
|
boolean |
hasConverter()
PUBLIC:
Indicates if there is a converter on the mapping.
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initialize the mapping.
|
boolean |
isAbstractCompositeObjectMapping()
INTERNAL:
|
void |
setAttributeValueInObject(java.lang.Object object,
java.lang.Object value)
INTERNAL:
Set the value of the attribute mapped by this mapping.
|
void |
setConverter(Converter converter)
PUBLIC:
Set the converter on the mapping.
|
void |
setField(org.eclipse.persistence.internal.helper.DatabaseField field)
The aggregate object is held in a single field.
|
java.lang.Object |
valueFromObject(java.lang.Object object,
org.eclipse.persistence.internal.helper.DatabaseField field,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Extract and return value of the field from the object
|
java.lang.Object |
valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean isTargetProtected,
java.lang.Boolean[] wasCacheUsed)
INTERNAL:
Extract and return the aggregate object from
the specified row.
|
void |
writeFromObjectIntoRow(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session,
DatabaseMapping.WriteType writeType)
INTERNAL:
Build the value for the database field and put it in the
specified database row.
|
void |
writeFromObjectIntoRowForUpdate(WriteObjectQuery query,
org.eclipse.persistence.internal.sessions.AbstractRecord row)
INTERNAL:
If it has changed, build the value for the database field and put it in the
specified database row.
|
void |
writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session,
DatabaseMapping.WriteType writeType)
INTERNAL:
Get the attribute value from the object and add the appropriate
values to the specified database row.
|
void |
writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Write fields needed for insert into the template for with null values.
|
buildAggregateDeleteQuery, buildAggregateModifyQuery, buildAggregateWriteQuery, buildBackupClone, buildBackupClonePart, buildClone, buildCloneFromRow, buildClonePart, buildClonePart, buildCopy, buildCopyOfAttributeValue, buildNewMergeInstanceOf, compareAttributeValues, compareForChange, compareObjects, convertClassNamesToClasses, executeEvent, fixAttributeValue, fixObjectReferences, getAttributeValueFromBackupClone, getObjectBuilder, getObjectBuilderForClass, getQueryManager, getReferenceClass, getReferenceClassName, getReferenceDescriptor, getReferenceDescriptor, getReferenceDescriptor, hasNestedIdentityReference, isAggregateMapping, iterate, iterateOnAttributeValue, load, loadAll, mergeAttributeValue, mergeChangesIntoObject, mergeIntoObject, postDelete, postDeleteAttributeValue, postInsert, postInsertAttributeValue, postUpdate, postUpdateAttributeValue, preDelete, preDeleteAttributeValue, preInsert, preInsertAttributeValue, preUpdate, preUpdateAttributeValue, remoteInitialization, setReferenceClass, setReferenceClassName, setReferenceDescriptor, updateChangeRecord, verifyDelete, verifyDeleteOfAttributeValue
addUnconvertedProperty, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, buildObjectJoinExpression, buildObjectJoinExpression, calculateDeferredChanges, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, clone, cloneFields, collectQueryParameters, 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, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, instantiateAttribute, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractDirectMapping, isAggregateCollectionMapping, 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, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postInitialize, postInitializeSourceAndTargetExpressions, preInitialize, prepareCascadeLockingPolicy, readFromResultSetIntoObject, readFromRowIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, remotelyInitialized, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setFields, setGetMethodName, setIsCacheable, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, toString, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromResultSet, valueFromRow, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeUpdateFieldsIntoRow
protected org.eclipse.persistence.internal.helper.DatabaseField field
protected Converter converter
public AbstractCompositeObjectMapping()
public void cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
cascadePerformRemoveIfRequired
in class DatabaseMapping
public void cascadeDiscoverAndPersistUnregisteredNewObjects(java.lang.Object object, java.util.Map newObjects, java.util.Map unregisteredExistingObjects, java.util.Map visitedObjects, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Set cascadeErrors)
cascadeDiscoverAndPersistUnregisteredNewObjects
in class DatabaseMapping
public void cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
cascadeRegisterNewIfRequired
in class DatabaseMapping
protected java.util.Vector collectFields()
collectFields
in class DatabaseMapping
public Converter getConverter()
public org.eclipse.persistence.internal.helper.DatabaseField getField()
getField
in class DatabaseMapping
public boolean hasConverter()
public boolean isAbstractCompositeObjectMapping()
isAbstractCompositeObjectMapping
in class DatabaseMapping
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
initialize
in class AggregateMapping
DescriptorException
public void setAttributeValueInObject(java.lang.Object object, java.lang.Object value) throws DescriptorException
setAttributeValueInObject
in class DatabaseMapping
DescriptorException
public void setConverter(Converter converter)
public void setField(org.eclipse.persistence.internal.helper.DatabaseField field)
public java.lang.Object valueFromObject(java.lang.Object object, org.eclipse.persistence.internal.helper.DatabaseField field, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
valueFromObject
in class DatabaseMapping
DescriptorException
public java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected, java.lang.Boolean[] wasCacheUsed) throws DatabaseException
valueFromRow
in class DatabaseMapping
DatabaseException
public void buildShallowOriginalFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, java.lang.Object original, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
buildShallowOriginalFromRow
in class DatabaseMapping
protected abstract java.lang.Object buildCompositeObject(org.eclipse.persistence.internal.descriptors.ObjectBuilder objectBuilder, org.eclipse.persistence.internal.sessions.AbstractRecord nestedRow, ObjectBuildingQuery query, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManger, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
public void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorException
writeFromObjectIntoRow
in class DatabaseMapping
DescriptorException
protected abstract java.lang.Object buildCompositeRow(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord record, DatabaseMapping.WriteType writeType)
public Expression buildExpression(java.lang.Object queryObject, QueryByExamplePolicy policy, Expression expressionBuilder, java.util.Map processedObjects, org.eclipse.persistence.internal.sessions.AbstractSession session)
buildExpression
in class AggregateMapping
public void writeFromObjectIntoRowForUpdate(WriteObjectQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord row) throws DescriptorException
writeFromObjectIntoRowForUpdate
in class DatabaseMapping
DescriptorException
public void writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorException
writeFromObjectIntoRowWithChangeRecord
in class DatabaseMapping
DescriptorException
public void writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)
writeInsertFieldsIntoRow
in class DatabaseMapping