1 package myorg.relex.one2many;
2
3 import javax.persistence.*;
4
5 /**
6 * This class provides an example of the many side of a one-to-many, uni-directional relationship
7 * mapped using a foreign key in the child entity table. Note that all mapping will be from the one/owning
8 * side and no reference to the foreign key exists within this class.
9 */
10 @Entity
11 @Table(name="RELATIONEX_STOP")
12 public class Stop {
13 @Id @GeneratedValue
14 private int id;
15 @Column(length=16)
16 private String name;
17
18 public int getId() { return id; }
19
20 public String getName() { return name; }
21 public void setName(String name) {
22 this.name = name;
23 }
24 }