Purpose: Define the EclipseLink session public interface.
Description: This interface is meant to clarify the public protocol into EclipseLink. It also allows for non-subclasses of Session to conform to the EclipseLink API. It should be used as the applications main interface into the EclipseLink API to ensure compatibility between all EclipseLink sessions.
Responsibilities:
UnitOfWork, DatabaseSession, org.eclipse.persistence.internal.sessions.AbstractSession , org.eclipse.persistence.internal.sessions.DatabaseSessionImpl , org.eclipse.persistence.sessions.server.ServerSession , org.eclipse.persistence.sessions.server.ClientSession
| Modifier and Type | Method and Description |
|---|---|
| public Session | acquireHistoricalSession(AsOfClause
Represents a valid snap shot time. pastTime)ADVANCED: Returns a light weight read-only session where all objects are automatically read as of the specified past time. |
| public UnitOfWork | |
| public UnitOfWork | acquireUnitOfWork(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. referenceMode)PUBLIC: Return a unit of work for this session. |
| public void | addJPAQuery(DatabaseQuery query)
ADVANCED: Add a pre-defined not yet parsed JPQL String/query to the session to be parsed after descriptors are initialized. |
| public void | addQuery(String name, DatabaseQuery query)
PUBLIC: Add the query to the session queries with the given name. |
| public void | clearIntegrityChecker()
PUBLIC: clear the integrityChecker, the integrityChecker holds all the ClassDescriptor Exceptions. |
| public void | |
| public boolean | containsQuery(String queryName)
PUBLIC: Return true if the pre-defined query is defined on the session. |
| public Object | |
| public Object | copy(Object originalObjectOrObjects, AttributeGroup group)
PUBLIC: Return a complete copy of the object or collection of objects. |
| public boolean | |
| public void | |
| public int | |
| public void | |
| public Object | |
| public Object | executeQuery(String queryName, Class<?> domainClass)
PUBLIC: Execute the pre-defined query by name and return the result. |
| public Object | executeQuery(String queryName, Class<?> domainClass, Object arg1)
PUBLIC: Execute the pre-defined query by name and return the result. |
| public Object | executeQuery(String queryName, Class<?> domainClass, Object arg1, Object arg2)
PUBLIC: Execute the pre-defined query by name and return the result. |
| public Object | |
| public Object | executeQuery(String queryName, Class<?> domainClass, List<E> argumentValues)
PUBLIC: Execute the pre-defined query by name and return the result. |
| public Object | executeQuery(String queryName, Object arg1)
PUBLIC: Execute the pre-defined query by name and return the result. |
| public Object | executeQuery(String queryName, Object arg1, Object arg2)
PUBLIC: Execute the pre-defined query by name and return the result. |
| public Object | executeQuery(String queryName, Object arg1, Object arg2, Object arg3)
PUBLIC: Execute the pre-defined query by name and return the result. |
| public Object | executeQuery(String queryName, List<E> argumentValues)
PUBLIC: Execute the pre-defined query by name and return the result. |
| public Object | |
| public Object | executeQuery(DatabaseQuery query, List<E> argumentValues)
PUBLIC: Return the results from executing the database query. |
| public Vector | |
| public Vector | |
| public Session | getActiveSession()
PUBLIC: Return the active session for the current active external (JTS) transaction. |
| public UnitOfWork | getActiveUnitOfWork()
PUBLIC: Return the active unit of work for the current active external (JTS) transaction. |
| public AsOfClause | Returns: An immutable object representation of the past time.null if no clause set, or this a regular session.ADVANCED: Answers the past time this session is as of. |
| public ClassDescriptor | |
| public ClassDescriptor | getClassDescriptor(Object domainObject)
ADVANCED: Return the descriptor specified for the object's class. |
| public ClassDescriptor | |
| public Login | getDatasourceLogin()
Redeclares org. |
| public Platform | getDatasourcePlatform()
Redeclares org. |
| public ReferenceMode | getDefaultReferenceMode()
Stores the default Session wide reference mode that a UnitOfWork will use when referencing managed objects. |
| public ClassDescriptor | getDescriptor(Class<?> theClass)
Redeclares org. |
| public ClassDescriptor | getDescriptor(Object domainObject)
Redeclares org. |
| public ClassDescriptor | |
| public Map | getDescriptors()
Redeclares org. |
| public SessionEventManager | getEventManager()
Redeclares org. |
| public ExceptionHandler | getExceptionHandler()
PUBLIC: Return the ExceptionHandler.Exception handler can catch errors that occur on queries or during database access. |
| public ExternalTransactionController | |
| public Object | |
| public IdentityMapAccessor | getIdentityMapAccessor()
PUBLIC: The IdentityMapAccessor is the preferred way of accessing IdentityMap functions This will return an object which implements an interface which exposes all public IdentityMap functions. |
| public IntegrityChecker | getIntegrityChecker()
PUBLIC: Returns the integrityChecker,the integrityChecker holds all the ClassDescriptor Exceptions. |
| public List | |
| public Writer | |
| public DatabaseLogin | |
| public int | |
| public int | |
| public String | |
| public Number | getNextSequenceNumberValue(Class<?> domainClass)
ADVANCED: Return the sequence number from the database. |
| public PartitioningPolicy | |
| public DatabasePlatform | |
| public SessionProfiler | |
| public Project | getProject()
Redeclares org. |
| public Map | |
| public Object | |
| public Map | |
| public DatabaseQuery | |
| public DatabaseQuery | |
| public Serializer | |
| public ServerPlatform | |
| public SessionLog | |
| public Object | handleException(RuntimeException exception)
PUBLIC: Allow any WARNING level exceptions that occur within EclipseLink to be logged and handled by the exception handler. |
| public Object | handleSevere(RuntimeException exception)
PUBLIC: Allow any SEVERE level exceptions that occur within EclipseLink to be logged and handled by the exception handler. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| public void | |
| public Vector | readAllObjects(Class<?> domainClass)
PUBLIC: Read all of the instances of the class from the database. |
| public Vector | readAllObjects(Class<?> domainClass, Call aCall)
PUBLIC: Read all the instances of the class from the database returned through execution the Call string. |
| public Vector | readAllObjects(Class<?> domainClass, Expression selectionCriteria)
PUBLIC: Read all of the instances of the class from the database matching the given expression. |
| public Object | |
| public Object | readObject(Class<?> domainClass, Call aCall)
PUBLIC: Read the first instance of the class from the database returned through execution the Call string. |
| public Object | readObject(Class<?> domainClass, Expression selectionCriteria)
PUBLIC: Read the first instance of the class from the database matching the given expression. |
| public Object | readObject(Object object)
PUBLIC: Use the example object to construct a read object query by the objects primary key. |
| public Object | refreshObject(Object object)
PUBLIC: Refresh the attributes of the object and of all of its private parts from the database. |
| public void | |
| public void | |
| public void | |
| public void | setDefaultReferenceMode(ReferenceMode defaultReferenceMode)
Stores the default Session wide reference mode that a UnitOfWork will use when referencing managed objects. |
| public void | |
| public void | setExternalTransactionController(ExternalTransactionController externalTransactionController)
OBSOLETE: Previously used for JTS integration. |
| public void | setIntegrityChecker(IntegrityChecker integrityChecker)
PUBLIC: Set the integrityChecker, the integrityChecker holds all the ClassDescriptor Exceptions. |
| public void | setIsFinalizersEnabled(boolean isFinalizersEnabled)
PUBLIC: Set if this session's descendants should use finalizers. |
| public void | |
| public void | setLogLevel(int level)
Redeclares org. |
| public void | |
| public void | setPartitioningPolicy(PartitioningPolicy partitioningPolicy)
PUBLIC: Set the session's partitioning policy. |
| public void | |
| public void | |
| public void | setQueryTimeoutDefault(int queryTimeoutDefault)
PUBLIC: Set the default query timeout for this session. |
| public void | setQueryTimeoutUnitDefault(TimeUnit queryTimeoutDefault)
PUBLIC: Set the default query timeout units for this session. |
| public void | |
| public void | setSessionLog(SessionLog sessionLog)
PUBLIC: Set the session log to which an accessor logs messages and SQL. |
| public boolean | |
| public boolean | |
| public void |