KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > test > regression > ejbthree440 > model > Rescalendar


1 package org.jboss.ejb3.test.regression.ejbthree440.model;
2
3 import java.io.Serializable JavaDoc;
4 import java.util.Date JavaDoc;
5
6 import javax.persistence.*;
7
8 @Entity
9 @Table(name="TBCALENDAR")
10 @TableGenerator(
11     name="CAL_SEQ"
12 )
13 public class Rescalendar implements Serializable JavaDoc {
14   private int id, version;
15   private Resource resource;
16   private Date JavaDoc start, end;
17   private int status;
18   private boolean active;
19
20   public boolean isActive() {
21     return active;
22   }
23
24   public void setActive(boolean active) {
25     this.active = active;
26   }
27
28   @Column(name="end_dt")
29   public Date JavaDoc getEnd() {
30     return end;
31   }
32
33   public void setEnd(Date JavaDoc end) {
34     this.end = end;
35   }
36
37   @Id
38   @GeneratedValue(strategy=GenerationType.TABLE, generator="CAL_SEQ")
39   public int getId() {
40     return id;
41   }
42
43   public void setId(int id) {
44     this.id = id;
45   }
46
47   @ManyToOne
48   public Resource getResource() {
49     return resource;
50   }
51
52   public void setResource(Resource resource) {
53     this.resource = resource;
54   }
55
56   @Column(name="start_dt")
57   public Date JavaDoc getStart() {
58     return start;
59   }
60
61   public void setStart(Date JavaDoc start) {
62     this.start = start;
63   }
64
65   public int getStatus() {
66     return status;
67   }
68
69   public void setStatus(int status) {
70     this.status = status;
71   }
72
73   @Version
74   @Column(name="versionnr")
75   public int getVersion() {
76     return version;
77   }
78
79   public void setVersion(int version) {
80     this.version = version;
81   }
82 }
83
Popular Tags