Top Fields Constructors Methods
org.eclipse.persistence.internal.sessions

public Class RepeatableWriteUnitOfWork

extends UnitOfWorkImpl
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.sessions.remote.RemoteUnitOfWork
Imports
java.util.HashSet, .Iterator, .Map, .Set, org.eclipse.persistence.config.FlushClearCache, .ReferenceMode, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.descriptors.changetracking.AttributeChangeTrackingPolicy, org.eclipse.persistence.exceptions.DatabaseException, .OptimisticLockException, .ValidationException, org.eclipse.persistence.internal.descriptors.ObjectBuilder, org.eclipse.persistence.internal.helper.IdentityHashSet, org.eclipse.persistence.internal.localization.ExceptionLocalization, org.eclipse.persistence.logging.SessionLog, org.eclipse.persistence.queries.ObjectBuildingQuery, .ReadObjectQuery, org.eclipse.persistence.sessions.IdentityMapAccessor

Field Summary

Modifier and TypeField and Description
protected transient Set<ClassDescriptor>
classesToBeInvalidated

Contains classes that should be invalidated in the shared cache on commit.

protected UnitOfWorkChangeSet
cumulativeUOWChangeSet

Used to store the final UnitOfWorkChangeSet for merge into the shared cache

protected boolean
discoverUnregisteredNewObjectsWithoutPersist

Alters the behaviour of the RWUOW commit to function like the UOW with respect to Entity lifecycle

protected transient String
flushClearCache

The FlashClearCache mode to be used.

protected boolean
isWithinFlush

Track whether we are already in a flush().

protected boolean
shouldStoreBypassCache

Used to determine if we should bypass any merge into the cache.

protected boolean
shouldTerminateTransaction

Used to determine if UnitOfWork should commit and rollback transactions.

Inherited from org.eclipse.persistence.internal.sessions.UnitOfWorkImpl:
AfterExternalTransactionRolledBackallClonesbatchQueriesBirthcascadeDeleteObjectschangeTrackedHardListcloneDepthcloneMappingcloneToOriginalscommitOrderCommitPendingCommitTransactionPendingcontainerBeanscontainerUnitOfWorkCREATION_THREAD_HASHCODECREATION_THREAD_IDCREATION_THREAD_NAMEDeathdeferredModifyAllQueriesdeletedObjectsdeletedPrivateOwnedObjectsdeletionDependenciesDO_NOT_THROW_CONFORM_EXCEPTIONSFullisNestedUnitOfWorklastUsedMergeManagerlifecycleLOCK_QUERIES_PROPERTYmergeManagerForActiveMergeMergePendingmodifyAllQueriesnewAggregatesnewObjectsCloneToMergeOriginalnewObjectsCloneToOriginalnewObjectsInParentnewObjectsInParentOriginalToClonenewObjectsOriginalToCloneNoneobjectsDeletedDuringCommitoptimisticReadLockObjectsparentPartialpessimisticLockedObjectspreDeleteCompleteprimaryKeyToNewObjectsprivateOwnedObjectsReadLockOnlyReadLockUpdateVersionreadOnlyClassesreferenceModeremovedObjectsresumeOnTransactionCompletionshouldCascadeCloneToJoinedRelationshipshouldDiscoverNewObjectsshouldNewObjectsBeCachedshouldPerformDeletesFirstshouldThrowConformExceptionsshouldValidateExistenceSmartMergeTHROW_ALL_CONFORM_EXCEPTIONStransactionunitOfWorkChangeSetunregisteredDeletedObjectsCloneToBackupAndOriginalunregisteredExistingObjectsunregisteredNewObjectsunregisteredNewObjectsInParentvalidationLevelwasNonObjectLevelModifyQueryExecutedwasTransactionBegunPrematurelyWriteChangesFailed

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
protected ClassDescriptor

Returns:

ClassDescriptor
checkHierarchyForDescriptor
(Class<?> theClass)

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.checkHierarchyForDescriptor.

Check to see if the descriptor of a superclass can be used to describe this class By default, in JPA, classes must have specific descriptors to be considered entities In this implementation, we check whether the inheritance policy has been configured to allow superclass descriptors to describe subclasses that do not have a descriptor themselves
public void
clear(boolean shouldClearCache)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.clear.

