Java tutorial
/* * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.event.spi; import java.io.Serializable; /** * Defines a base class for Session generated events. * * @author Steve Ebersole */ public abstract class AbstractEvent implements Serializable { private final EventSource session; /** * Constructs an event from the given event session. * * @param source The session event source. */ public AbstractEvent(EventSource source) { this.session = source; } /** * Returns the session event source for this event. This is the underlying * session from which this event was generated. * * @return The session event source. */ public final EventSource getSession() { return session; } }