public abstract class DistributedSession extends DatabaseSessionImpl
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING| Constructor and Description |
|---|
DistributedSession(RemoteConnection remoteConnection)
PUBLIC:
Creates a DistributedSession.
|
| Modifier and Type | Method and Description |
|---|---|
abstract UnitOfWorkImpl |
acquireUnitOfWork()
PUBLIC:
Return a unit of work for this session.
|
void |
beginTransaction()
PUBLIC:
Start a transaction on the server.
|
void |
commitTransaction()
PUBLIC:
Commit a transaction on the server.
|
void |
connect()
INTERNAL:
Connect not required.
|
RemoteCursoredStream |
cursorSelectObjects(CursoredStreamPolicy policy)
INTERNAL:
Return remote cursor stream.
|
RemoteScrollableCursor |
cursorSelectObjects(ScrollableCursorPolicy policy)
INTERNAL:
Return remote scrollable cursor
|
void |
disconnect()
INTERNAL:
Disconnect not required.
|
abstract java.lang.Object |
executeQuery(DatabaseQuery query)
Execute the database query.
|
java.lang.Object |
executeQuery(DatabaseQuery query,
AbstractRecord row)
INTERNAL:
Execute the database query.
|
java.lang.Object |
executeQuery(java.lang.String queryName)
PUBLIC:
Execute the pre-defined query by name and return the result.
|
java.lang.Object |
executeQuery(java.lang.String queryName,
java.lang.Class domainClass)
PUBLIC:
Execute the pre-defined query by name and return the result.
|
java.lang.Object |
executeQuery(java.lang.String queryName,
java.lang.Class domainClass,
java.util.Vector argumentValues)
PUBLIC:
Execute the pre-defined query by name and return the result.
|
java.lang.Object |
executeQuery(java.lang.String queryName,
java.util.Vector argumentValues)
PUBLIC:
Execute the pre-defined query by name and return the result.
|
java.util.Vector |
getDefaultReadOnlyClasses()
INTERNAL:
CR#2751
Returns the set of read-only classes for the receiver.
|
ClassDescriptor |
getDescriptor(java.lang.Class domainClass)
INTERNAL:
Return the table descriptor specified for the class.
|
ClassDescriptor |
getDescriptorCorrespondingTo(ClassDescriptor descriptor)
INTERNAL:
Return the descriptor.
|
ClassDescriptor |
getDescriptorForAlias(java.lang.String alias)
INTERNAL:
Return the table descriptor specified for the class.
|
abstract java.lang.Object |
getObjectCorrespondingTo(java.lang.Object serverSideDomainObject,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query)
INTERNAL:
Return the corresponding objects from the remote session for the objects read from the server.
|
abstract java.lang.Object |
getObjectsCorrespondingToAll(java.lang.Object serverSideDomainObjects,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
ContainerPolicy containerPolicy)
INTERNAL:
Return the corresponding objects from the remote session for the objects read from the server.
|
RemoteConnection |
getRemoteConnection()
INTERNAL:
Return the remote connection.
|
boolean |
hasCorrespondingDescriptor(ClassDescriptor descriptor)
INTERNAL:
Checks if the descriptor exists or not.
|
void |
initializeIdentityMapAccessor()
INTERNAL:
Set up the IdentityMapManager.
|
abstract java.lang.Object |
instantiateRemoteValueHolderOnServer(RemoteValueHolder remoteValueHolder)
INTERNAL:
This will instantiate value holder on the server.
|
boolean |
isConnected()
PUBLIC:
Return if this session is connected to the server.
|
boolean |
isDistributedSession()
INTERNAL:
Return if this session is a distributed session.
|
boolean |
isMetadataRemote()
ADVANCED:
Return if the descriptors and meta-data should be serialized from the server,
or if they will be provided locally.
|
boolean |
isRemoteSession()
INTERNAL:
Return if this session is a remote session.
|
void |
login()
PUBLIC:
Connect to the database using the predefined login.
|
void |
loginAndDetectDatasource()
PUBLIC:
Connect to the database using the predefined login.
|
void |
logout()
PUBLIC:
Logout the session, close the remote connection and release the hold resources
|
void |
privilegedAddDescriptor(ClassDescriptor descriptor)
INTERNAL:
You cannot add descriptors to a remote session.
|
void |
rollbackTransaction()
PUBLIC:
Rollback a transaction on the server.
|
void |
setIsMetadataRemote(boolean isMetadataRemote)
ADVANCED:
Set if the descriptors and meta-data should be serialized from the server,
or if they will be provided locally.
|
void |
setRemoteConnection(RemoteConnection remoteConnection)
INTERNAL:
Set the remote connection.
|
java.lang.String |
toString()
PUBLIC:
Avoid printing the accessor and platform.
|
addDescriptor, addDescriptors, addDescriptors, addDescriptorsToSequencing, addSequence, getConnectedTime, getDatabaseEventListener, getDatasourcePlatform, getPlatform, getPlatform, getSequencing, getSequencingControl, getServerPlatform, getTuner, initializeConnectedTime, initializeDescriptorIfSessionAlive, initializeDescriptors, initializeDescriptors, initializeDescriptors, initializeDescriptors, initializeDescriptors, initializeSequencing, isDatabaseSession, isLoggedIn, isProtectedSession, isSequencingCallbackRequired, login, login, postLogin, releaseJTSConnection, retryQuery, setDatabaseEventListener, setDatasourceAndInitialize, setServerPlatform, setTuner, writeAllObjects, writeAllObjectsacquireHistoricalSession, acquireNonSynchronizedUnitOfWork, acquireNonSynchronizedUnitOfWork, acquireRepeatableWriteUnitOfWork, acquireUnitOfWork, addAlias, addJPAQuery, addJPATablePerTenantQuery, addMultitenantContextProperty, addQuery, addQuery, addStaticMetamodelClass, basicExecuteCall, beginExternalTransaction, checkAndRefreshInvalidObject, cleanUpEntityListenerInjectionManager, clearDescriptors, clearIntegrityChecker, clearLastDescriptorAccessed, clearProfile, clone, commitExternalTransaction, compareObjects, compareObjectsDontMatch, config, containsQuery, copy, copy, copyDescriptorNamedQueries, copyDescriptorsFromProject, copyInternal, copyObject, copyObject, copyReadOnlyClasses, createCloneQueryValueHolder, createCloneTransformationValueHolder, createEntityListenerInjectionManager, createProtectedInstanceFromCachedData, deferEvent, deleteAllObjects, deleteAllObjects, deleteObject, doesObjectExist, dontLogMessages, endOperationProfile, endOperationProfile, executeCall, executeDeferredEvents, executeNonSelectingCall, executeNonSelectingSQL, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeSelectingCall, executeSQL, fine, finer, finest, getAccessor, getAccessors, getAccessors, getActiveCommandThreads, getActiveSession, getActiveUnitOfWork, getAliasDescriptors, getAllQueries, getAsOfClause, getAttributeGroups, getBroker, getClassDescriptor, getClassDescriptor, getClassDescriptorForAlias, getCommandManager, getCommitManager, getDatasourceLogin, getDefaultReferenceMode, getDescriptor, getDescriptors, getEntityListenerInjectionManager, getEventManager, getExceptionHandler, getExceptionHandlerClass, getExecutionSession, getExternalTransactionController, getId, getIdentityMapAccessor, getIdentityMapAccessorInstance, getIntegrityChecker, getJPAQueries, getJPATablePerTenantQueries, getLoader, getLog, getLogin, getLogLevel, getLogLevel, getLogSessionString, getMappedSuperclass, getMultitenantContextProperties, getName, getNextQueryId, getNextSequenceNumberValue, getNumberOfActiveUnitsOfWork, getParent, getParentIdentityMapSession, getParentIdentityMapSession, getParentIdentityMapSession, getPartitioningPolicy, getPessimisticLockTimeoutDefault, getProfiler, getProject, getProperties, getProperty, getQueries, getQuery, getQuery, getQuery, getQuery, getQueryBuilder, getQueryTimeoutDefault, getRefreshMetadataListener, getRootSession, getSerializer, getSessionForClass, getSessionForName, getSessionLog, getSessionTypeString, getStaticMetamodelClass, getTablePerTenantDescriptors, getTablePerTenantQueries, getTransactionMutex, handleException, handleSevere, hasBroker, hasCommitManager, hasDescriptor, hasEventManager, hasExceptionHandler, hasExternalTransactionController, hasProperties, hasTablePerTenantDescriptors, hasTablePerTenantQueries, incrementProfile, incrementProfile, info, insertObject, internalExecuteQuery, isBroker, isClassReadOnly, isClassReadOnly, isClientSession, isConcurrent, isConsideredInvalid, isExclusiveConnectionRequired, isExclusiveIsolatedClientSession, isFinalizersEnabled, isHistoricalSession, isInBroker, isInProfile, isInTransaction, isIsolatedClientSession, isJPAQueriesProcessed, isLoggingOff, isRemoteUnitOfWork, isServerSession, isSessionBroker, isSynchronized, isUnitOfWork, keyFromObject, keyFromObject, load, load, log, log, log, log, log, log, log, log, log, log, logMessage, logMessage, logThrowable, postAcquireConnection, prepareDatabaseQuery, preReleaseConnection, priviledgedExecuteNonSelectingCall, priviledgedExecuteSelectingCall, processCommand, processJPAQueries, readAllObjects, readAllObjects, readAllObjects, readAllObjects, readObject, readObject, readObject, readObject, readObject, refreshAndLockObject, refreshAndLockObject, refreshObject, registerFinalizer, release, releaseConnectionAfterCall, releaseReadConnection, releaseUnitOfWork, removeProperty, removeQuery, removeQuery, retrieveCacheKey, retryTransaction, setAccessor, setBroker, setCommandManager, setCommitManager, setDatasourceLogin, setDefaultReferenceMode, setEntityListenerInjectionManager, setEventManager, setExceptionHandler, setExternalTransactionController, setIntegrityChecker, setIsConcurrent, setIsFinalizersEnabled, setIsInBroker, setIsInProfile, setJPAQueriesProcessed, setLog, setLoggingOff, setLogin, setLogin, setLogLevel, setName, setPartitioningPolicy, setPessimisticLockTimeoutDefault, setProfiler, setProject, setProperties, setProperty, setQueries, setQueryBuilder, setQueryTimeoutDefault, setRefreshMetadataListener, setSerializer, setSessionLog, setShouldOptimizeResultSetAccess, setShouldPropagateChanges, setSynchronized, setTolerateInvalidJPQL, setWasJTSTransactionInternallyStarted, severe, shouldDisplayData, shouldLog, shouldLogMessages, shouldLogMessages, shouldOptimizeResultSetAccess, shouldPropagateChanges, shouldTolerateInvalidJPQL, startOperationProfile, startOperationProfile, unwrapObject, updateObject, updateProfile, updateTablePerTenantDescriptors, validateCache, validateQuery, verifyDelete, warning, wasJTSTransactionInternallyStarted, wrapObject, writeObject, writesCompletedequals, getClass, hashCode, notify, notifyAll, wait, wait, waitdeleteAllObjects, deleteObject, getCommandManager, insertObject, isInTransaction, refreshAndLockObject, refreshAndLockObject, setCommandManager, setDatasourceLogin, setExternalTransactionController, setLogin, setShouldPropagateChanges, shouldPropagateChanges, updateObject, writeObjectacquireHistoricalSession, acquireUnitOfWork, addJPAQuery, addQuery, clearIntegrityChecker, clearProfile, containsQuery, copy, copy, copyObject, copyObject, doesObjectExist, dontLogMessages, executeNonSelectingCall, executeNonSelectingSQL, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeSelectingCall, executeSQL, getActiveSession, getActiveUnitOfWork, 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, getProperty, getQueries, getQuery, getQuery, getSerializer, getSessionLog, handleException, handleSevere, hasDescriptor, hasExceptionHandler, hasExternalTransactionController, isClientSession, isFinalizersEnabled, isInProfile, isRemoteUnitOfWork, isServerSession, isSessionBroker, isUnitOfWork, keyFromObject, log, logMessage, readAllObjects, readAllObjects, readAllObjects, readObject, readObject, readObject, readObject, refreshObject, release, removeProperty, removeQuery, setDefaultReferenceMode, setExceptionHandler, setIntegrityChecker, setIsFinalizersEnabled, setLog, setLogLevel, setName, setPartitioningPolicy, setProfiler, setProperty, setQueryTimeoutDefault, setSerializer, setSessionLog, shouldLog, shouldLogMessages, validateCachepublic DistributedSession(RemoteConnection remoteConnection)
remoteConnection - remote session requires a remote connection. This must be accessed remotely from the client through RMI or CORBA.public abstract UnitOfWorkImpl acquireUnitOfWork()
acquireUnitOfWork in interface SessionacquireUnitOfWork in class AbstractSessionUnitOfWorkImplpublic void beginTransaction()
beginTransaction in interface DatabaseSessionbeginTransaction in class AbstractSessionAbstractSession.isInTransaction()public void commitTransaction()
commitTransaction in interface DatabaseSessioncommitTransaction in class AbstractSessionpublic RemoteCursoredStream cursorSelectObjects(CursoredStreamPolicy policy)
public RemoteScrollableCursor cursorSelectObjects(ScrollableCursorPolicy policy)
public java.lang.Object executeQuery(java.lang.String queryName)
throws DatabaseException
executeQuery in interface SessionexecuteQuery in class AbstractSessionDatabaseExceptionAbstractSession.addQuery(String, DatabaseQuery)public java.lang.Object executeQuery(java.lang.String queryName,
java.lang.Class domainClass)
throws DatabaseException
executeQuery in interface SessionexecuteQuery in class AbstractSessionDatabaseExceptionDescriptorQueryManager.addQuery(String, DatabaseQuery)public java.lang.Object executeQuery(java.lang.String queryName,
java.lang.Class domainClass,
java.util.Vector argumentValues)
throws DatabaseException
executeQuery in class AbstractSessionDatabaseExceptionDescriptorQueryManager.addQuery(String, DatabaseQuery)public java.lang.Object executeQuery(java.lang.String queryName,
java.util.Vector argumentValues)
throws DatabaseException
executeQuery in class AbstractSessionDatabaseExceptionAbstractSession.addQuery(String, DatabaseQuery)public abstract java.lang.Object executeQuery(DatabaseQuery query)
executeQuery in interface SessionexecuteQuery in class AbstractSessionDatabaseQuerypublic java.lang.Object executeQuery(DatabaseQuery query, AbstractRecord row)
executeQuery in class AbstractSessionpublic java.util.Vector getDefaultReadOnlyClasses()
getDefaultReadOnlyClasses in class AbstractSessionorg.eclipse.persistence.sessions.Project#setDefaultReadOnlyClasses(Vector)public ClassDescriptor getDescriptor(java.lang.Class domainClass)
getDescriptor in interface CoreSession<ClassDescriptor,Login,Platform,Project,SessionEventManager>getDescriptor in interface SessiongetDescriptor in class AbstractSessionpublic ClassDescriptor getDescriptorForAlias(java.lang.String alias)
getDescriptorForAlias in interface SessiongetDescriptorForAlias in class AbstractSessionalias - The descriptor alias.public ClassDescriptor getDescriptorCorrespondingTo(ClassDescriptor descriptor)
public abstract java.lang.Object getObjectCorrespondingTo(java.lang.Object serverSideDomainObject,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query)
public abstract java.lang.Object getObjectsCorrespondingToAll(java.lang.Object serverSideDomainObjects,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
ContainerPolicy containerPolicy)
public RemoteConnection getRemoteConnection()
public boolean hasCorrespondingDescriptor(ClassDescriptor descriptor)
public void initializeIdentityMapAccessor()
initializeIdentityMapAccessor in class AbstractSessionpublic abstract java.lang.Object instantiateRemoteValueHolderOnServer(RemoteValueHolder remoteValueHolder)
public boolean isConnected()
isConnected in interface SessionisConnected in class AbstractSessionpublic boolean isDistributedSession()
isDistributedSession in interface SessionisDistributedSession in class AbstractSessionpublic boolean isRemoteSession()
isRemoteSession in interface SessionisRemoteSession in class AbstractSessionpublic void privilegedAddDescriptor(ClassDescriptor descriptor)
public void rollbackTransaction()
rollbackTransaction in interface DatabaseSessionrollbackTransaction in class AbstractSessionpublic void setRemoteConnection(RemoteConnection remoteConnection)
public java.lang.String toString()
toString in class AbstractSessionpublic void logout()
logout in interface DatabaseSessionlogout in class DatabaseSessionImplpublic boolean isMetadataRemote()
public void setIsMetadataRemote(boolean isMetadataRemote)
public void connect()
throws DatabaseException
connect in class DatabaseSessionImplDatabaseExceptionpublic void disconnect()
throws DatabaseException
disconnect in class DatabaseSessionImplDatabaseExceptionpublic void loginAndDetectDatasource()
throws DatabaseException
loginAndDetectDatasource in class DatabaseSessionImplDatabaseExceptionpublic void login()
throws DatabaseException
login in interface DatabaseSessionlogin in class DatabaseSessionImplDatabaseExceptionDatabaseSessionImpl.login(Login)EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference