Package org.eclipse.persistence.mappings
Class VariableOneToOneMapping
- 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.ForeignReferenceMapping
-
- org.eclipse.persistence.mappings.ObjectReferenceMapping
-
- org.eclipse.persistence.mappings.VariableOneToOneMapping
-
- All Implemented Interfaces:
Serializable,Cloneable,RelationalMapping
public class VariableOneToOneMapping extends ObjectReferenceMapping implements RelationalMapping
Purpose: Variable one to one mappings are used to represent a pointer references between a java object and an implementer of an interface. This mapping is usually represented by a single pointer (stored in an instance variable) between the source and target objects. In the relational database tables, these mappings are normally implemented using a foreign key and a type code.
- Since:
- TOPLink/Java 2.0
- Author:
- Sati
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping
DatabaseMapping.WriteType
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.mappings.ForeignReferenceMapping
INNER_JOIN, NONE, OUTER_JOIN, QUERY_BATCH_PARAMETER
-
-
Constructor Summary
Constructors Constructor Description VariableOneToOneMapping()PUBLIC: Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddClassIndicator(Class implementer, Object typeIndicator)PUBLIC: Add a type indicator conversion to this mapping.voidaddClassNameIndicator(String className, Object typeIndicator)INTERNAL: Add indicators by classname.voidaddForeignQueryKeyName(String sourceForeignKeyFieldName, String targetQueryKeyName)PUBLIC: A foreign key from the source table and abstract query key from the interface descriptor are added to the mapping.voidaddForeignQueryKeyName(org.eclipse.persistence.internal.helper.DatabaseField sourceForeignKeyField, String targetQueryKeyName)PUBLIC: A foreign key from the source table and abstract query key from the interface descriptor are added to the mapping.voidaddTargetForeignQueryKeyName(String targetForeignQueryKeyName, String sourcePrimaryKeyFieldName)PUBLIC: Define the target foreign key relationship in the Variable 1-1 mapping.Objectclone()INTERNAL: This methods clones all the fields and ensures that each collection refers to the same clones.voidconvertClassNamesToClasses(ClassLoader classLoader)INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings.VectorgetClassIndicatorAssociations()INTERNAL: Return the class indicator associations for XML.ClassDescriptorgetDescriptorForTarget(Object targetObject, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Return a descriptor for the target of this mapping For normal ObjectReferenceMappings, we return the reference descriptor.ClassgetFieldClassification(org.eclipse.persistence.internal.helper.DatabaseField fieldToClassify)INTERNAL: Return the classification for the field contained in the mapping.VectorgetForeignKeyFieldNames()PUBLIC: Return the foreign key field names associated with the mapping.VectorgetSourceToTargetQueryKeyFieldAssociations()PUBLIC: Return a collection of the field to query key associations.MapgetSourceToTargetQueryKeyNames()INTERNAL: Returns the source keys to target keys fields association.org.eclipse.persistence.internal.helper.DatabaseFieldgetTypeField()StringgetTypeFieldName()PUBLIC: This method returns the name of the typeField of the mapping.MapgetTypeIndicatorNameTranslation()INTERNAL: Return the typeIndicatorName translation Used by the Mapping Workbench to avoid classpath dependenciesMapgetTypeIndicatorTranslation()INTERNAL: Return the type indicators.voidinitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Initialize the mapping.voidinitializeSelectionCriteria(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Selection criteria is created with source foreign keys and target keys.booleanisRelationalMapping()INTERNAL:booleanisVariableOneToOneMapping()INTERNAL:voidpreInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Set the type field classification through searching the indicators hashtable.voidrehashFieldDependancies(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Rehash any maps based on fields.voidsetClassIndicatorAssociations(Vector classIndicatorAssociations)PUBLIC: Set the class indicator associations.voidsetForeignKeyFieldNames(Vector fieldNames)PUBLIC: Return the foreign key field names associated with the mapping.voidsetForeignQueryKeyName(String sourceForeignKeyFieldName, String targetQueryKeyName)PUBLIC: A foreign key from the source table and abstract query key from the interface descriptor are added to the mapping.voidsetSourceToTargetQueryKeyFieldAssociations(Vector sourceToTargetQueryKeyFieldAssociations)PUBLIC: Set a collection of the source to target query key/field associations.voidsetTypeField(org.eclipse.persistence.internal.helper.DatabaseField typeField)INTERNAL: This method set the typeField of the mapping to the parameter fieldvoidsetTypeFieldName(String typeFieldName)PUBLIC: This method sets the name of the typeField of the mapping.ObjectvalueFromObject(Object object, org.eclipse.persistence.internal.helper.DatabaseField field, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Get a value from the object and set that in the respective field of the row.ObjectvalueFromRow(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, Boolean[] wasCacheUsed)INTERNAL: Return the value of the field from the row or a value holder on the query to obtain the object.voidwriteFromObjectIntoRow(Object object, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)INTERNAL: Get a value from the object and set that in the respective field of the row.voidwriteFromObjectIntoRowForShallowInsert(Object object, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts.voidwriteFromObjectIntoRowForShallowInsertWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts.voidwriteFromObjectIntoRowForUpdateAfterShallowInsert(Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.helper.DatabaseTable table)INTERNAL: This row is built for update after shallow insert which happens in case of bidirectional inserts.voidwriteFromObjectIntoRowForWhereClause(ObjectLevelModifyQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord record)INTERNAL: Get a value from the object and set that in the respective field of the row.voidwriteFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)INTERNAL: Get a value from the object and set that in the respective field of the row.voidwriteInsertFieldsIntoRow(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.-
Methods inherited from class org.eclipse.persistence.mappings.ObjectReferenceMapping
buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildCopy, buildExpression, buildReferencesPKList, buildTargetInterfaces, buildUnitofWorkCloneForPartObject, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemoveIfRequired, cascadePerformRemoveIfRequired, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, cascadeRegisterNewIfRequired, cascadeRegisterNewIfRequired, collectQueryParameters, compareForChange, createCloneValueHolder, earlyPreDelete, extractPrimaryKeyRowForSourceObject, extractPrimaryKeysForReferenceObject, extractPrimaryKeysForReferenceObjectFromRow, extractPrimaryKeysFromRealReferenceObject, fixRealObjectReferences, getForeignKeyFields, getRealAttributeValueFromAttribute, hasConstraintDependency, hasRelationTableMechanism, internalBuildChangeRecord, isChangeTrackingSupported, isForeignKeyRelationship, isObjectReferenceMapping, iterateOnRealAttributeValue, loadAll, mergeChangesIntoObject, mergeIntoObject, postCalculateChanges, postDelete, postInsert, postUpdate, preDelete, preInsert, preUpdate, recordPrivateOwnedRemovals, setIsForeignKeyRelationship, setNewValueInChangeRecord, updateChangeRecord, updateChangeRecordForSelfMerge, useProxyIndirection, useProxyIndirection, useProxyIndirection, valueFromPKList, verifyDelete, writeFromObjectIntoRowForUpdate
-
Methods inherited from class org.eclipse.persistence.mappings.ForeignReferenceMapping
addForeignKeyField, addTargetForeignKeyField, buildBackupClone, buildClone, buildCloneFromRow, compareObjects, dontUseBatchReading, dontUseIndirection, extendPessimisticLockScopeInSourceQuery, extractResultFromBatchQuery, fixObjectReferences, getAttributeValueFromObject, getAttributeValueWithClonedValueHolders, getBatchFetchType, getFieldsForTranslationInAggregate, getIndirectionPolicy, getJoinCriteria, getJoinFetch, getMappedBy, getObjectCorrespondingTo, getOrderByNormalizedExpressions, getPartitioningPolicy, getPartitioningPolicyName, getReferenceClass, getReferenceClassName, getReferenceDescriptor, getRelationshipPartner, getRelationshipPartnerAttributeName, getSelectionCriteria, getSelectionQuery, getValueFromRemoteValueHolder, hasCustomSelectionQuery, hasDependency, hasNestedIdentityReference, instantiateAttribute, isAttributeValueFromObjectInstantiated, isAttributeValueFullyBuilt, isAttributeValueInstantiated, isCascadeDetach, isCascadeMerge, isCascadeOnDeleteSetOnDatabase, isCascadePersist, isCascadeRefresh, isCascadeRemove, isForeignReferenceMapping, isInnerJoinFetched, isJoinFetched, isJoiningSupported, isLazy, isLockableMapping, isOuterJoinFetched, isPrivateOwned, iterate, load, mergeRemoteValueHolder, prepareNestedBatchQuery, prepareNestedJoins, privateOwnedRelationship, readFromRowIntoObject, remoteInitialization, replaceValueHoldersIn, requiresTransientWeavedFields, setBatchFetchType, setCascadeAll, setCascadeDetach, setCascadeMerge, setCascadePersist, setCascadeRefresh, setCascadeRemove, setCustomSelectionQuery, setForceInitializationOfSelectionCriteria, setIndirectionPolicy, setIsCacheable, setIsCascadeOnDeleteSetOnDatabase, setIsPrivateOwned, setJoinFetch, setMappedBy, setPartitioningPolicy, setPartitioningPolicyName, setRealAttributeValueInObject, setReferenceClass, setReferenceClassName, setRelationshipPartner, setRelationshipPartnerAttributeName, setRequiresTransientWeavedFields, setSelectionCall, setSelectionCriteria, setSelectionSQLString, setShouldExtendPessimisticLockScope, setUsesBatchReading, setUsesIndirection, shouldExtendPessimisticLockScope, shouldExtendPessimisticLockScopeInDedicatedQuery, shouldExtendPessimisticLockScopeInSourceQuery, shouldExtendPessimisticLockScopeInTargetQuery, shouldMergeCascadeParts, shouldRefreshCascadeParts, shouldUseBatchReading, trimRowForJoin, trimRowForJoin, useBasicIndirection, useBatchReading, useContainerIndirection, useInnerJoinFetch, useOuterJoinFetch, usesIndirection, useWeavedIndirection, validateBeforeInitialization
-
Methods inherited from class org.eclipse.persistence.mappings.DatabaseMapping
addUnconvertedProperty, buildContainerClone, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, derivesId, getAttributeAccessor, getAttributeClassification, getAttributeName, getContainerPolicy, getDerivedIdMapping, getDescriptor, getField, getFields, getGetMethodName, getMapsIdValue, getProperties, getProperty, getRealAttributeValueFromObject, getRealCollectionAttributeValueFromObject, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getWeight, hasInverseConstraintDependency, hasMapsIdValue, hasUnconvertedProperties, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isCloningRequired, isCollectionMapping, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isElementCollectionMapping, isInAndOutSopObject, isInOnlySopObject, isInSopObject, isJPAId, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isMultitenantPrimaryKeyMapping, isNestedTableMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOutOnlySopObject, isOutSopObject, isOwned, isPrimaryKeyMapping, isReadOnly, isReferenceMapping, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isWriteOnly, isXMLMapping, performDataModificationEvent, postCalculateChangesOnDeleted, postInitialize, postInitializeSourceAndTargetExpressions, prepareCascadeLockingPolicy, readFromResultSetIntoObject, readOnly, readWrite, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setGetMethodName, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, toString, updateCollectionChangeRecord, validateAfterInitialization, valueFromResultSet, valueFromRow, writeFromAttributeIntoRow, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeUpdateFieldsIntoRow
-
-
-
-
Method Detail
-
isRelationalMapping
public boolean isRelationalMapping()
INTERNAL:- Overrides:
isRelationalMappingin classDatabaseMapping
-
addClassIndicator
public void addClassIndicator(Class implementer, Object typeIndicator)
PUBLIC: Add a type indicator conversion to this mapping.
-
addClassNameIndicator
public void addClassNameIndicator(String className, Object typeIndicator)
INTERNAL: Add indicators by classname. For use by the Mapping Workbench to avoid classpath dependencies
-
addForeignQueryKeyName
public void addForeignQueryKeyName(org.eclipse.persistence.internal.helper.DatabaseField sourceForeignKeyField, String targetQueryKeyName)PUBLIC: A foreign key from the source table and abstract query key from the interface descriptor are added to the mapping. This method is used if there are multiple foreign keys.
-
addForeignQueryKeyName
public void addForeignQueryKeyName(String sourceForeignKeyFieldName, String targetQueryKeyName)
PUBLIC: A foreign key from the source table and abstract query key from the interface descriptor are added to the mapping. This method is used if there are multiple foreign keys.
-
addTargetForeignQueryKeyName
public void addTargetForeignQueryKeyName(String targetForeignQueryKeyName, String sourcePrimaryKeyFieldName)
PUBLIC: Define the target foreign key relationship in the Variable 1-1 mapping. This method is used for composite target foreign key relationships, that is the target object's table has multiple foreign key fields to the source object's primary key fields. Both the target foreign key query name and the source primary key field name must be specified. The distinction between a foreign key and target foreign key is that the variable 1-1 mapping will not populate the target foreign key value when written (because it is in the target table). Normally 1-1's are through foreign keys but in bi-directional 1-1's the back reference will be a target foreign key. In obscure composite legacy data models a 1-1 may consist of a foreign key part and a target foreign key part, in this case both method will be called with the correct parts.
-
clone
public Object clone()
INTERNAL: This methods clones all the fields and ensures that each collection refers to the same clones.- Overrides:
clonein classForeignReferenceMapping
-
getClassIndicatorAssociations
public Vector getClassIndicatorAssociations()
INTERNAL: Return the class indicator associations for XML. List of class-name/value associations.
-
getDescriptorForTarget
public ClassDescriptor getDescriptorForTarget(Object targetObject, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Return a descriptor for the target of this mapping For normal ObjectReferenceMappings, we return the reference descriptor. For a VariableOneToOneMapping, the reference descriptor is often a descriptor for an interface and does not contain adequate information. As a result, we look up the descriptor for the specific class we are looking for Bug 2612571- Overrides:
getDescriptorForTargetin classObjectReferenceMapping- See Also:
Bug 2612571
-
getFieldClassification
public Class getFieldClassification(org.eclipse.persistence.internal.helper.DatabaseField fieldToClassify)
INTERNAL: Return the classification for the field contained in the mapping. This is used to convert the row value to a consistent java value.- Overrides:
getFieldClassificationin classDatabaseMapping
-
getForeignKeyFieldNames
public Vector getForeignKeyFieldNames()
PUBLIC: Return the foreign key field names associated with the mapping. These are only the source fields that are writable.
-
getSourceToTargetQueryKeyFieldAssociations
public Vector getSourceToTargetQueryKeyFieldAssociations()
PUBLIC: Return a collection of the field to query key associations.
-
getSourceToTargetQueryKeyNames
public Map getSourceToTargetQueryKeyNames()
INTERNAL: Returns the source keys to target keys fields association.
-
getTypeField
public org.eclipse.persistence.internal.helper.DatabaseField getTypeField()
-
getTypeFieldName
public String getTypeFieldName()
PUBLIC: This method returns the name of the typeField of the mapping. The type field is used to store the type of object the relationship is referencing.
-
getTypeIndicatorTranslation
public Map getTypeIndicatorTranslation()
INTERNAL: Return the type indicators.
-
getTypeIndicatorNameTranslation
public Map getTypeIndicatorNameTranslation()
INTERNAL: Return the typeIndicatorName translation Used by the Mapping Workbench to avoid classpath dependencies
-
convertClassNamesToClasses
public void convertClassNamesToClasses(ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.- Overrides:
convertClassNamesToClassesin classForeignReferenceMapping
-
initialize
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the mapping.- Overrides:
initializein classForeignReferenceMapping
-
initializeSelectionCriteria
public void initializeSelectionCriteria(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Selection criteria is created with source foreign keys and target keys. This criteria is then used to read target records from the table.
-
isVariableOneToOneMapping
public boolean isVariableOneToOneMapping()
INTERNAL:- Overrides:
isVariableOneToOneMappingin classDatabaseMapping
-
preInitialize
public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionINTERNAL: Set the type field classification through searching the indicators hashtable.- Overrides:
preInitializein classObjectReferenceMapping- Throws:
DescriptorException
-
rehashFieldDependancies
public void rehashFieldDependancies(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Rehash any maps based on fields. This is used to clone descriptors for aggregates, which hammer field names.- Overrides:
rehashFieldDependanciesin classDatabaseMapping
-
setClassIndicatorAssociations
public void setClassIndicatorAssociations(Vector classIndicatorAssociations)
PUBLIC: Set the class indicator associations.
-
setForeignKeyFieldNames
public void setForeignKeyFieldNames(Vector fieldNames)
PUBLIC: Return the foreign key field names associated with the mapping. These are only the source fields that are writable.
-
setForeignQueryKeyName
public void setForeignQueryKeyName(String sourceForeignKeyFieldName, String targetQueryKeyName)
PUBLIC: A foreign key from the source table and abstract query key from the interface descriptor are added to the mapping. This method is used if foreign key is not composite.
-
setSourceToTargetQueryKeyFieldAssociations
public void setSourceToTargetQueryKeyFieldAssociations(Vector sourceToTargetQueryKeyFieldAssociations)
PUBLIC: Set a collection of the source to target query key/field associations.
-
setTypeField
public void setTypeField(org.eclipse.persistence.internal.helper.DatabaseField typeField)
INTERNAL: This method set the typeField of the mapping to the parameter field
-
setTypeFieldName
public void setTypeFieldName(String typeFieldName)
PUBLIC: This method sets the name of the typeField of the mapping. The type field is used to store the type of object the relationship is referencing.
-
valueFromObject
public Object valueFromObject(Object object, org.eclipse.persistence.internal.helper.DatabaseField field, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Get a value from the object and set that in the respective field of the row.- Overrides:
valueFromObjectin classDatabaseMapping
-
valueFromRow
public 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, Boolean[] wasCacheUsed) throws DatabaseException
INTERNAL: Return the value of the field from the row or a value holder on the query to obtain the object. Check for batch + aggregation reading.- Overrides:
valueFromRowin classForeignReferenceMapping- Throws:
DatabaseException
-
writeFromObjectIntoRow
public void writeFromObjectIntoRow(Object object, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)
INTERNAL: Get a value from the object and set that in the respective field of the row. If the mapping id target foreign key, you must only write the type into the roe, the rest will be updated when the object itself is written- Overrides:
writeFromObjectIntoRowin classDatabaseMapping
-
writeFromObjectIntoRowWithChangeRecord
public void writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)INTERNAL: Get a value from the object and set that in the respective field of the row. If the mapping id target foreign key, you must only write the type into the roe, the rest will be updated when the object itself is written- Overrides:
writeFromObjectIntoRowWithChangeRecordin classDatabaseMapping
-
writeFromObjectIntoRowForShallowInsert
public void writeFromObjectIntoRowForShallowInsert(Object object, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts. The foreign keys must be set to null to avoid constraints.- Overrides:
writeFromObjectIntoRowForShallowInsertin classDatabaseMapping
-
writeFromObjectIntoRowForUpdateAfterShallowInsert
public void writeFromObjectIntoRowForUpdateAfterShallowInsert(Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.helper.DatabaseTable table)
INTERNAL: This row is built for update after shallow insert which happens in case of bidirectional inserts. It contains the foreign keys with non null values that were set to null for shallow insert. If mapping overrides writeFromObjectIntoRowForShallowInsert method it must override this one, too.- Overrides:
writeFromObjectIntoRowForUpdateAfterShallowInsertin classDatabaseMapping
-
writeFromObjectIntoRowForShallowInsertWithChangeRecord
public void writeFromObjectIntoRowForShallowInsertWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts. The foreign keys must be set to null to avoid constraints.- Overrides:
writeFromObjectIntoRowForShallowInsertWithChangeRecordin classDatabaseMapping
-
writeFromObjectIntoRowForWhereClause
public void writeFromObjectIntoRowForWhereClause(ObjectLevelModifyQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord record)
INTERNAL: Get a value from the object and set that in the respective field of the row.- Overrides:
writeFromObjectIntoRowForWhereClausein classObjectReferenceMapping
-
writeInsertFieldsIntoRow
public 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.- Overrides:
writeInsertFieldsIntoRowin classDatabaseMapping
-
-