INTERNAL: This method will clear all registered objects from this UnitOfWork.
public void
clearFlushClearCache()

INTERNAL: Clears invalidation list.

public void
clearForClose(boolean shouldClearCache)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.clearForClose.

INTERNAL: Call this method if the uow will no longer used for committing transactions: all the changes sets will be dereferenced, and (optionally) the cache cleared.
protected Object
cloneAndRegisterNewObject(Object original, boolean isShallowClone)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.cloneAndRegisterNewObject.

INTERNAL: To avoid putting the original object into the shared cache, and therefore, impede the 'detaching' of the original after commit, a clone of the original should be registered not the actual original object.
public void
commitRootUnitOfWork()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork.

INTERNAL: Commit the changes to any objects to the parent.
public void
commitTransaction()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransaction.

INTERNAL: This is internal to the uow, transactions should not be used explicitly in a uow.
public void
discoverUnregisteredNewObjects(Map<K, V> clones, Map<K, V> newObjects, Map<K, V> unregisteredExistingObjects, Map<K, V> visitedObjects)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.discoverUnregisteredNewObjects.

INTERNAL: Traverse the object to find references to objects not registered in this unit of work.
public Set<ClassDescriptor>
getClassesToBeInvalidated()

INTERNAL: Return classes that should be invalidated in the shared cache on commit.

public UnitOfWorkChangeSet
getCumulativeUOWChangeSet()

INTERNAL: Get the final UnitOfWorkChangeSet for merge into the shared cache.

public String
getFlushClearCache()

Return the FlashClearCache mode to be used.

public Object
getUnregisteredDeletedCloneForOriginal(Object original)

INTERNAL: Called only by UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent method.

public boolean
public boolean
isObjectDeleted(Object object)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.isObjectDeleted.

INTERNAL: Return if the object has been deleted in this unit of work.
public void
issueSQLbeforeCompletion()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion.

INTERNAL: For synchronized units of work, dump SQL to database
public boolean
isWithinFlush()

Return whether we are already performing a flush() call

protected void
mergeChangesIntoParent()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeChangesIntoParent.

INTERNAL: Merge the changes to all objects to the parent.
public Object
mergeCloneWithReferences(Object rmiClone, MergeManager manager)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeCloneWithReferences.

