1 package org.jboss.ejb3.test.regression.ejbthree440.model; 2 3 import java.io.Serializable ; 4 5 import javax.persistence.*; 6 7 @Entity 8 @Table(name="TBUSER") 9 @TableGenerator(name="USER_SEQ") 10 public class User implements Serializable { 11 private int id, version; 12 private boolean active; 13 private String name, password; 14 private double homeX, homeY; 15 private Double 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 getPosX() { 47 return posX; 48 } 49 50 public void setPosX(Double posX) { 51 this.posX = posX; 52 } 53 54 @Column(name="actualpos_y") 55 public Double getPosY() { 56 return posY; 57 } 58 59 public void setPosY(Double poxY) { 60 this.posY = poxY; 61 } 62 63 @Column(name="username") 64 public String getName() { 65 return name; 66 } 67 68 public void setName(String name) { 69 this.name = name; 70 } 71 72 @Column(name="passwrd") 73 public String getPassword() { 74 return password; 75 } 76 77 public void setPassword(String 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 |