|
EclipseLink 2.0.0, build 'v20091127-r5931' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.mappings.DatabaseMapping org.eclipse.persistence.mappings.ForeignReferenceMapping org.eclipse.persistence.mappings.CollectionMapping org.eclipse.persistence.mappings.OneToManyMapping org.eclipse.persistence.mappings.UnidirectionalOneToManyMapping
public class UnidirectionalOneToManyMapping
Purpose: UnidirectionalOneToManyMapping doesn't have 1:1 back reference mapping.
Field Summary | |
---|---|
protected boolean |
shouldIncrementTargetLockValueOnAddOrRemoveTarget
Indicates whether target's optimistic locking value should be incremented on target being added to / removed from a source. |
protected boolean |
shouldIncrementTargetLockValueOnDeleteSource
Indicates whether target's optimistic locking value should be incremented on the source deletion. |
Fields inherited from class org.eclipse.persistence.mappings.OneToManyMapping |
---|
addTargetQuery, hasCustomAddTargetQuery, hasCustomRemoveAllTargetsQuery, hasCustomRemoveTargetQuery, ObjectAdded, ObjectRemoved, PostInsert, removeAllTargetsQuery, removeTargetQuery, sourceKeyFields, sourceKeysToTargetForeignKeys, targetForeignKeyFields, targetForeignKeysToSourceKeys, targetForeignKeyTable, targetPrimaryKeyFields |
Fields inherited from class org.eclipse.persistence.mappings.CollectionMapping |
---|
changeOrderTargetQuery, containerPolicy, deleteAllQuery, hasCustomDeleteAllQuery, hasOrderBy, isListOrderFieldSupported, listOrderField, orderCorrectionType |
Fields inherited from class org.eclipse.persistence.mappings.ForeignReferenceMapping |
---|
cascadeDetach, cascadeMerge, cascadePersist, cascadeRefresh, cascadeRemove, forceInitializationOfSelectionCriteria, hasCustomSelectionQuery, indirectionPolicy, INNER_JOIN, isPrivateOwned, joinFetch, NONE, OUTER_JOIN, referenceClass, referenceClassName, referenceDescriptor, relationshipPartner, relationshipPartnerAttributeName, requiresTransientWeavedFields, selectionQuery, tempInitSession, usesBatchReading |
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
---|
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, weight, WEIGHT_1 |
Constructor Summary | |
---|---|
UnidirectionalOneToManyMapping()
PUBLIC: Default constructor. |
Method Summary | |
---|---|
protected org.eclipse.persistence.internal.sessions.AbstractRecord |
buildKeyRowForTargetUpdate(ObjectLevelModifyQuery query)
INTERNAL: Build a row containing the keys for use in the query that updates the row for the target object during an insert or update |
org.eclipse.persistence.internal.sessions.ChangeRecord |
compareForChange(java.lang.Object clone,
java.lang.Object backUp,
org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
org.eclipse.persistence.internal.sessions.AbstractSession uow)
INTERNAL: This method is used to create a change record from comparing two collections |
protected org.eclipse.persistence.internal.sessions.AbstractRecord |
createModifyRowForAddTargetQuery()
INTERNAL: |
protected java.util.Vector |
extractPrimaryKeyFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Extract the primary key value from the source row. |
protected java.util.Vector |
extractSourceKeyFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Extract the source primary key value from the target row. |
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the mapping. |
boolean |
isOwned()
INTERNAL: |
boolean |
isUnidirectionalOneToManyMapping()
INTERNAL: |
void |
postCalculateChanges(ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL: Overridden by mappings that require additional processing of the change record after the record has been calculated. |
void |
postCalculateChangesOnDeleted(java.lang.Object deletedObject,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet uowChangeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL: Overridden by mappings that require objects to be deleted contribute to change set creation. |
void |
postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
Initialize the type of the target foreign key, as it will be null as it is not mapped in the target. |
protected void |
postPrepareNestedBatchQuery(ReadQuery batchQuery,
ReadAllQuery query)
INTERNAL: Add additional fields |
void |
preDelete(DeleteObjectQuery query)
INTERNAL: Delete the reference objects. |
void |
prepareCascadeLockingPolicy()
Prepare a cascade locking policy. |
protected void |
prepareTranslationRow(org.eclipse.persistence.internal.sessions.AbstractRecord translationRow,
java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: The translation row may require additional fields than the primary key if the mapping in not on the primary key. |
void |
recordPrivateOwnedRemovals(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL: Overridden by mappings that require additional processing of the change record after the record has been calculated. |
boolean |
requiresDataModificationEvents()
INTERNAL: UnidirectionalOneToManyMapping performs some events after INSERT/UPDATE to maintain the keys |
void |
setShouldIncrementTargetLockValueOnAddOrRemoveTarget(boolean shouldIncrementTargetLockValueOnAddOrRemoveTarget)
PUBLIC: Set value that indicates whether target's optimistic locking value should be incremented on target being added to / removed from a source (default value is true). |
void |
setShouldIncrementTargetLockValueOnDeleteSource(boolean shouldIncrementTargetLockValueOnDeleteSource)
PUBLIC: Set value that indicates whether target's optimistic locking value should be incremented on the source deletion (default value is true). |
boolean |
shouldIncrementTargetLockValueOnAddOrRemoveTarget()
PUBLIC: Indicates whether target's optimistic locking value should be incremented on target being added to / removed from a source (default value is true). |
boolean |
shouldIncrementTargetLockValueOnDeleteSource()
PUBLIC: Indicates whether target's optimistic locking value should be incremented on the source deletion (default value is true). |
protected boolean |
shouldRemoveTargetQueryModifyTargetForeignKey()
INTERNAL Target foreign key of the removed object should be modified (set to null). |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient boolean shouldIncrementTargetLockValueOnAddOrRemoveTarget
protected transient boolean shouldIncrementTargetLockValueOnDeleteSource
Constructor Detail |
---|
public UnidirectionalOneToManyMapping()
Method Detail |
---|
protected org.eclipse.persistence.internal.sessions.AbstractRecord buildKeyRowForTargetUpdate(ObjectLevelModifyQuery query)
buildKeyRowForTargetUpdate
in class OneToManyMapping
public org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(java.lang.Object clone, java.lang.Object backUp, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession uow)
compareForChange
in class CollectionMapping
protected java.util.Vector extractPrimaryKeyFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
extractPrimaryKeyFromRow
in class OneToManyMapping
protected java.util.Vector extractSourceKeyFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
public boolean isOwned()
isOwned
in class DatabaseMapping
public boolean isUnidirectionalOneToManyMapping()
isUnidirectionalOneToManyMapping
in class DatabaseMapping
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
initialize
in class OneToManyMapping
DescriptorException
public void postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
postInitialize
in class CollectionMapping
protected org.eclipse.persistence.internal.sessions.AbstractRecord createModifyRowForAddTargetQuery()
createModifyRowForAddTargetQuery
in class OneToManyMapping
public void preDelete(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException
preDelete
in class OneToManyMapping
DatabaseException
OptimisticLockException
public void prepareCascadeLockingPolicy()
prepareCascadeLockingPolicy
in class OneToManyMapping
public void postCalculateChanges(ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
postCalculateChanges
in class CollectionMapping
public void postCalculateChangesOnDeleted(java.lang.Object deletedObject, org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet uowChangeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
postCalculateChangesOnDeleted
in class DatabaseMapping
protected void postPrepareNestedBatchQuery(ReadQuery batchQuery, ReadAllQuery query)
postPrepareNestedBatchQuery
in class OneToManyMapping
protected void prepareTranslationRow(org.eclipse.persistence.internal.sessions.AbstractRecord translationRow, java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
prepareTranslationRow
in class CollectionMapping
public void recordPrivateOwnedRemovals(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
recordPrivateOwnedRemovals
in class CollectionMapping
public boolean requiresDataModificationEvents()
requiresDataModificationEvents
in class OneToManyMapping
UnidirectionalOneToManyMapping
public void setShouldIncrementTargetLockValueOnAddOrRemoveTarget(boolean shouldIncrementTargetLockValueOnAddOrRemoveTarget)
public void setShouldIncrementTargetLockValueOnDeleteSource(boolean shouldIncrementTargetLockValueOnDeleteSource)
public boolean shouldIncrementTargetLockValueOnAddOrRemoveTarget()
public boolean shouldIncrementTargetLockValueOnDeleteSource()
protected boolean shouldRemoveTargetQueryModifyTargetForeignKey()
shouldRemoveTargetQueryModifyTargetForeignKey
in class OneToManyMapping
|
EclipseLink 2.0.0, build 'v20091127-r5931' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |