1 package myorg.relex.many2one;
2
3 import javax.persistence.*;
4
5
6
7
8
9
10 @Entity
11 @Table(name="RELATIONEX_STATE")
12 public class State {
13 @Id @Column(length=2)
14 private String id;
15
16 @Column(length=20, nullable=false)
17 private String name;
18
19 protected State() {}
20 public State(String id, String name) {
21 this.id = id;
22 this.name = name;
23 }
24
25 public String getId() { return id; }
26
27 public String getName() { return name; }
28 public void setName(String name) {
29 this.name = name;
30 }
31 }