KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: LockEvent.java,v 1.6 2005/05/27 03:53:58 oneovthafew Exp $
2
package org.hibernate.event;
3
4 import org.hibernate.LockMode;
5
6 /**
7  * Defines an event class for the locking of an entity.
8  *
9  * @author Steve Ebersole
10  */

11 public class LockEvent extends AbstractEvent {
12
13     private Object JavaDoc object;
14     private LockMode lockMode;
15     private String JavaDoc entityName;
16
17     public LockEvent(String JavaDoc entityName, Object JavaDoc original, LockMode lockMode, EventSource source) {
18         this(original, lockMode, source);
19         this.entityName = entityName;
20     }
21
22     public LockEvent(Object JavaDoc object, LockMode lockMode, EventSource source) {
23         super(source);
24         this.object = object;
25         this.lockMode = lockMode;
26     }
27
28     public Object JavaDoc getObject() {
29         return object;
30     }
31
32     public void setObject(Object JavaDoc object) {
33         this.object = object;
34     }
35
36     public LockMode getLockMode() {
37         return lockMode;
38     }
39
40     public void setLockMode(LockMode lockMode) {
41         this.lockMode = lockMode;
42     }
43
44     public String JavaDoc getEntityName() {
45         return entityName;
46     }
47
48     public void setEntityName(String JavaDoc entityName) {
49         this.entityName = entityName;
50     }
51
52 }
53
Popular Tags