1 package myorg.relex.one2many;
2
3 import javax.persistence.*;
4
5 /**
6 * This class provides an example of an entity class on the many side of a one-to-many,
7 * uni-directional relationship that will be referenced through a JoinTable.
8 */
9 @Entity
10 @Table(name="RELATIONEX_RIDER")
11 public class Rider {
12 @Id @GeneratedValue
13 private int id;
14 @Column(length=32)
15 private String name;
16
17 public Rider() {}
18 public Rider(int id) {
19 this.id = id;
20 }
21
22 public int getId() { return id; }
23
24 public String getName() { return name; }
25 public void setName(String name) {
26 this.name = name;
27 }
28 }