View Javadoc

1   /*
2    * ObjectModificationType.java
3    * Created on 2 Сентябрь 2006 г., 23:39
4    */
5   
6   package org.weda.domain;
7   
8   import java.sql.Timestamp;
9   import javax.persistence.Entity;
10  import javax.persistence.GeneratedValue;
11  import javax.persistence.GenerationType;
12  import javax.persistence.Id;
13  import javax.persistence.ManyToOne;
14  import org.weda.property.annotations.Description;
15  import org.weda.store.AuditOperation;
16  
17  /**
18   *
19   * @author Mikhail Titov
20   */
21  @Entity()
22  public class ObjectModificationType {
23      
24      private Long id;
25      private ObjectModification objectModification;
26      private Timestamp timestamp;
27      private AuditOperation type;
28      
29      public ObjectModificationType(){}
30      
31      public ObjectModificationType(
32              ObjectModification objectModification, AuditOperation type)
33      {
34          timestamp = new Timestamp(System.currentTimeMillis());
35          this.type = type;
36          this.objectModification = objectModification;
37      }
38  
39      @Id() @GeneratedValue(strategy=GenerationType.AUTO)
40      public Long getId() {
41          return id;
42      }
43  
44      public void setId(Long id) {
45          this.id = id;
46      }
47  
48      @ManyToOne()
49      public ObjectModification getObjectModification() {
50          return objectModification;
51      }
52  
53      public void setObjectModification(ObjectModification objectModification) {
54          this.objectModification = objectModification;
55      }
56  
57      @Description(displayName="message:displayName", pattern="message:pattern")
58      public Timestamp getTimestamp() {
59          return timestamp;
60      }
61  
62      public void setTimestamp(Timestamp timestamp) {
63          this.timestamp = timestamp;
64      }
65  
66      @Description(displayName="message:displayName", pattern="message:pattern")
67      public AuditOperation getType() {
68          return type;
69      }
70  
71      public void setType(AuditOperation type) {
72          this.type = type;
73      }
74      
75  }