KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > event > AbstractEvent


1 //$Id: AbstractEvent.java,v 1.4 2005/05/27 03:53:58 oneovthafew Exp $
2
package org.hibernate.event;
3
4 import java.io.Serializable JavaDoc;
5
6
7 /**
8  * Defines a base class for Session generated events.
9  *
10  * @author Steve Ebersole
11  */

12 public abstract class AbstractEvent implements Serializable JavaDoc {
13
14     private final EventSource session;
15
16     /**
17      * Constructs an event from the given event session.
18      *
19      * @param source The session event source.
20      */

21     public AbstractEvent(EventSource source) {
22         this.session = source;
23     }
24
25     /**
26      * Returns the session event source for this event. This is the underlying
27      * session from which this event was generated.
28      *
29      * @return The session event source.
30      */

31     public final EventSource getSession() {
32         return session;
33     }
34
35 }
36
Popular Tags