INTERNAL: Merge the attributes of the clone into the unit of work copy.
public Object
protected void
registerNotRegisteredNewObjectForPersist(Object newObject, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist.

INTERNAL: Called only by registerNewObjectForPersist method, and only if newObject is not already registered.
public void
rollbackTransaction()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.rollbackTransaction.

INTERNAL: This is internal to the uow, transactions should not be used explicitly in a uow.
protected void
rollbackTransaction(boolean
whether we were inside a commit or just trying to write out changes early.
intendedToCommitTransaction
)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.rollbackTransaction.

INTERNAL: This is internal to the uow, transactions should not be used explicitly in a uow.
public void
setCumulativeUOWChangeSet(UnitOfWorkChangeSet cumulativeUOWChangeSet)

INTERNAL: Set the final UnitOfWorkChangeSet for merge into the shared cache.

public void
setDiscoverUnregisteredNewObjectsWithoutPersist(boolean
the discoverUnregisteredNewObjectsWithoutPersist to set
discoverUnregisteredNewObjectsWithoutPersist
)

public void
setFlushClearCache(String flushClearCache)

Set the FlashClearCache mode to be used.

public void
setShouldStoreByPassCache(boolean shouldStoreBypassCache)

public void
setShouldTerminateTransaction(boolean shouldTerminateTransaction)

public boolean
shouldClearForCloseOnRelease()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.shouldClearForCloseOnRelease.

INTERNAL: Indicates whether clearForClose method should be called by release method.
public boolean

Returns:

the discoverUnregisteredNewObjectsWithoutPersist
shouldDiscoverUnregisteredNewObjectsWithoutPersist
()

public boolean
shouldForceReadFromDB(ObjectBuildingQuery query, Object primaryKey)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.shouldForceReadFromDB.

INTERNAL: Calculate whether we should read directly from the database to the UOW.
public boolean
shouldStoreBypassCache()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.shouldStoreBypassCache.

INTERNAL: Returns true if the UOW should bypass any updated to the shared cache during the merge.
public void
synchronizeAndResume()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.synchronizeAndResume.

INTERNAL Synchronize the clones and update their backup copies.
public void
updateChangeTrackersIfRequired(Object objectToWrite, ObjectChangeSet changeSetToWrite, UnitOfWorkImpl uow, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.updateChangeTrackersIfRequired.

INTERNAL: This method is used internally to update the tracked objects if required
public boolean
wasDeleted(Object original)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.wasDeleted.

INTERNAL: Return if the object was deleted previously (in a flush).
public void
writeChanges()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.writeChanges.

Implements org.eclipse.persistence.sessions.UnitOfWork.writeChanges.

INTERNAL: This will flush all changes to the database, and create or merge into the cumulativeUOWChangeSet.
Inherited from org.eclipse.persistence.internal.sessions.UnitOfWorkImpl:
acquireHistoricalSessionacquireUnitOfWorkacquireWriteLocksaddDeletedPrivateOwnedObjectsaddDeletionDependencyaddNewAggregateaddNewObjectToPrimaryKeyToNewObjectsaddNewObjectToPrimaryKeyToNewObjectsaddObjectDeletedDuringCommitaddPessimisticLockedCloneaddPrivateOwnedObjectaddReadOnlyClassaddReadOnlyClassesaddRemovedObjectaddToChangeTrackedHardListafterExternalTransactionRollbackassignSequenceNumberassignSequenceNumberassignSequenceNumbersassignSequenceNumbersbasicPrintRegisteredObjectsbeginEarlyTransactionbeginTransactionbuildOriginalcalculateChangescanChangeReadOnlySetcheckExistencecheckForUnregisteredExistingObjectcheckIfAlreadyRegisteredcloneAndRegisterObjectcloneAndRegisterObjectcloneMapcollectAndPrepareObjectsForNestedMergecommitcommitAfterWriteChangescommitAndResumecommitAndResumeAfterWriteChangescommitAndResumeOnFailurecommitAndResumeWithPreBuiltChangeSetcommitInternallyStartedExternalTransactioncommitNestedUnitOfWorkcommitRootUnitOfWorkWithPreBuiltChangeSetcommitToDatabasecommitToDatabaseWithChangeSetcommitToDatabaseWithPreBuiltChangeSetcommitTransactionAfterWriteChangescopyReadOnlyClassescreateCloneQueryValueHoldercreateCloneTransformationValueHoldercreateMapcreateMapdeepMergeClonedeepRevertObjectdeepUnregisterObjectdiscoverAllUnregisteredNewObjectsdiscoverAllUnregisteredNewObjectsInParentdiscoverAndPersistUnregisteredNewObjectsdontPerformValidationexecuteCallforceUpdateToVersionFieldgetAccessorgetAccessorsgetAccessorsgetActiveUnitOfWorkgetAllFromNewObjectsgetBackupClonegetBackupClonegetBackupCloneForCommitgetBackupCloneForCommitgetBatchQueriesgetCascadeDeleteObjectsgetChangeTrackedHardListgetCloneMappinggetCloneToOriginalsgetCommitManagergetCommitOrdergetContainerBeansgetContainerUnitOfWorkgetCurrentChangesgetDefaultReadOnlyClassesgetDeletedObjectsgetDeletionDependenciesgetDeletionDependenciesgetExecutionSessiongetLifecyclegetMergeManagergetNewAggregatesgetNewObjectsCloneToMergeOriginalgetNewObjectsCloneToOriginalgetNewObjectsInParentOriginalToClonegetNewObjectsOriginalToClonegetObjectFromNewObjectsgetObjectFromNewObjectsgetObjectsDeletedDuringCommitgetOptimisticReadLockObjectsgetOriginalVersionOfNewObjectgetOriginalVersionOfObjectgetOriginalVersionOfObjectOrNullgetOriginalVersionOfObjectOrNullgetParentgetParentIdentityMapSessiongetPessimisticLockedObjectsgetPlatformgetPrimaryKeyToNewObjectsgetPropertygetQuerygetQuerygetReadOnlyClassesgetReferencegetReferenceModegetRemovedObjectsgetSequencinggetServerPlatformgetSessionTypeStringgetShouldThrowConformExceptionsgetStategetTransactiongetUnitOfWorkChangeSetgetUnregisteredExistingObjectsgetUnregisteredNewObjectsgetUnregisteredNewObjectsInParentgetValidationLevelhasCascadeDeleteObjectshasChangeshasCloneMappinghasCloneToOriginalshasContainerBeanshasDeferredModifyAllQuerieshasDeletedObjectshasModificationshasModifyAllQuerieshasNewObjectshasNewObjectsInParentOriginalToClonehasObjectsDeletedDuringCommithasOptimisticReadLockObjectshasPessimisticLockedObjectshasPrivateOwnedObjectshasRemovedObjectshasUnregisteredNewObjectsinitializeIdentityMapAccessorinternalExecuteQueryinternalRegisterObjectisActiveisAfterWriteChangesFailedisClassReadOnlyisCloneNewObjectisCloneNewObjectFromParentisCommitPendingisConsideredInvalidisDeadisInTransactionisMergePendingisNestedUnitOfWorkisNewObjectInParentisObjectNewisObjectRegisteredisOriginalNewObjectisPessimisticLockedisPreDeleteCompleteisSmartMergeissueModifyAllQueryListissueSQLbeforeCompletionisUnitOfWorkisUnregisteredExistingObjectisUnregisteredNewObjectInParentmergeBmpAndWsEntitiesmergeClonemergeClonemergeClonesAfterCompletionmergeCloneWithReferencesmergeCloneWithReferencesmergeCloneWithReferencesnewInstanceperformFullValidationperformPartialValidationperformRemoveperformRemovePrivateOwnedObjectFromChangeSetpopulateAndRegisterObjectpostMergeChangespreMergeChangesprintRegisteredObjectsprocessDeleteObjectQueryregisterAllObjectsregisterAllObjectsregisterExistingObjectregisterExistingObjectregisterExistingObjectregisterNewContainerBeanregisterNewContainerBeanForCMPregisterNewObjectregisterNewObjectCloneregisterNewObjectForPersistregisterNewObjectInIdentityMapregisterObjectregisterObjectregisterOriginalNewObjectFromNestedUnitOfWorkregisterWithTransactionIfRequiredreleasereleaseJTSConnectionreleaseReadConnectionreleaseWriteLocksremoveAllReadOnlyClassesremoveForceUpdateToVersionFieldremoveObjectFromPrimaryKeyToNewObjectsremoveObjectFromPrimaryKeyToNewObjectsremovePrivateOwnedObjectremoveReadOnlyClassresumeUnitOfWorkretryQueryrevertAndResumerevertObjectrevertObjectscanForConformingInstancessetAllClonesCollectionsetBatchQueriessetCascadeDeleteObjectssetCloneMappingsetCommitOrdersetContainerBeanssetContainerUnitOfWorksetDeadsetDeletedObjectssetLifecyclesetMergeManagersetNewObjectsCloneToOriginalsetNewObjectsOriginalToClonesetObjectsDeletedDuringCommitsetParentsetPendingMergesetPreDeleteCompletesetReadOnlyClassessetRemovedObjectssetResumeUnitOfWorkOnTransactionCompletionsetShouldCascadeCloneToJoinedRelationshipsetShouldDiscoverNewObjectssetShouldNewObjectsBeCachedsetShouldPerformDeletesFirstsetShouldThrowConformExceptionssetShouldValidateExistencesetSmartMergesetSynchronizedsetTransactionsetUnitOfWorkChangeSetsetUnregisteredExistingObjectssetUnregisteredNewObjectssetUnregisteredNewObjectsInParentsetupPrimaryKeyToNewObjectssetValidationLevelsetWasNonObjectLevelModifyQueryExecutedsetWasTransactionBegunPrematurelyshallowMergeCloneshallowRevertObjectshallowUnregisterObjectshouldCascadeCloneToJoinedRelationshipshouldDiscoverNewObjectsshouldNewObjectsBeCachedshouldPerformDeletesFirstshouldPerformFullValidationshouldPerformNoValidationshouldPerformPartialValidationshouldReadFromDBshouldResumeUnitOfWorkOnTransactionCompletionshouldValidateExistencestoreDeferredModifyAllQuerystoreModifyAllQueryundeleteObjectunregisterObjectunregisterObjectunregisterObjectupdateDerivedIdsvalidateObjectSpaceverifyMutexThreadIntegrityBeforeReleasewasNonObjectLevelModifyQueryExecutedwasTransactionBegunPrematurelywritesCompleted

Field Detail

classesToBeInvalidatedback to summary
protected transient Set<ClassDescriptor> classesToBeInvalidated

Contains classes that should be invalidated in the shared cache on commit. Used only in case fushClearCache == FlushClearCache.DropInvalidate: clear method copies contents of updatedObjectsClasses to this set, adding classes of deleted objects, too; on commit the classes contained here are invalidated in the shared cache and the set is cleared. Relevant only in case call to flush method followed by call to clear method. Works together with flushClearCache.

cumulativeUOWChangeSetback to summary
protected UnitOfWorkChangeSet cumulativeUOWChangeSet

Used to store the final UnitOfWorkChangeSet for merge into the shared cache

discoverUnregisteredNewObjectsWithoutPersistback to summary
protected boolean discoverUnregisteredNewObjectsWithoutPersist

Alters the behaviour of the RWUOW commit to function like the UOW with respect to Entity lifecycle

flushClearCacheback to summary
protected transient String flushClearCache

The FlashClearCache mode to be used. Initialized by setUnitOfWorkChangeSet method in case it's null; commitAndResume sets this attribute back to null. Relevant only in case call to flush method followed by call to clear method.

See Also
org.eclipse.persistence.config.FlushClearCache
isWithinFlushback to summary
protected boolean isWithinFlush

Track whether we are already in a flush().

shouldStoreBypassCacheback to summary
protected boolean shouldStoreBypassCache

Used to determine if we should bypass any merge into the cache. This is a JPA flag and is true when the cacheStoreMode property is set to BYPASS. Otherwise, EclipseLink behaves as it usually would.

shouldTerminateTransactionback to summary
protected boolean shouldTerminateTransaction

Used to determine if UnitOfWork should commit and rollback transactions. This is used when an EntityTransaction is controlling the transaction.

Constructor Detail

RepeatableWriteUnitOfWorkback to summary
public RepeatableWriteUnitOfWork()
RepeatableWriteUnitOfWorkback to summary
public RepeatableWriteUnitOfWork(AbstractSession parentSession, ReferenceMode referenceMode)

Method Detail

checkHierarchyForDescriptorback to summary
protected ClassDescriptor checkHierarchyForDescriptor(Class<?> theClass)

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.checkHierarchyForDescriptor.

Check to see if the descriptor of a superclass can be used to describe this class By default, in JPA, classes must have specific descriptors to be considered entities In this implementation, we check whether the inheritance policy has been configured to allow superclass descriptors to describe subclasses that do not have a descriptor themselves

Returns:ClassDescriptor

ClassDescriptor

Annotations
@Override
clearback to summary
public void clear(boolean shouldClearCache)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.clear.

INTERNAL: This method will clear all registered objects from this UnitOfWork. If parameter value is 'true' then the cache(s) are cleared, too.

Annotations
@Override
clearFlushClearCacheback to summary
public void clearFlushClearCache()

INTERNAL: Clears invalidation list.

clearForCloseback to summary
public void clearForClose(boolean shouldClearCache)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.clearForClose.

INTERNAL: Call this method if the uow will no longer used for committing transactions: all the changes sets will be dereferenced, and (optionally) the cache cleared. If the uow is not released, but rather kept around for ValueHolders, then identity maps shouldn't be cleared: the parameter value should be 'false'. The lifecycle set to Birth so that uow ValueHolder still could be used. Alternatively, if called from release method then everything should go and therefore parameter value should be 'true'. In this case lifecycle won't change - uow.release (optionally) calls this method when it (uow) is already dead. The reason for calling this method from release is to free maximum memory right away: the uow might still be referenced by objects using UOWValueHolders (though they shouldn't be around they still might).

Annotations
@Override
cloneAndRegisterNewObjectback to summary
protected Object cloneAndRegisterNewObject(Object original, boolean isShallowClone)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.cloneAndRegisterNewObject.

INTERNAL: To avoid putting the original object into the shared cache, and therefore, impede the 'detaching' of the original after commit, a clone of the original should be registered not the actual original object. This is a JPA override to traditional EclipseLink behavior.

Annotations
@Override
commitRootUnitOfWorkback to summary
public void commitRootUnitOfWork() throws DatabaseException, OptimisticLockException

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork.

INTERNAL: Commit the changes to any objects to the parent.

Annotations
@Override
commitTransactionback to summary
public void commitTransaction() throws DatabaseException

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransaction.

INTERNAL: This is internal to the uow, transactions should not be used explicitly in a uow. The uow shares its parents transactions.

Annotations
@Override
Exceptions
DatabaseException:

Doc from org.eclipse.persistence.internal.sessions.AbstractSession.commitTransaction.

most databases validate changes as they are done, normally errors do not occur on commit unless the disk fails or the connection is lost.

discoverUnregisteredNewObjectsback to summary
public void discoverUnregisteredNewObjects(Map<K, V> clones, Map<K, V> newObjects, Map<K, V> unregisteredExistingObjects, Map<K, V> visitedObjects)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.discoverUnregisteredNewObjects.

INTERNAL: Traverse the object to find references to objects not registered in this unit of work. Any unregistered new objects found will be persisted or an error will be thrown depending on the mapping's cascade persist. References to deleted objects will also currently cause them to be undeleted.

Annotations
@Override
getClassesToBeInvalidatedback to summary
public Set<ClassDescriptor> getClassesToBeInvalidated()

INTERNAL: Return classes that should be invalidated in the shared cache on commit. Used only in case fushClearCache == FlushClearCache.DropInvalidate: clear method copies contents of updatedObjectsClasses to this set, adding classes of deleted objects, too; on commit the classes contained here are invalidated in the shared cache and the set is cleared. Relevant only in case call to flush method followed by call to clear method. Works together with flushClearCache.

getCumulativeUOWChangeSetback to summary
public UnitOfWorkChangeSet getCumulativeUOWChangeSet()

INTERNAL: Get the final UnitOfWorkChangeSet for merge into the shared cache.

getFlushClearCacheback to summary
public String getFlushClearCache()

Return the FlashClearCache mode to be used. Relevant only in case call to flush method followed by call to clear method.

See Also
org.eclipse.persistence.config.FlushClearCache
getUnregisteredDeletedCloneForOriginalback to summary
public Object getUnregisteredDeletedCloneForOriginal(Object original)

INTERNAL: Called only by UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent method. Return unregisteredDeletedClone corresponding to the passed original, or null

isAfterWriteChangesButBeforeCommitback to summary
public boolean isAfterWriteChangesButBeforeCommit()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.isAfterWriteChangesButBeforeCommit.

INTERNAL: Has writeChanges() been attempted on this UnitOfWork? It may have either succeeded or failed but either way the UnitOfWork is in a highly restricted state.

Annotations
@Override
isObjectDeletedback to summary
public boolean isObjectDeleted(Object object)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.isObjectDeleted.

INTERNAL: Return if the object has been deleted in this unit of work.

Annotations
@Override
issueSQLbeforeCompletionback to summary
public void issueSQLbeforeCompletion()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion.

INTERNAL: For synchronized units of work, dump SQL to database

Annotations
@Override
isWithinFlushback to summary
public boolean isWithinFlush()

Return whether we are already performing a flush() call

mergeChangesIntoParentback to summary
protected void mergeChangesIntoParent()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeChangesIntoParent.

INTERNAL: Merge the changes to all objects to the parent.

Annotations
@Override
mergeCloneWithReferencesback to summary
public Object mergeCloneWithReferences(Object rmiClone, MergeManager manager)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeCloneWithReferences.

INTERNAL: Merge the attributes of the clone into the unit of work copy.

Returns:Object

Doc from org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeCloneWithReferences.

the registered version for the clone being merged.

Annotations
@Override
registerNewObjectback to summary
public Object registerNewObject(Object newObject)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObject.

Implements org.eclipse.persistence.sessions.UnitOfWork.registerNewObject.

ADVANCED: Register the new object with the unit of work. This will register the new object without cloning. Normally the registerObject method should be used for all registration of new and existing objects. This version of the register method can only be used for new objects. This method should only be used if a new object is desired to be registered without cloning.

Annotations
@Override
See Also
registerObject(Object)
registerNotRegisteredNewObjectForPersistback to summary
protected void registerNotRegisteredNewObjectForPersist(Object newObject, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist.

INTERNAL: Called only by registerNewObjectForPersist method, and only if newObject is not already registered. If newObject is found in unregisteredDeletedObjectsCloneToBackupAndOriginal then it's re-registered, otherwise the superclass method called.

Annotations
@Override
rollbackTransactionback to summary
public void rollbackTransaction() throws DatabaseException

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.rollbackTransaction.

INTERNAL: This is internal to the uow, transactions should not be used explicitly in a uow. The uow shares its parents transactions.

Annotations
@Override
Exceptions
DatabaseException:

Doc from org.eclipse.persistence.internal.sessions.AbstractSession.rollbackTransaction.

if the database connection is lost or the rollback fails.

rollbackTransactionback to summary
protected void rollbackTransaction(boolean intendedToCommitTransaction) throws DatabaseException

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.rollbackTransaction.

INTERNAL: This is internal to the uow, transactions should not be used explicitly in a uow. The uow shares its parents transactions. Called in JTA this should not set the transaction to rollback.

Parameters
intendedToCommitTransaction:boolean

Doc from org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.rollbackTransaction.

whether we were inside a commit or just trying to write out changes early.

Annotations
@Override
setCumulativeUOWChangeSetback to summary
public void setCumulativeUOWChangeSet(UnitOfWorkChangeSet cumulativeUOWChangeSet)

INTERNAL: Set the final UnitOfWorkChangeSet for merge into the shared cache.

setDiscoverUnregisteredNewObjectsWithoutPersistback to summary
public void setDiscoverUnregisteredNewObjectsWithoutPersist(boolean discoverUnregisteredNewObjectsWithoutPersist)
Parameters
discoverUnregisteredNewObjectsWithoutPersist:boolean

the discoverUnregisteredNewObjectsWithoutPersist to set

setFlushClearCacheback to summary
public void setFlushClearCache(String flushClearCache)

Set the FlashClearCache mode to be used. Relevant only in case call to flush method followed by call to clear method.

See Also
org.eclipse.persistence.config.FlushClearCache
setShouldStoreByPassCacheback to summary
public void setShouldStoreByPassCache(boolean shouldStoreBypassCache)
setShouldTerminateTransactionback to summary
public void setShouldTerminateTransaction(boolean shouldTerminateTransaction)
shouldClearForCloseOnReleaseback to summary
public boolean shouldClearForCloseOnRelease()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.shouldClearForCloseOnRelease.

INTERNAL: Indicates whether clearForClose method should be called by release method.

Annotations
@Override
shouldDiscoverUnregisteredNewObjectsWithoutPersistback to summary
public boolean shouldDiscoverUnregisteredNewObjectsWithoutPersist()
Returns:boolean

the discoverUnregisteredNewObjectsWithoutPersist

shouldForceReadFromDBback to summary
public boolean shouldForceReadFromDB(ObjectBuildingQuery query, Object primaryKey)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.shouldForceReadFromDB.

INTERNAL: Calculate whether we should read directly from the database to the UOW. This will be necessary, if a flush and a clear have been called on this unit of work In that case, there will be changes in the database that are not in the shared cache, so a read in this UOW should get info directly form the DB

Annotations
@Override
shouldStoreBypassCacheback to summary
public boolean shouldStoreBypassCache()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.shouldStoreBypassCache.

INTERNAL: Returns true if the UOW should bypass any updated to the shared cache during the merge.

Annotations
@Override
synchronizeAndResumeback to summary
public void synchronizeAndResume()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.synchronizeAndResume.

INTERNAL Synchronize the clones and update their backup copies. Called after commit and commit and resume.

Annotations
@Override
updateChangeTrackersIfRequiredback to summary
public void updateChangeTrackersIfRequired(Object objectToWrite, ObjectChangeSet changeSetToWrite, UnitOfWorkImpl uow, ClassDescriptor descriptor)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.updateChangeTrackersIfRequired.

INTERNAL: This method is used internally to update the tracked objects if required

Annotations
@Override
wasDeletedback to summary
public boolean wasDeleted(Object original)

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.wasDeleted.

INTERNAL: Return if the object was deleted previously (in a flush).

Annotations
@Override
writeChangesback to summary
public void writeChanges()

Overrides org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.writeChanges.

Implements org.eclipse.persistence.sessions.UnitOfWork.writeChanges.

INTERNAL: This will flush all changes to the database, and create or merge into the cumulativeUOWChangeSet.

Annotations
@Override