1@MappedSuperclass
2public class Person {
3
4 @Id
5 private long personId;
6 private String name;
7
8 // constructor, getters, setters
9}
10
1@Entity
2public class MyEmployee extends Person {
3 private String company;
4 // constructor, getters, setters
5}
6