KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: PreInsertEvent.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 inserting an item in the datastore
10  *
11  * @author Gavin King
12  */

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