Module org.eclipse.persistence.core
Class RemoteUnitOfWork
java.lang.Object
org.eclipse.persistence.internal.core.sessions.CoreAbstractSession<ClassDescriptor,Login,Platform,Project,SessionEventManager>
org.eclipse.persistence.internal.sessions.AbstractSession
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl
org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork
org.eclipse.persistence.internal.sessions.remote.RemoteUnitOfWork
- All Implemented Interfaces:
Serializable,Cloneable,CoreSession<ClassDescriptor,,Login, Platform, Project, SessionEventManager> CommandProcessor,Session,UnitOfWork
Counter part of the unit of work which exists on the client side.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.persistence.sessions.UnitOfWork
UnitOfWork.CommitOrderType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected Listprotected RemoteSessionControllerprotected ListFields inherited from class org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork
classesToBeInvalidated, cumulativeUOWChangeSet, discoverUnregisteredNewObjectsWithoutPersist, flushClearCache, isWithinFlush, shouldStoreBypassCache, shouldTerminateTransactionFields inherited from class org.eclipse.persistence.internal.sessions.UnitOfWorkImpl
AfterExternalTransactionRolledBack, allClones, batchQueries, Birth, cascadeDeleteObjects, changeTrackedHardList, cloneDepth, cloneMapping, cloneToOriginals, commitOrder, CommitPending, CommitTransactionPending, containerBeans, containerUnitOfWork, CREATION_THREAD_HASHCODE, CREATION_THREAD_ID, CREATION_THREAD_NAME, Death, deferredModifyAllQueries, deletedObjects, deletedPrivateOwnedObjects, deletionDependencies, DO_NOT_THROW_CONFORM_EXCEPTIONS, Full, isNestedUnitOfWork, lastUsedMergeManager, lifecycle, LOCK_QUERIES_PROPERTY, mergeManagerForActiveMerge, MergePending, modifyAllQueries, newAggregates, newObjectsCloneToMergeOriginal, newObjectsCloneToOriginal, newObjectsInParent, newObjectsInParentOriginalToClone, newObjectsOriginalToClone, None, objectsDeletedDuringCommit, optimisticReadLockObjects, parent, Partial, pessimisticLockedObjects, preDeleteComplete, primaryKeyToNewObjects, privateOwnedObjects, ReadLockOnly, ReadLockUpdateVersion, readOnlyClasses, referenceMode, removedObjects, resumeOnTransactionCompletion, shouldCascadeCloneToJoinedRelationship, shouldDiscoverNewObjects, shouldNewObjectsBeCached, shouldPerformDeletesFirst, shouldThrowConformExceptions, shouldValidateExistence, SmartMerge, THROW_ALL_CONFORM_EXCEPTIONS, transaction, unitOfWorkChangeSet, unregisteredDeletedObjectsCloneToBackupAndOriginal, unregisteredExistingObjects, unregisteredNewObjects, unregisteredNewObjectsInParent, validationLevel, wasNonObjectLevelModifyQueryExecuted, wasTransactionBegunPrematurely, WriteChangesFailedFields inherited from class org.eclipse.persistence.internal.sessions.AbstractSession
accessors, activeCommandThreads, attributeGroups, broker, commandManager, commitManager, defaultReferenceMode, deferredEvents, descriptors, eventManager, exceptionHandler, externalTransactionController, identityMapAccessor, injectionManager, integrityChecker, isConcurrent, isExecutingEvents, isFinalizersEnabled, isInBroker, isInProfile, isLoggingOff, isSynchronized, jpaQueriesProcessed, lastDescriptorAccessed, logSessionString, metadatalistener, multitenantContextProperties, name, numberOfActiveUnitsOfWork, objectsLockedForClone, partitioningPolicy, pessimisticLockTimeoutDefault, pessimisticLockTimeoutUnitDefault, platform, profiler, project, properties, queries, queryBuilder, queryTimeoutDefault, queryTimeoutUnitDefault, serializer, sessionLog, shouldCheckWriteLock, shouldOptimizeResultSetAccess, shouldPropagateChanges, staticMetamodelClasses, tablePerTenantDescriptors, tablePerTenantQueries, tolerateInvalidJPQL, transactionMutex, wasJTSTransactionInternallyStartedFields inherited from interface org.eclipse.persistence.sessions.coordination.CommandProcessor
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING -
Constructor Summary
ConstructorsConstructorDescriptionRemoteUnitOfWork(RemoteUnitOfWork parent) RemoteUnitOfWork(RemoteUnitOfWork parent, ReferenceMode referenceMode) RemoteUnitOfWork(DistributedSession parent) RemoteUnitOfWork(DistributedSession parent, ReferenceMode referenceMode) -
Method Summary
Modifier and TypeMethodDescriptionThe nested unit of work must also be remote.acquireUnitOfWork(ReferenceMode referenceMode) The nested unit of work must also be remote.voidPUBLIC: Tell the unit of work to begin a transaction now.calculateChanges(Map registeredObjects, UnitOfWorkChangeSet changeSet, boolean assignSequences, boolean shouldCloneMap) INTERNAL: Changes are calculated on the client, so avoid recalculating them on the server.protected ListThis is done to maintain correspondence between local new objects and returned new objects from serialization.protected ListThis is done to maintain correspondence between local unregistered new objects and returned unregistered new objects from serialization.protected voidThe remote unit of work returned after its commit on the server is merged with remote unit of work on the remote side.voidStarts committing the remote unit of work.protected voidMerges remote unit of work to parent remote session.executeQuery(String queryName) PUBLIC: Execute the pre-defined query by name and return the result.executeQuery(String queryName, Class<?> domainClass) PUBLIC: Execute the pre-defined query by name and return the result.executeQuery(String queryName, Class<?> domainClass, Vector argumentValues) PUBLIC: Execute the pre-defined query by name and return the result.executeQuery(String queryName, Vector argumentValues) PUBLIC: Execute the pre-defined query by name and return the result.protected voidfixRemoteChangeSet(UnitOfWorkChangeSet uowChangeSet, Map cloneMap, AbstractSession session) INTERNAL: Fix the transient fields in the serialized change set.INTERNAL: Return the database platform currently connected to.getDescriptor(Class<?> domainClass) Return the table descriptor specified for the class.getDescriptorForAlias(String alias) Return the table descriptor specified for the class.Returns a new object cacheINTERNAL: Method returns the parent RemoteSessionController for this Remote UnitOfWork Used to retrieve Valueholders that were used on the clientINTERNAL: Return the database platform currently connected to.Returns an unregistered new object cacheinternalExecuteQuery(DatabaseQuery query, AbstractRecord Record) INTERNAL: Return the results from exeucting the database query.booleanisFlush()protected booleanbooleanReturn if this session is a unit of work.protected voidThe returned remote unit of work from the server is prepared to merge with local remote unit of work.voidreinitializeForSession(AbstractSession session, RemoteSessionController parentSessionController) INTERNAL: Re-initialize for the server-side session.voidINTERNAL: Resume is not required on the server.voidsetIsFlush(boolean isFlush) protected voidsetIsOnClient(boolean isOnClient) protected voidsetNewObjectsCache(List newObjectsCache) Set a new object cachevoidsetParentSessionController(RemoteSessionController parentSessionController) INTERNAL: Sets the parent RemoteSessionController for this Remote UnitOfWork Used to retrieve Valueholders that were used on the clientprotected voidsetUnregisteredNewObjectsCache(List unregisteredNewObjectsCache) Set unregistered new object cachetoString()Avoid the toString printing the accessor and platform.booleanverifyDelete(Object domainObject) TESTING: This is used by testing code to ensure that a deletion was successful.voidSimulate a flush, current just begins a transaction and commits.Methods inherited from class org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork
checkHierarchyForDescriptor, clear, clearFlushClearCache, clearForClose, cloneAndRegisterNewObject, commitTransaction, discoverUnregisteredNewObjects, getClassesToBeInvalidated, getCumulativeUOWChangeSet, getFlushClearCache, getUnregisteredDeletedCloneForOriginal, isAfterWriteChangesButBeforeCommit, isObjectDeleted, issueSQLbeforeCompletion, isWithinFlush, mergeChangesIntoParent, mergeCloneWithReferences, registerNewObject, registerNotRegisteredNewObjectForPersist, rollbackTransaction, rollbackTransaction, setCumulativeUOWChangeSet, setDiscoverUnregisteredNewObjectsWithoutPersist, setFlushClearCache, setShouldStoreByPassCache, setShouldTerminateTransaction, shouldClearForCloseOnRelease, shouldDiscoverUnregisteredNewObjectsWithoutPersist, shouldForceReadFromDB, shouldStoreBypassCache, synchronizeAndResume, updateChangeTrackersIfRequired, wasDeletedMethods inherited from class org.eclipse.persistence.internal.sessions.UnitOfWorkImpl
acquireHistoricalSession, acquireWriteLocks, addDeletedPrivateOwnedObjects, addDeletionDependency, addNewAggregate, addNewObjectToPrimaryKeyToNewObjects, addNewObjectToPrimaryKeyToNewObjects, addObjectDeletedDuringCommit, addPessimisticLockedClone, addPrivateOwnedObject, addReadOnlyClass, addReadOnlyClasses, addRemovedObject, addToChangeTrackedHardList, afterExternalTransactionRollback, assignSequenceNumber, assignSequenceNumber, assignSequenceNumbers, assignSequenceNumbers, basicPrintRegisteredObjects, beginTransaction, buildOriginal, canChangeReadOnlySet, checkExistence, checkForUnregisteredExistingObject, checkIfAlreadyRegistered, cloneAndRegisterObject, cloneAndRegisterObject, cloneMap, collectAndPrepareObjectsForNestedMerge, commit, commitAfterWriteChanges, commitAndResume, commitAndResumeAfterWriteChanges, commitAndResumeOnFailure, commitAndResumeWithPreBuiltChangeSet, commitInternallyStartedExternalTransaction, commitNestedUnitOfWork, commitRootUnitOfWorkWithPreBuiltChangeSet, commitToDatabase, commitToDatabaseWithChangeSet, commitToDatabaseWithPreBuiltChangeSet, commitTransactionAfterWriteChanges, copyReadOnlyClasses, createCloneQueryValueHolder, createCloneTransformationValueHolder, createMap, createMap, deepMergeClone, deepRevertObject, deepUnregisterObject, discoverAllUnregisteredNewObjects, discoverAllUnregisteredNewObjectsInParent, discoverAndPersistUnregisteredNewObjects, dontPerformValidation, executeCall, forceUpdateToVersionField, getAccessor, getAccessors, getAccessors, getActiveUnitOfWork, getAllFromNewObjects, getBackupClone, getBackupClone, getBackupCloneForCommit, getBackupCloneForCommit, getBatchQueries, getCascadeDeleteObjects, getChangeTrackedHardList, getCloneMapping, getCloneToOriginals, getCommitManager, getCommitOrder, getContainerBeans, getContainerUnitOfWork, getCurrentChanges, getDefaultReadOnlyClasses, getDeletedObjects, getDeletionDependencies, getDeletionDependencies, getExecutionSession, getLifecycle, getMergeManager, getNewAggregates, getNewObjectsCloneToMergeOriginal, getNewObjectsCloneToOriginal, getNewObjectsInParentOriginalToClone, getNewObjectsOriginalToClone, getObjectFromNewObjects, getObjectFromNewObjects, getObjectsDeletedDuringCommit, getOptimisticReadLockObjects, getOriginalVersionOfNewObject, getOriginalVersionOfObject, getOriginalVersionOfObjectOrNull, getOriginalVersionOfObjectOrNull, getParent, getParentIdentityMapSession, getPessimisticLockedObjects, getPlatform, getPrimaryKeyToNewObjects, getProperty, getQuery, getQuery, getReadOnlyClasses, getReference, getReferenceMode, getRemovedObjects, getSequencing, getServerPlatform, getSessionTypeString, getShouldThrowConformExceptions, getState, getTransaction, getUnitOfWorkChangeSet, getUnregisteredExistingObjects, getUnregisteredNewObjects, getUnregisteredNewObjectsInParent, getValidationLevel, hasCascadeDeleteObjects, hasChanges, hasCloneMapping, hasCloneToOriginals, hasContainerBeans, hasDeferredModifyAllQueries, hasDeletedObjects, hasModifications, hasModifyAllQueries, hasNewObjects, hasNewObjectsInParentOriginalToClone, hasObjectsDeletedDuringCommit, hasOptimisticReadLockObjects, hasPessimisticLockedObjects, hasPrivateOwnedObjects, hasRemovedObjects, hasUnregisteredNewObjects, initializeIdentityMapAccessor, internalRegisterObject, isActive, isAfterWriteChangesFailed, isClassReadOnly, isCloneNewObject, isCloneNewObjectFromParent, isCommitPending, isConsideredInvalid, isDead, isInTransaction, isMergePending, isNestedUnitOfWork, isNewObjectInParent, isObjectNew, isObjectRegistered, isOriginalNewObject, isPessimisticLocked, isPreDeleteComplete, isSmartMerge, issueModifyAllQueryList, issueSQLbeforeCompletion, isUnitOfWork, isUnregisteredExistingObject, isUnregisteredNewObjectInParent, mergeBmpAndWsEntities, mergeClone, mergeClone, mergeClonesAfterCompletion, mergeCloneWithReferences, mergeCloneWithReferences, mergeCloneWithReferences, newInstance, performFullValidation, performPartialValidation, performRemove, performRemovePrivateOwnedObjectFromChangeSet, populateAndRegisterObject, postMergeChanges, preMergeChanges, printRegisteredObjects, processDeleteObjectQuery, registerAllObjects, registerAllObjects, registerExistingObject, registerExistingObject, registerExistingObject, registerNewContainerBean, registerNewContainerBeanForCMP, registerNewObject, registerNewObjectClone, registerNewObjectForPersist, registerNewObjectInIdentityMap, registerObject, registerObject, registerOriginalNewObjectFromNestedUnitOfWork, registerWithTransactionIfRequired, release, releaseJTSConnection, releaseReadConnection, releaseWriteLocks, removeAllReadOnlyClasses, removeForceUpdateToVersionField, removeObjectFromPrimaryKeyToNewObjects, removeObjectFromPrimaryKeyToNewObjects, removePrivateOwnedObject, removeReadOnlyClass, retryQuery, revertAndResume, revertObject, revertObject, scanForConformingInstances, setAllClonesCollection, setBatchQueries, setCascadeDeleteObjects, setCloneMapping, setCommitOrder, setContainerBeans, setContainerUnitOfWork, setDead, setDeletedObjects, setLifecycle, setMergeManager, setNewObjectsCloneToOriginal, setNewObjectsOriginalToClone, setObjectsDeletedDuringCommit, setParent, setPendingMerge, setPreDeleteComplete, setReadOnlyClasses, setRemovedObjects, setResumeUnitOfWorkOnTransactionCompletion, setShouldCascadeCloneToJoinedRelationship, setShouldDiscoverNewObjects, setShouldNewObjectsBeCached, setShouldPerformDeletesFirst, setShouldThrowConformExceptions, setShouldValidateExistence, setSmartMerge, setSynchronized, setTransaction, setUnitOfWorkChangeSet, setUnregisteredExistingObjects, setUnregisteredNewObjects, setUnregisteredNewObjectsInParent, setupPrimaryKeyToNewObjects, setValidationLevel, setWasNonObjectLevelModifyQueryExecuted, setWasTransactionBegunPrematurely, shallowMergeClone, shallowRevertObject, shallowUnregisterObject, shouldCascadeCloneToJoinedRelationship, shouldDiscoverNewObjects, shouldNewObjectsBeCached, shouldPerformDeletesFirst, shouldPerformFullValidation, shouldPerformNoValidation, shouldPerformPartialValidation, shouldReadFromDB, shouldResumeUnitOfWorkOnTransactionCompletion, shouldValidateExistence, storeDeferredModifyAllQuery, storeModifyAllQuery, undeleteObject, unregisterObject, unregisterObject, unregisterObject, updateDerivedIds, validateObjectSpace, verifyMutexThreadIntegrityBeforeRelease, wasNonObjectLevelModifyQueryExecuted, wasTransactionBegunPrematurely, writesCompletedMethods inherited from class org.eclipse.persistence.internal.sessions.AbstractSession
acquireNonSynchronizedUnitOfWork, acquireNonSynchronizedUnitOfWork, acquireRepeatableWriteUnitOfWork, addAlias, addJPAQuery, addJPATablePerTenantQuery, addMultitenantContextProperty, addQuery, addQuery, addQuery, addStaticMetamodelClass, addTablePerTenantDescriptor, addTablePerTenantQuery, basicBeginTransaction, basicBeginTransaction, basicCommitTransaction, basicExecuteCall, basicRollbackTransaction, beginExternalTransaction, buildDefaultQueryBuilder, checkAndRefreshInvalidObject, cleanUpInjectionManager, clearDescriptors, clearIntegrityChecker, clearLastDescriptorAccessed, clearProfile, clearThreadsToWaitMergeManagerWaitingDeferredCacheKeys, clone, commitExternalTransaction, compareObjects, compareObjectsDontMatch, config, containsQuery, copy, copy, copyDescriptorNamedQueries, copyDescriptorsFromProject, copyInternal, createInjectionManager, createProtectedInstanceFromCachedData, deferEvent, deleteAllObjects, deleteObject, doesObjectExist, dontLogMessages, endOperationProfile, endOperationProfile, executeDeferredEvents, executeNonSelectingCall, executeNonSelectingSQL, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeSelectingCall, executeSQL, fine, finer, finest, getActiveCommandThreads, getActiveSession, getAliasDescriptors, getAllQueries, getAsOfClause, getAttributeGroups, getBroker, getCacheKeyFromTargetSessionForMerge, getClassDescriptor, getClassDescriptor, getClassDescriptorForAlias, getCommandManager, getDatasourceLogin, getDefaultReferenceMode, getDescriptor, getDescriptors, getEventManager, getExceptionHandler, getExceptionHandlerClass, getExternalTransactionController, getId, getIdentityMapAccessor, getIdentityMapAccessorInstance, getInjectionManager, getIntegrityChecker, getJPAQueries, getJPATablePerTenantQueries, getLoader, getLog, getLogin, getLogLevel, getLogLevel, getLogSessionString, getMappedSuperclass, getMultitenantContextProperties, getName, getNextQueryId, getNextSequenceNumberValue, getNumberOfActiveUnitsOfWork, getParentIdentityMapSession, getParentIdentityMapSession, getPartitioningPolicy, getPessimisticLockTimeoutDefault, getPessimisticLockTimeoutUnitDefault, getProfiler, getProject, getProperties, getQueries, getQuery, getQuery, getQueryBuilder, getQueryTimeoutDefault, getQueryTimeoutUnitDefault, getRefreshMetadataListener, getRootSession, getSerializer, getSessionForClass, getSessionForName, getSessionLog, getStaticMetamodelClass, getTablePerTenantDescriptors, getTablePerTenantQueries, getThreadsToWaitMergeManagerWaitingDeferredCacheKeysSnapshot, getTransactionMutex, handleException, handleSevere, hasBroker, hasCommitManager, hasDescriptor, hasEventManager, hasExceptionHandler, hasExternalTransactionController, hasProperties, hasTablePerTenantDescriptors, hasTablePerTenantQueries, incrementProfile, incrementProfile, info, insertObject, isBroker, isClassReadOnly, isClientSession, isConcurrent, isConnected, isDatabaseSession, isDistributedSession, isExclusiveConnectionRequired, isExclusiveIsolatedClientSession, isFinalizersEnabled, isHistoricalSession, isInBroker, isInProfile, isIsolatedClientSession, isJPAQueriesProcessed, isLoggingOff, isProtectedSession, isRemoteSession, isServerSession, isSessionBroker, isSynchronized, keyFromObject, load, load, log, log, log, log, log, log, log, log, logMessage, logMessage, logThrowable, postAcquireConnection, prepareDatabaseQuery, preReleaseConnection, priviledgedExecuteNonSelectingCall, priviledgedExecuteSelectingCall, processCommand, processJPAQueries, processJPAQuery, readAllObjects, readAllObjects, readAllObjects, readAllObjects, readObject, readObject, readObject, readObject, readObject, refreshAndLockObject, refreshAndLockObject, refreshObject, registerFinalizer, releaseConnectionAfterCall, releaseUnitOfWork, removeProperty, removeQuery, removeQuery, retrieveCacheKey, retryTransaction, rollbackExternalTransaction, setAccessor, setBroker, setCommandManager, setCommitManager, setDatasourceLogin, setDefaultReferenceMode, setEventManager, setExceptionHandler, setExternalTransactionController, setInjectionManager, setIntegrityChecker, setIsConcurrent, setIsFinalizersEnabled, setIsInBroker, setIsInProfile, setJPAQueriesProcessed, setLog, setLoggingOff, setLogin, setLogin, setLogLevel, setName, setNumberOfActiveUnitsOfWork, setPartitioningPolicy, setPessimisticLockTimeoutDefault, setPessimisticLockTimeoutUnitDefault, setProfiler, setProject, setProperties, setProperty, setQueries, setQueryBuilder, setQueryTimeoutDefault, setQueryTimeoutUnitDefault, setRefreshMetadataListener, setSerializer, setSessionLog, setShouldOptimizeResultSetAccess, setShouldPropagateChanges, setThreadsToWaitMergeManagerWaitingDeferredCacheKeys, setTolerateInvalidJPQL, setTransactionMutex, setWasJTSTransactionInternallyStarted, severe, shouldDisplayData, shouldLog, shouldLogMessages, shouldLogMessages, shouldOptimizeResultSetAccess, shouldPropagateChanges, shouldTolerateInvalidJPQL, startOperationProfile, startOperationProfile, unwrapObject, updateObject, updateProfile, updateTablePerTenantDescriptors, validateCache, validateQuery, warning, wasJTSTransactionInternallyStarted, wrapObject, writeAllObjectsWithChangeSet, writeObjectMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.persistence.sessions.Session
addJPAQuery, addQuery, clearIntegrityChecker, clearProfile, containsQuery, copy, copy, doesObjectExist, dontLogMessages, executeNonSelectingCall, executeNonSelectingSQL, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeSelectingCall, executeSQL, getActiveSession, getAsOfClause, getClassDescriptor, getClassDescriptor, getClassDescriptorForAlias, getDatasourceLogin, getDefaultReferenceMode, getDescriptor, getDescriptors, getEventManager, getExceptionHandler, getExternalTransactionController, getId, getIdentityMapAccessor, getIntegrityChecker, getJPAQueries, getLog, getLogin, getLogLevel, getLogLevel, getName, getNextSequenceNumberValue, getPartitioningPolicy, getProfiler, getProject, getProperties, getQueries, getQuery, getSerializer, getSessionLog, handleException, handleSevere, hasDescriptor, hasExceptionHandler, hasExternalTransactionController, isClientSession, isConnected, isDatabaseSession, isDistributedSession, isFinalizersEnabled, isInProfile, isRemoteSession, isServerSession, isSessionBroker, log, logMessage, readAllObjects, readAllObjects, readAllObjects, readObject, readObject, readObject, readObject, refreshObject, removeProperty, removeQuery, setDefaultReferenceMode, setExceptionHandler, setExternalTransactionController, setIntegrityChecker, setIsFinalizersEnabled, setLog, setLogLevel, setName, setPartitioningPolicy, setProfiler, setProperty, setQueryTimeoutDefault, setQueryTimeoutUnitDefault, setSerializer, setSessionLog, shouldLog, shouldLogMessages, validateCacheMethods inherited from interface org.eclipse.persistence.sessions.UnitOfWork
deleteAllObjects, deleteObject, isClassReadOnly, refreshAndLockObject, refreshAndLockObject
-
Field Details
-
newObjectsCache
-
unregisteredNewObjectsCache
-
isOnClient
protected boolean isOnClient -
parentSessionController
-
isFlush
protected boolean isFlush
-
-
Constructor Details
-
RemoteUnitOfWork
public RemoteUnitOfWork() -
RemoteUnitOfWork
-
RemoteUnitOfWork
-
RemoteUnitOfWork
-
RemoteUnitOfWork
-
-
Method Details
-
isFlush
public boolean isFlush() -
setIsFlush
public void setIsFlush(boolean isFlush) -
beginEarlyTransaction
PUBLIC: Tell the unit of work to begin a transaction now. By default the unit of work will begin a transaction at commit time. The default is the recommended approach, however sometimes it is necessary to start the transaction before commit time. When the unit of work commits, this transaction will be committed.- Specified by:
beginEarlyTransactionin interfaceUnitOfWork- Overrides:
beginEarlyTransactionin classUnitOfWorkImpl- Throws:
DatabaseException- See Also:
-
acquireUnitOfWork
The nested unit of work must also be remote.- Specified by:
acquireUnitOfWorkin interfaceSession- Overrides:
acquireUnitOfWorkin classUnitOfWorkImpl- See Also:
-
acquireUnitOfWork
The nested unit of work must also be remote.- Specified by:
acquireUnitOfWorkin interfaceSession- Overrides:
acquireUnitOfWorkin classAbstractSession- Parameters:
referenceMode- The reference type the UOW should use internally when referencing Working clones. Setting this to WEAK means the UOW will use weak references to reference clones that support active object change tracking and hard references for deferred change tracked objects. Setting to FORCE_WEAK means that all objects will be referenced by weak references and if the application no longer references the clone the clone may be garbage collected. If the clone has uncommitted changes then those changes will be lost.- See Also:
-
collectNewObjects
This is done to maintain correspondence between local new objects and returned new objects from serialization. Object correspondence is maintained by comparing primary keys but for new objects it is possible that primary key value is null as it is still not inserted. The returned new objects from serialization will have primary key value which will be inserted into corresponding local new objects. -
collectUnregisteredNewObjects
This is done to maintain correspondence between local unregistered new objects and returned unregistered new objects from serialization. Object correspondence is maintained by comparing primary keys but for unregistered new objects it is possible that primary key value is null as it is still not inserted. The returned unregistered new objects from serialization will have primary key value which will be inserted into corresponding local new objects. -
commitIntoRemoteUnitOfWork
protected void commitIntoRemoteUnitOfWork()The remote unit of work returned after its commit on the server is merged with remote unit of work on the remote side. -
writeChanges
public void writeChanges()Simulate a flush, current just begins a transaction and commits.- Specified by:
writeChangesin interfaceUnitOfWork- Overrides:
writeChangesin classRepeatableWriteUnitOfWork
-
commitRootUnitOfWork
public void commitRootUnitOfWork()Starts committing the remote unit of work. This must serialize the unit of work across to the server, commit the unit of work on the server, serialize it back and merge any server-side changes (such as sequence numbers) it into itself, then merge into the parent remote session.- Overrides:
commitRootUnitOfWorkin classRepeatableWriteUnitOfWork
-
calculateChanges
public UnitOfWorkChangeSet calculateChanges(Map registeredObjects, UnitOfWorkChangeSet changeSet, boolean assignSequences, boolean shouldCloneMap) INTERNAL: Changes are calculated on the client, so avoid recalculating them on the server.- Overrides:
calculateChangesin classUnitOfWorkImpl
-
resumeUnitOfWork
public void resumeUnitOfWork()INTERNAL: Resume is not required on the server.- Overrides:
resumeUnitOfWorkin classUnitOfWorkImpl
-
commitRootUnitOfWorkOnClient
protected void commitRootUnitOfWorkOnClient()Merges remote unit of work to parent remote session. -
executeQuery
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The named query can be defined on the remote session or the server-side session.- Specified by:
executeQueryin interfaceSession- Overrides:
executeQueryin classAbstractSession- Throws:
DatabaseException- See Also:
-
executeQuery
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The class is the descriptor in which the query was pre-defined. The query is executed on the server-side session.- Specified by:
executeQueryin interfaceSession- Overrides:
executeQueryin classAbstractSession- Throws:
DatabaseException- See Also:
-
executeQuery
public Object executeQuery(String queryName, Class<?> domainClass, Vector argumentValues) throws DatabaseException PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The class is the descriptor in which the query was pre-defined.- Overrides:
executeQueryin classAbstractSession- Throws:
DatabaseException- See Also:
-
executeQuery
PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse.- Overrides:
executeQueryin classAbstractSession- Throws:
DatabaseException- See Also:
-
getDescriptor
Return the table descriptor specified for the class.- Specified by:
getDescriptorin interfaceCoreSession<ClassDescriptor,Login, Platform, Project, SessionEventManager> - Specified by:
getDescriptorin interfaceSession- Overrides:
getDescriptorin classAbstractSession
-
getDescriptorForAlias
Return the table descriptor specified for the class.- Specified by:
getDescriptorForAliasin interfaceSession- Overrides:
getDescriptorForAliasin classAbstractSession- Parameters:
alias- The descriptor alias.- Returns:
- The descriptor for the alias or
nullif no descriptor was found.
-
getNewObjectsCache
Returns a new object cache -
getParentSessionController
INTERNAL: Method returns the parent RemoteSessionController for this Remote UnitOfWork Used to retrieve Valueholders that were used on the client -
getPlatform
INTERNAL: Return the database platform currently connected to. The platform is used for database specific behavior.- Specified by:
getPlatformin interfaceSession- Overrides:
getPlatformin classAbstractSession
-
getDatasourcePlatform
INTERNAL: Return the database platform currently connected to. The platform is used for database specific behavior.- Specified by:
getDatasourcePlatformin interfaceCoreSession<ClassDescriptor,Login, Platform, Project, SessionEventManager> - Specified by:
getDatasourcePlatformin interfaceSession- Overrides:
getDatasourcePlatformin classAbstractSession
-
getUnregisteredNewObjectsCache
Returns an unregistered new object cache -
internalExecuteQuery
public Object internalExecuteQuery(DatabaseQuery query, AbstractRecord Record) throws DatabaseException, QueryException INTERNAL: Return the results from exeucting the database query. the arguments should be a database row with raw data values.- Overrides:
internalExecuteQueryin classUnitOfWorkImpl- Throws:
DatabaseExceptionQueryException
-
isOnClient
protected boolean isOnClient() -
isRemoteUnitOfWork
public boolean isRemoteUnitOfWork()Return if this session is a unit of work.- Specified by:
isRemoteUnitOfWorkin interfaceSession- Overrides:
isRemoteUnitOfWorkin classAbstractSession
-
prepareForMergeIntoRemoteUnitOfWork
protected void prepareForMergeIntoRemoteUnitOfWork()The returned remote unit of work from the server is prepared to merge with local remote unit of work. -
reinitializeForSession
public void reinitializeForSession(AbstractSession session, RemoteSessionController parentSessionController) INTERNAL: Re-initialize for the server-side session. This is done when the uow is passed back to the server for committing. -
fixRemoteChangeSet
protected void fixRemoteChangeSet(UnitOfWorkChangeSet uowChangeSet, Map cloneMap, AbstractSession session) INTERNAL: Fix the transient fields in the serialized change set. -
setIsOnClient
protected void setIsOnClient(boolean isOnClient) -
setNewObjectsCache
Set a new object cache -
setParentSessionController
INTERNAL: Sets the parent RemoteSessionController for this Remote UnitOfWork Used to retrieve Valueholders that were used on the client -
setUnregisteredNewObjectsCache
Set unregistered new object cache -
toString
Avoid the toString printing the accessor and platform.- Overrides:
toStringin classAbstractSession
-
verifyDelete
TESTING: This is used by testing code to ensure that a deletion was successful.- Overrides:
verifyDeletein classAbstractSession
-