01: //$Id: LockEvent.java 6929 2005-05-27 03:54:08Z oneovthafew $
02: package org.hibernate.event;
03:
04: import org.hibernate.LockMode;
05:
06: /**
07: * Defines an event class for the locking of an entity.
08: *
09: * @author Steve Ebersole
10: */
11: public class LockEvent extends AbstractEvent {
12:
13: private Object object;
14: private LockMode lockMode;
15: private String entityName;
16:
17: public LockEvent(String entityName, Object original,
18: LockMode lockMode, EventSource source) {
19: this (original, lockMode, source);
20: this .entityName = entityName;
21: }
22:
23: public LockEvent(Object object, LockMode lockMode,
24: EventSource source) {
25: super (source);
26: this .object = object;
27: this .lockMode = lockMode;
28: }
29:
30: public Object getObject() {
31: return object;
32: }
33:
34: public void setObject(Object object) {
35: this .object = object;
36: }
37:
38: public LockMode getLockMode() {
39: return lockMode;
40: }
41:
42: public void setLockMode(LockMode lockMode) {
43: this .lockMode = lockMode;
44: }
45:
46: public String getEntityName() {
47: return entityName;
48: }
49:
50: public void setEntityName(String entityName) {
51: this.entityName = entityName;
52: }
53:
54: }
|