KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: PreLoadEvent.java,v 1.6 2005/05/27 03:53:58 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  * Called before injecting property values into a newly
10  * loaded entity instance.
11  *
12  * @author Gavin King
13  */

14 public class PreLoadEvent extends AbstractEvent {
15     private Object JavaDoc entity;
16     private Object JavaDoc[] state;
17     private Serializable JavaDoc id;
18     private EntityPersister persister;
19
20     public PreLoadEvent(EventSource session) {
21         super(session);
22     }
23
24     public Object JavaDoc getEntity() {
25         return entity;
26     }
27     
28     public Serializable JavaDoc getId() {
29         return id;
30     }
31     
32     public EntityPersister getPersister() {
33         return persister;
34     }
35     
36     public Object JavaDoc[] getState() {
37         return state;
38     }
39
40     public PreLoadEvent setEntity(Object JavaDoc entity) {
41         this.entity = entity;
42         return this;
43     }
44     
45     public PreLoadEvent setId(Serializable JavaDoc id) {
46         this.id = id;
47         return this;
48     }
49     
50     public PreLoadEvent setPersister(EntityPersister persister) {
51         this.persister = persister;
52         return this;
53     }
54     
55     public PreLoadEvent setState(Object JavaDoc[] state) {
56         this.state = state;
57         return this;
58     }
59     
60 }
61
Popular Tags