01: //$Id: PreLoadEvent.java 6929 2005-05-27 03:54:08Z oneovthafew $
02: package org.hibernate.event;
03:
04: import java.io.Serializable;
05:
06: import org.hibernate.persister.entity.EntityPersister;
07:
08: /**
09: * 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 entity;
16: private Object[] state;
17: private Serializable id;
18: private EntityPersister persister;
19:
20: public PreLoadEvent(EventSource session) {
21: super (session);
22: }
23:
24: public Object getEntity() {
25: return entity;
26: }
27:
28: public Serializable getId() {
29: return id;
30: }
31:
32: public EntityPersister getPersister() {
33: return persister;
34: }
35:
36: public Object[] getState() {
37: return state;
38: }
39:
40: public PreLoadEvent setEntity(Object entity) {
41: this .entity = entity;
42: return this ;
43: }
44:
45: public PreLoadEvent setId(Serializable 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[] state) {
56: this.state = state;
57: return this;
58: }
59:
60: }
|