Module org.eclipse.persistence.core
Package org.eclipse.persistence.sessions
Class SessionEventAdapter
java.lang.Object
org.eclipse.persistence.sessions.SessionEventAdapter
- All Implemented Interfaces:
EventListener
,CoreSessionEventListener
,SessionEventListener
- Direct Known Subclasses:
MissingDescriptorListener
,SessionEventListener
Purpose: To provide a trivial implemetation of SessionEventListener. You may subclass this class rather than implement the entire SessonEventListener interface in cases where only a small subset of the interface methods are needed.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
missingDescriptor
(SessionEvent event) PUBLIC: This event is raised on the session if a descriptor is missing for a class being persisted.void
moreRowsDetected
(SessionEvent event) PUBLIC: This event is raised on the session after read object query detected more than a single row back from the database.void
noRowsModified
(SessionEvent event) PUBLIC: This event is raised on the session after update or delete SQL has been sent to the database but a row count of zero was returned.void
PUBLIC: This event is raised on the session after a stored procedure call has been executed that had output parameters.void
PUBLIC: This event is raised on the client session after creation/acquiring.void
PUBLIC: This event is raised on when using the server/client sessions.void
PUBLIC: This event is raised when a ClientSession, with Isolated data, acquires an exclusive connection.void
PUBLIC: This event is raised on the unit of work after creation/acquiring.void
postBeginTransaction
(SessionEvent event) PUBLIC: This event is raised after a database transaction is started.void
PUBLIC: This event is raised after the commit has begun on the UnitOfWork and after the changes are calculated.void
PUBLIC: This event is raised after a database transaction is commited.void
postCommitUnitOfWork
(SessionEvent event) PUBLIC: This event is raised on the unit of work after commit.void
postConnect
(SessionEvent event) PUBLIC: This event is raised after the session connects to the database.void
PUBLIC: This even will be raised after a UnitOfWorkChangeSet has been merged When that changeSet has been received from a distributed sessionvoid
postExecuteCall
(SessionEvent event) PUBLIC: This event is raised after the execution of every call against the session.void
postExecuteQuery
(SessionEvent event) PUBLIC: This event is raised after the execution of every query against the session.void
postFlushUnitOfWork
(SessionEvent event) PUBLIC: This event is raised on the unit of work after a flush.void
postLogin
(SessionEvent event) PUBLIC: This Event is raised after the session logs in.void
postLogout
(SessionEvent event) PUBLIC: This Event is raised after the session logs out.void
PUBLIC: This even will be raised after a UnitOfWorkChangeSet has been mergedvoid
PUBLIC: This event is raised on the client session after releasing.void
PUBLIC: This event is raised on the unit of work after release.void
postResumeUnitOfWork
(SessionEvent event) PUBLIC: This event is raised on the unit of work after resuming.void
PUBLIC: This event is raised after a database transaction is rolledback.void
preBeginTransaction
(SessionEvent event) PUBLIC: This event is raised before a database transaction is started.void
PUBLIC: This event is raised after the commit has begun on the UnitOfWork but before the changes are calculated.void
preCommitTransaction
(SessionEvent event) PUBLIC: This event is raised before a database transaction is commited.void
preCommitUnitOfWork
(SessionEvent event) PUBLIC: This event is raised on the unit of work before commit.void
PUBLIC: This even will be raised before a UnitOfWorkChangeSet has been merged When that changeSet has been received from a distributed sessionvoid
preExecuteCall
(SessionEvent event) PUBLIC: This event is raised before the execution of every call against the session.void
preExecuteQuery
(SessionEvent event) PUBLIC: This event is raised before the execution of every query against the session.void
preFlushUnitOfWork
(SessionEvent event) PUBLIC: This event is raised on the unit of work before a flush.void
preLogin
(SessionEvent event) PUBLIC: This Event is raised before the session logs in.void
preLogout
(SessionEvent event) PUBLIC: This Event is raised before the session logs out.void
PUBLIC: This even will be raised before a UnitOfWorkChangeSet has been mergedvoid
prepareUnitOfWork
(SessionEvent event) PUBLIC: This event is raised on the unit of work after the SQL has been flushed, but the commit transaction has not been executed.void
PUBLIC: This event is raised on the client session before releasing.void
preReleaseConnection
(SessionEvent event) PUBLIC: This event is raised on when using the server/client sessions.void
PUBLIC: This event is fired just before a Client Session, with isolated data, releases its Exclusive Connectionvoid
preReleaseUnitOfWork
(SessionEvent event) PUBLIC: This event is raised on the unit of work before release.void
PUBLIC: This event is raised before a database transaction is rolledback.
-
Constructor Details
-
SessionEventAdapter
public SessionEventAdapter()
-
-
Method Details
-
missingDescriptor
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the session if a descriptor is missing for a class being persisted. This can be used to lazy register the descriptor or set of descriptors.- Specified by:
missingDescriptor
in interfaceSessionEventListener
-
moreRowsDetected
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the session after read object query detected more than a single row back from the database. The "result" of the event will be the call. Some applications may want to interpret this as an error or warning condition.- Specified by:
moreRowsDetected
in interfaceSessionEventListener
-
noRowsModified
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the session after update or delete SQL has been sent to the database but a row count of zero was returned.- Specified by:
noRowsModified
in interfaceSessionEventListener
-
outputParametersDetected
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the session after a stored procedure call has been executed that had output parameters. If the proc was used to override an insert/update/delete operation then EclipseLink will not be expecting any return value. This event mechanism allows for a listener to be registered before the proc is call to process the output values. The event "result" will contain a Record of the output values, and property "call" will be the StoredProcedureCall.- Specified by:
outputParametersDetected
in interfaceSessionEventListener
-
postAcquireClientSession
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the client session after creation/acquiring.- Specified by:
postAcquireClientSession
in interfaceSessionEventListener
-
postAcquireConnection
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on when using the server/client sessions. This event is raised after a connection is acquired from a connection pool.- Specified by:
postAcquireConnection
in interfaceSessionEventListener
-
postAcquireExclusiveConnection
Description copied from interface:SessionEventListener
PUBLIC: This event is raised when a ClientSession, with Isolated data, acquires an exclusive connection. The event will contain the ClientSession that is being acquired. Users can set properties within the ConnectionPolicy of that ClientSession for access within this event.- Specified by:
postAcquireExclusiveConnection
in interfaceSessionEventListener
-
postAcquireUnitOfWork
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the unit of work after creation/acquiring. This will be raised on nest units of work.- Specified by:
postAcquireUnitOfWork
in interfaceSessionEventListener
-
postBeginTransaction
Description copied from interface:SessionEventListener
PUBLIC: This event is raised after a database transaction is started. It is not raised for nested transactions.- Specified by:
postBeginTransaction
in interfaceSessionEventListener
-
preCalculateUnitOfWorkChangeSet
Description copied from interface:SessionEventListener
PUBLIC: This event is raised after the commit has begun on the UnitOfWork but before the changes are calculated.- Specified by:
preCalculateUnitOfWorkChangeSet
in interfaceSessionEventListener
-
postCalculateUnitOfWorkChangeSet
Description copied from interface:SessionEventListener
PUBLIC: This event is raised after the commit has begun on the UnitOfWork and after the changes are calculated. The UnitOfWorkChangeSet, at this point, will contain changeSets without the version fields updated and without IdentityField type primary keys. These will be updated after the insert, or update, of the object- Specified by:
postCalculateUnitOfWorkChangeSet
in interfaceSessionEventListener
-
postCommitTransaction
Description copied from interface:SessionEventListener
PUBLIC: This event is raised after a database transaction is commited. It is not raised for nested transactions.- Specified by:
postCommitTransaction
in interfaceSessionEventListener
-
postCommitUnitOfWork
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the unit of work after commit. This will be raised on nest units of work.- Specified by:
postCommitUnitOfWork
in interfaceSessionEventListener
-
postFlushUnitOfWork
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the unit of work after a flush.- Specified by:
postFlushUnitOfWork
in interfaceSessionEventListener
-
postDistributedMergeUnitOfWorkChangeSet
Description copied from interface:SessionEventListener
PUBLIC: This even will be raised after a UnitOfWorkChangeSet has been merged When that changeSet has been received from a distributed session- Specified by:
postDistributedMergeUnitOfWorkChangeSet
in interfaceSessionEventListener
-
postMergeUnitOfWorkChangeSet
Description copied from interface:SessionEventListener
PUBLIC: This even will be raised after a UnitOfWorkChangeSet has been merged- Specified by:
postMergeUnitOfWorkChangeSet
in interfaceSessionEventListener
-
postConnect
Description copied from interface:SessionEventListener
PUBLIC: This event is raised after the session connects to the database. In a server session this event is raised on every new connection established.- Specified by:
postConnect
in interfaceSessionEventListener
-
postExecuteCall
Description copied from interface:SessionEventListener
PUBLIC: This event is raised after the execution of every call against the session. The event contains the call and call result. This differs from query execution in that the call has been translated.- Specified by:
postExecuteCall
in interfaceSessionEventListener
-
postExecuteQuery
Description copied from interface:SessionEventListener
PUBLIC: This event is raised after the execution of every query against the session. The event contains the query and query result.- Specified by:
postExecuteQuery
in interfaceSessionEventListener
-
postReleaseClientSession
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the client session after releasing.- Specified by:
postReleaseClientSession
in interfaceSessionEventListener
-
postReleaseUnitOfWork
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the unit of work after release. This will be raised on nest units of work.- Specified by:
postReleaseUnitOfWork
in interfaceSessionEventListener
-
postResumeUnitOfWork
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the unit of work after resuming. This occurs after pre/postCommit.- Specified by:
postResumeUnitOfWork
in interfaceSessionEventListener
-
postRollbackTransaction
Description copied from interface:SessionEventListener
PUBLIC: This event is raised after a database transaction is rolledback. It is not raised for nested transactions.- Specified by:
postRollbackTransaction
in interfaceSessionEventListener
-
preBeginTransaction
Description copied from interface:SessionEventListener
PUBLIC: This event is raised before a database transaction is started. It is not raised for nested transactions.- Specified by:
preBeginTransaction
in interfaceSessionEventListener
-
preCommitTransaction
Description copied from interface:SessionEventListener
PUBLIC: This event is raised before a database transaction is commited. It is not raised for nested transactions.- Specified by:
preCommitTransaction
in interfaceSessionEventListener
-
preCommitUnitOfWork
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the unit of work before commit. This will be raised on nest units of work.- Specified by:
preCommitUnitOfWork
in interfaceSessionEventListener
-
preFlushUnitOfWork
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the unit of work before a flush.- Specified by:
preFlushUnitOfWork
in interfaceSessionEventListener
-
preExecuteCall
Description copied from interface:SessionEventListener
PUBLIC: This event is raised before the execution of every call against the session. The event contains the call to be executed. This differs from query execution in that the call has been translated.- Specified by:
preExecuteCall
in interfaceSessionEventListener
-
preExecuteQuery
Description copied from interface:SessionEventListener
PUBLIC: This event is raised before the execution of every query against the session. The event contains the query to be executed.- Specified by:
preExecuteQuery
in interfaceSessionEventListener
-
prepareUnitOfWork
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the unit of work after the SQL has been flushed, but the commit transaction has not been executed. It is similar to the JTS prepare phase.- Specified by:
prepareUnitOfWork
in interfaceSessionEventListener
-
preReleaseClientSession
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the client session before releasing.- Specified by:
preReleaseClientSession
in interfaceSessionEventListener
-
preReleaseConnection
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on when using the server/client sessions. This event is raised before a connection is released into a connection pool.- Specified by:
preReleaseConnection
in interfaceSessionEventListener
-
preReleaseExclusiveConnection
Description copied from interface:SessionEventListener
PUBLIC: This event is fired just before a Client Session, with isolated data, releases its Exclusive Connection- Specified by:
preReleaseExclusiveConnection
in interfaceSessionEventListener
-
preReleaseUnitOfWork
Description copied from interface:SessionEventListener
PUBLIC: This event is raised on the unit of work before release. This will be raised on nest units of work.- Specified by:
preReleaseUnitOfWork
in interfaceSessionEventListener
-
preDistributedMergeUnitOfWorkChangeSet
Description copied from interface:SessionEventListener
PUBLIC: This even will be raised before a UnitOfWorkChangeSet has been merged When that changeSet has been received from a distributed session- Specified by:
preDistributedMergeUnitOfWorkChangeSet
in interfaceSessionEventListener
-
preMergeUnitOfWorkChangeSet
Description copied from interface:SessionEventListener
PUBLIC: This even will be raised before a UnitOfWorkChangeSet has been merged- Specified by:
preMergeUnitOfWorkChangeSet
in interfaceSessionEventListener
-
preRollbackTransaction
Description copied from interface:SessionEventListener
PUBLIC: This event is raised before a database transaction is rolledback. It is not raised for nested transactions.- Specified by:
preRollbackTransaction
in interfaceSessionEventListener
-
preLogin
Description copied from interface:SessionEventListener
PUBLIC: This Event is raised before the session logs in.- Specified by:
preLogin
in interfaceSessionEventListener
-
postLogin
Description copied from interface:SessionEventListener
PUBLIC: This Event is raised after the session logs in.- Specified by:
postLogin
in interfaceSessionEventListener
-
preLogout
Description copied from interface:SessionEventListener
PUBLIC: This Event is raised before the session logs out.- Specified by:
preLogout
in interfaceSessionEventListener
-
postLogout
Description copied from interface:SessionEventListener
PUBLIC: This Event is raised after the session logs out.- Specified by:
postLogout
in interfaceSessionEventListener
-