Author: epbernard
Date: 2006-11-01 17:53:30 -0500 (Wed, 01 Nov 2006)
New Revision: 10680
Modified:
trunk/Hibernate3/src/org/hibernate/action/EntityDeleteAction.java
trunk/Hibernate3/src/org/hibernate/action/EntityIdentityInsertAction.java
trunk/Hibernate3/src/org/hibernate/action/EntityInsertAction.java
trunk/Hibernate3/src/org/hibernate/event/PostDeleteEvent.java
trunk/Hibernate3/src/org/hibernate/event/PostInsertEvent.java
Log:
HHH-2203 make Post*Event extends AbstractEvent
Modified: trunk/Hibernate3/src/org/hibernate/action/EntityDeleteAction.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/action/EntityDeleteAction.java 2006-11-01 22:53:04
UTC (rev 10679)
+++ trunk/Hibernate3/src/org/hibernate/action/EntityDeleteAction.java 2006-11-01 22:53:30
UTC (rev 10680)
@@ -15,6 +15,7 @@
import org.hibernate.event.PostDeleteEventListener;
import org.hibernate.event.PreDeleteEvent;
import org.hibernate.event.PreDeleteEventListener;
+import org.hibernate.event.EventSource;
import org.hibernate.persister.entity.EntityPersister;
public final class EntityDeleteAction extends EntityAction {
@@ -115,7 +116,13 @@
PostDeleteEventListener[] postListeners = getSession().getListeners()
.getPostDeleteEventListeners();
if (postListeners.length>0) {
- PostDeleteEvent postEvent = new PostDeleteEvent( getInstance(), getId(), state,
getPersister() );
+ PostDeleteEvent postEvent = new PostDeleteEvent(
+ getInstance(),
+ getId(),
+ state,
+ getPersister(),
+ (EventSource) getSession()
+ );
for ( int i = 0; i < postListeners.length; i++ ) {
postListeners[i].onPostDelete(postEvent);
}
@@ -126,7 +133,13 @@
PostDeleteEventListener[] postListeners = getSession().getListeners()
.getPostCommitDeleteEventListeners();
if (postListeners.length>0) {
- PostDeleteEvent postEvent = new PostDeleteEvent( getInstance(), getId(), state,
getPersister() );
+ PostDeleteEvent postEvent = new PostDeleteEvent(
+ getInstance(),
+ getId(),
+ state,
+ getPersister(),
+ (EventSource) getSession()
+ );
for ( int i = 0; i < postListeners.length; i++ ) {
postListeners[i].onPostDelete(postEvent);
}
Modified: trunk/Hibernate3/src/org/hibernate/action/EntityIdentityInsertAction.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/action/EntityIdentityInsertAction.java 2006-11-01
22:53:04 UTC (rev 10679)
+++ trunk/Hibernate3/src/org/hibernate/action/EntityIdentityInsertAction.java 2006-11-01
22:53:30 UTC (rev 10680)
@@ -11,6 +11,7 @@
import org.hibernate.event.PostInsertEventListener;
import org.hibernate.event.PreInsertEvent;
import org.hibernate.event.PreInsertEventListener;
+import org.hibernate.event.EventSource;
import org.hibernate.persister.entity.EntityPersister;
public final class EntityIdentityInsertAction extends EntityAction {
@@ -78,7 +79,13 @@
PostInsertEventListener[] postListeners = getSession().getListeners()
.getPostInsertEventListeners();
if (postListeners.length>0) {
- PostInsertEvent postEvent = new PostInsertEvent( getInstance(), generatedId, state,
getPersister() );
+ PostInsertEvent postEvent = new PostInsertEvent(
+ getInstance(),
+ generatedId,
+ state,
+ getPersister(),
+ (EventSource) getSession()
+ );
for ( int i = 0; i < postListeners.length; i++ ) {
postListeners[i].onPostInsert(postEvent);
}
@@ -89,7 +96,13 @@
PostInsertEventListener[] postListeners = getSession().getListeners()
.getPostCommitInsertEventListeners();
if (postListeners.length>0) {
- PostInsertEvent postEvent = new PostInsertEvent( getInstance(), generatedId, state,
getPersister() );
+ PostInsertEvent postEvent = new PostInsertEvent(
+ getInstance(),
+ generatedId,
+ state,
+ getPersister(),
+ (EventSource) getSession()
+ );
for ( int i = 0; i < postListeners.length; i++ ) {
postListeners[i].onPostInsert(postEvent);
}
Modified: trunk/Hibernate3/src/org/hibernate/action/EntityInsertAction.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/action/EntityInsertAction.java 2006-11-01 22:53:04
UTC (rev 10679)
+++ trunk/Hibernate3/src/org/hibernate/action/EntityInsertAction.java 2006-11-01 22:53:30
UTC (rev 10680)
@@ -15,6 +15,7 @@
import org.hibernate.event.PostInsertEventListener;
import org.hibernate.event.PreInsertEvent;
import org.hibernate.event.PreInsertEventListener;
+import org.hibernate.event.EventSource;
import org.hibernate.persister.entity.EntityPersister;
public final class EntityInsertAction extends EntityAction {
@@ -111,7 +112,13 @@
PostInsertEventListener[] postListeners = getSession().getListeners()
.getPostInsertEventListeners();
if ( postListeners.length > 0 ) {
- PostInsertEvent postEvent = new PostInsertEvent( getInstance(), getId(), state,
getPersister() );
+ PostInsertEvent postEvent = new PostInsertEvent(
+ getInstance(),
+ getId(),
+ state,
+ getPersister(),
+ (EventSource) getSession()
+ );
for ( int i = 0; i < postListeners.length; i++ ) {
postListeners[i].onPostInsert(postEvent);
}
@@ -122,7 +129,13 @@
PostInsertEventListener[] postListeners = getSession().getListeners()
.getPostCommitInsertEventListeners();
if ( postListeners.length > 0 ) {
- PostInsertEvent postEvent = new PostInsertEvent( getInstance(), getId(), state,
getPersister() );
+ PostInsertEvent postEvent = new PostInsertEvent(
+ getInstance(),
+ getId(),
+ state,
+ getPersister(),
+ (EventSource) getSession()
+ );
for ( int i = 0; i < postListeners.length; i++ ) {
postListeners[i].onPostInsert(postEvent);
}
Modified: trunk/Hibernate3/src/org/hibernate/event/PostDeleteEvent.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/event/PostDeleteEvent.java 2006-11-01 22:53:04 UTC
(rev 10679)
+++ trunk/Hibernate3/src/org/hibernate/event/PostDeleteEvent.java 2006-11-01 22:53:30 UTC
(rev 10680)
@@ -10,7 +10,7 @@
*
* @author Gavin King
*/
-public class PostDeleteEvent {
+public class PostDeleteEvent extends AbstractEvent {
private Object entity;
private EntityPersister persister;
private Serializable id;
@@ -20,8 +20,10 @@
Object entity,
Serializable id,
Object[] deletedState,
- EntityPersister persister
+ EntityPersister persister,
+ EventSource source
) {
+ super(source);
this.entity = entity;
this.id = id;
this.persister = persister;
Modified: trunk/Hibernate3/src/org/hibernate/event/PostInsertEvent.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/event/PostInsertEvent.java 2006-11-01 22:53:04 UTC
(rev 10679)
+++ trunk/Hibernate3/src/org/hibernate/event/PostInsertEvent.java 2006-11-01 22:53:30 UTC
(rev 10680)
@@ -10,7 +10,7 @@
*
* @author Gavin King
*/
-public class PostInsertEvent {
+public class PostInsertEvent extends AbstractEvent {
private Object entity;
private EntityPersister persister;
private Object[] state;
@@ -20,8 +20,10 @@
Object entity,
Serializable id,
Object[] state,
- EntityPersister persister
+ EntityPersister persister,
+ EventSource source
) {
+ super(source);
this.entity = entity;
this.id = id;
this.state = state;