KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.jboss.ejb3.test.regression.ejbthree440.model;
2
3 import java.io.Serializable JavaDoc;
4
5 import javax.persistence.*;
6
7 @Entity
8 @Table(name="TBUSER")
9 @TableGenerator(name="USER_SEQ")
10 public class User implements Serializable JavaDoc {
11   private int id, version;
12   private boolean active;
13   private String JavaDoc name, password;
14   private double homeX, homeY;
15   private Double JavaDoc posX, posY;
16
17   @Id
18   @GeneratedValue(strategy=GenerationType.TABLE, generator="USER_SEQ")
19   public int getId() {
20     return id;
21   }
22
23   public void setId(int id) {
24     this.id = id;
25   }
26
27   @Column(name="homepos_x")
28   public double getHomeX() {
29     return homeX;
30   }
31
32   public void setHomeX(double homeX) {
33     this.homeX = homeX;
34   }
35
36   @Column(name="homepos_y")
37   public double getHomeY() {
38     return homeY;
39   }
40
41   public void setHomeY(double homeY) {
42     this.homeY = homeY;
43   }
44
45   @Column(name="actualpos_x")
46   public Double JavaDoc getPosX() {
47     return posX;
48   }
49
50   public void setPosX(Double JavaDoc posX) {
51     this.posX = posX;
52   }
53
54   @Column(name="actualpos_y")
55   public Double JavaDoc getPosY() {
56     return posY;
57   }
58
59   public void setPosY(Double JavaDoc poxY) {
60     this.posY = poxY;
61   }
62
63   @Column(name="username")
64   public String JavaDoc getName() {
65     return name;
66   }
67
68   public void setName(String JavaDoc name) {
69     this.name = name;
70   }
71
72   @Column(name="passwrd")
73   public String JavaDoc getPassword() {
74     return password;
75   }
76
77   public void setPassword(String JavaDoc password) {
78     this.password = password;
79   }
80
81   public boolean isActive() {
82     return active;
83   }
84
85   public void setActive(boolean active) {
86     this.active = active;
87   }
88
89   @Version
90   @Column(name="versionnr")
91   public int getVersion() {
92     return version;
93   }
94
95   public void setVersion(int version) {
96     this.version = version;
97   }
98 }
99
Popular Tags