EclipseLink 1.0_1.0M2 API Reference - Incubation

org.eclipse.persistence.sessions.remote
Class DistributedSession

java.lang.Object
  extended by AbstractSession
      extended by org.eclipse.persistence.sessions.remote.DistributedSession
Direct Known Subclasses:
RemoteSession

public abstract class DistributedSession
extends AbstractSession

Purpose: Super class to all remote client session's.


Field Summary
protected  RemoteConnection remoteConnection
           
 
Constructor Summary
protected DistributedSession(int nothing)
          INTERNAL: Create a blank session, used for proxy session.
 
Method Summary
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.
 RemoteCursoredStream cursorSelectObjects(CursoredStreamPolicy policy)
          INTERNAL: Return remote cursor stream.
 RemoteScrollableCursor cursorSelectObjects(ScrollableCursorPolicy policy)
          INTERNAL: Return remote scrollable cursor
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.
abstract  java.lang.Object getObjectCorrespondingTo(java.lang.Object serverSideDomainObject, IdentityHashtable objectDescriptors, IdentityHashtable 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, IdentityHashtable objectDescriptors, IdentityHashtable 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 isRemoteSession()
          INTERNAL: Return if this session is a remote session.
 void privilegedAddDescriptor(ClassDescriptor descriptor)
          INTERNAL: You cannot add descriptors to a remote session.
 void release()
          PUBLIC: Logout the session, close the remote connection and release the hold resources
 void rollbackTransaction()
          PUBLIC: Rollback a transaction on the server.
protected  void setRemoteConnection(RemoteConnection remoteConnection)
          INTERNAL: Set the remote connection.
 java.lang.String toString()
          PUBLIC: Avoid printing the accessor and platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

remoteConnection

protected transient RemoteConnection remoteConnection
Constructor Detail

DistributedSession

protected DistributedSession(int nothing)
INTERNAL: Create a blank session, used for proxy session.

Method Detail

acquireUnitOfWork

public abstract UnitOfWorkImpl acquireUnitOfWork()
PUBLIC: Return a unit of work for this session. The unit of work is an object level transaction that allows a group of changes to be applied as a unit.

See Also:
UnitOfWorkImpl

beginTransaction

public void beginTransaction()
PUBLIC: Start a transaction on the server. A unit of work should normally be used instead of transactions for the remote session.


commitTransaction

public void commitTransaction()
PUBLIC: Commit a transaction on the server. A unit of work should normally be used instead of transactions for the remote session.


cursorSelectObjects

public RemoteCursoredStream cursorSelectObjects(CursoredStreamPolicy policy)
INTERNAL: Return remote cursor stream.


cursorSelectObjects

public RemoteScrollableCursor cursorSelectObjects(ScrollableCursorPolicy policy)
INTERNAL: Return remote scrollable cursor


executeQuery

public java.lang.Object executeQuery(java.lang.String queryName)
                              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 named query can be defined on the remote session or the server-side session.

Throws:
DatabaseException
See Also:
#addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Class domainClass)
                              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. The query is executed on the server-side session.

Throws:
DatabaseException
See Also:
DescriptorQueryManager.addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Class domainClass,
                                     java.util.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.

Throws:
DatabaseException
See Also:
DescriptorQueryManager.addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.util.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.

Throws:
DatabaseException
See Also:
#addQuery(String, DatabaseQuery)

executeQuery

public abstract java.lang.Object executeQuery(DatabaseQuery query)
Execute the database query.


executeQuery

public java.lang.Object executeQuery(DatabaseQuery query,
                                     AbstractRecord row)
INTERNAL: Execute the database query.


getDefaultReadOnlyClasses

public java.util.Vector getDefaultReadOnlyClasses()
INTERNAL: CR#2751 Returns the set of read-only classes for the receiver. These class come from the Remote connection

Returns:
A Vector containing the Java Classes that are currently read-only.

getDescriptor

public ClassDescriptor getDescriptor(java.lang.Class domainClass)
INTERNAL: Return the table descriptor specified for the class.


getDescriptorCorrespondingTo

public ClassDescriptor getDescriptorCorrespondingTo(ClassDescriptor descriptor)
INTERNAL: Return the descriptor.


getObjectCorrespondingTo

public abstract java.lang.Object getObjectCorrespondingTo(java.lang.Object serverSideDomainObject,
                                                          IdentityHashtable objectDescriptors,
                                                          IdentityHashtable processedObjects,
                                                          ObjectLevelReadQuery query)
INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.


getObjectsCorrespondingToAll

public abstract java.lang.Object getObjectsCorrespondingToAll(java.lang.Object serverSideDomainObjects,
                                                              IdentityHashtable objectDescriptors,
                                                              IdentityHashtable processedObjects,
                                                              ObjectLevelReadQuery query,
                                                              ContainerPolicy containerPolicy)
INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.


getRemoteConnection

public RemoteConnection getRemoteConnection()
INTERNAL: Return the remote connection.


hasCorrespondingDescriptor

public boolean hasCorrespondingDescriptor(ClassDescriptor descriptor)
INTERNAL: Checks if the descriptor exists or not.


initializeIdentityMapAccessor

public void initializeIdentityMapAccessor()
INTERNAL: Set up the IdentityMapManager. Overrides the default IdentityMapManager


instantiateRemoteValueHolderOnServer

public abstract java.lang.Object instantiateRemoteValueHolderOnServer(RemoteValueHolder remoteValueHolder)
INTERNAL: This will instantiate value holder on the server.


isConnected

public boolean isConnected()
PUBLIC: Return if this session is connected to the server.


isDistributedSession

public boolean isDistributedSession()
INTERNAL: Return if this session is a distributed session.


isRemoteSession

public boolean isRemoteSession()
INTERNAL: Return if this session is a remote session.


privilegedAddDescriptor

public void privilegedAddDescriptor(ClassDescriptor descriptor)
INTERNAL: You cannot add descriptors to a remote session. This is a internal method used by TopLink


rollbackTransaction

public void rollbackTransaction()
PUBLIC: Rollback a transaction on the server. A unit of work should normally be used instead of transactions for the remote session.


setRemoteConnection

protected void setRemoteConnection(RemoteConnection remoteConnection)
INTERNAL: Set the remote connection.


toString

public java.lang.String toString()
PUBLIC: Avoid printing the accessor and platform.


release

public void release()
PUBLIC: Logout the session, close the remote connection and release the hold resources


EclipseLink 1.0_1.0M2 API Reference - Incubation