FileDocCategorySizeDatePackage
SessionEvent.javaAPI DocGlassfish v2 API7785Tue May 22 16:54:52 BST 2007oracle.toplink.essentials.sessions

SessionEvent

public class SessionEvent extends EventObject

Purpose: Encapsulate the information provided with session events. This is used as the argument to any event raised by the session. To register for events notification an event listener must be registered with the session.

see
SessionEventManager#addListener(SessionEventListener)
see
Session#getEventManager()
see
SessionEventListener

Fields Summary
protected DatabaseQuery
query
Some events may have a query associated with them (pre/postExecuteQuery).
protected Object
result
Some events may have a result associated with them (pre/postExecuteQuery).
protected Session
session
The session or unit of work raising the event.
protected int
eventCode
The code of the event being raised. This is an integer constant value as defined below.
protected Hashtable
properties
Additional properties may be added.
public static final int
PreExecuteQuery
public static final int
PostExecuteQuery
public static final int
PreBeginTransaction
public static final int
PostBeginTransaction
public static final int
PreCommitTransaction
public static final int
PostCommitTransaction
public static final int
PreRollbackTransaction
public static final int
PostRollbackTransaction
public static final int
PostAcquireUnitOfWork
public static final int
PreCommitUnitOfWork
public static final int
PostCommitUnitOfWork
public static final int
PreReleaseUnitOfWork
public static final int
PostReleaseUnitOfWork
public static final int
PrepareUnitOfWork
public static final int
PostResumeUnitOfWork
public static final int
PostAcquireClientSession
public static final int
PreReleaseClientSession
public static final int
PostReleaseClientSession
public static final int
PostAcquireConnection
public static final int
PostAcquireExclusiveConnection
public static final int
PreReleaseConnection
public static final int
PreReleaseExclusiveConnection
public static final int
OutputParametersDetected
public static final int
MoreRowsDetected
public static final int
PostConnect
public static final int
PreLogin
public static final int
PostLogin
public static final int
PreMergeUnitOfWorkChangeSet
public static final int
PreDistributedMergeUnitOfWorkChangeSet
public static final int
PostMergeUnitOfWorkChangeSet
public static final int
PostDistributedMergeUnitOfWorkChangeSet
public static final int
PreCalculateUnitOfWorkChangeSet
public static final int
PostCalculateUnitOfWorkChangeSet
public static final int
MissingDescriptor
public static final int
NoRowsModified
Constructors Summary
public SessionEvent(int eventCode, Session session)
INTERNAL: Create the event.


    // last event value for this class as of Jan 26th, 2004 is 35

             
         
        super(session);
        this.session = session;
        this.eventCode = eventCode;
    
Methods Summary
public intgetEventCode()
PUBLIC: The code of the session event being raised. This is an integer constant value from this class.

        return eventCode;
    
public java.util.HashtablegetProperties()
PUBLIC: Additional properties may be added to the event.

        if (properties == null) {
            properties = new Hashtable(2);
        }
        return properties;
    
public java.lang.ObjectgetProperty(java.lang.String name)
PUBLIC: Additional properties may be added to the event.

        return getProperties().get(name);
    
public oracle.toplink.essentials.queryframework.DatabaseQuerygetQuery()
PUBLIC: Some events may have a query associated with them (pre/postExecuteQuery).

        return query;
    
public java.lang.ObjectgetResult()
PUBLIC: Some events may have a result associated with them (pre/postExecuteQuery).

        return result;
    
public oracle.toplink.essentials.sessions.SessiongetSession()
PUBLIC: The session in which the event is raised.

        return session;
    
public voidsetEventCode(int eventCode)
INTERNAL: The code of the session event being raised. This is an integer constant value from this class.

        this.eventCode = eventCode;
    
public voidsetProperties(java.util.Hashtable properties)
INTERNAL: Additional properties may be added to the event.

        this.properties = properties;
    
public voidsetProperty(java.lang.String name, java.lang.Object value)
INTERNAL: Additional properties may be added to the event.

        getProperties().put(name, value);
    
public voidsetQuery(oracle.toplink.essentials.queryframework.DatabaseQuery query)
INTERNAL: Some events may have a query associated with them (pre/postExecuteQuery).

        this.query = query;
    
public voidsetResult(java.lang.Object result)
INTERNAL: Some events may have a result associated with them (pre/postExecuteQuery).

        this.result = result;
    
public voidsetSession(oracle.toplink.essentials.sessions.Session session)
INTERNAL: The session in which the event is raised.

        this.session = session;