日期:2014-05-20 浏览次数:20647 次
@Entity @Table(name="DB_Student") @SequenceGenerator(name="stu_seq",sequenceName="stu_seq",initialValue=1,allocationSize=1) public class Student { private int id; private String name; private Sex sex; private int age; private Date birthday; private boolean statu; @Id @Column(name="stu_id") @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="stu_seq") public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } @Enumerated(EnumType.STRING) public Sex getSex() { return sex; } public void setSex(Sex sex) { this.sex = sex; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } @Column(nullable=true) public boolean isStatu() { return statu; } public void setStatu(boolean statu) { this.statu = statu; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }