KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: PreUpdateEvent.java,v 1.6 2005/07/20 22:48:22 oneovthafew Exp $
2
package org.hibernate.event;
3
4 import java.io.Serializable JavaDoc;
5
6 import org.hibernate.persister.entity.EntityPersister;
7
8 /**
9  * Occurs before updating the datastore
10  *
11  * @author Gavin King
12  */

13 public class PreUpdateEvent {
14     private Object JavaDoc entity;
15     private EntityPersister persister;
16     private Object JavaDoc[] state;
17     private Object JavaDoc[] oldState;
18     private Serializable JavaDoc id;
19
20     public PreUpdateEvent(
21             Object JavaDoc entity,
22             Serializable JavaDoc id,
23             Object JavaDoc[] state,
24             Object JavaDoc[] oldState,
25             EntityPersister persister
26     ) {
27         this.entity = entity;
28         this.id = id;
29         this.state = state;
30         this.oldState = oldState;
31         this.persister = persister;
32     }
33
34     public Object JavaDoc getEntity() {
35         return entity;
36     }
37     public Serializable JavaDoc getId() {
38         return id;
39     }
40     public Object JavaDoc[] getOldState() {
41         return oldState;
42     }
43     public EntityPersister getPersister() {
44         return persister;
45     }
46     public Object JavaDoc[] getState() {
47         return state;
48     }
49 }
50
Popular Tags