1 | public class MyEntity {
↵ | | 1 | public class Employee extends Person {↵
|
2 | private Long id;↵ | | 2 | private ↵
|
3 | private String name;↵ | | |
|
4 | private MyEntity other;↵ | | |
|
5 |
↵ | | 3 | String title;↵
|
| | | 4 | private BigDecimal salary;↵
|
| | | 5 | private Employee manager;↵
|
| | | 6 | /**↵
|
| | | 7 | * @return Returns the title.↵
|
| | | 8 | */↵
|
6 | public Long getId() {
↵ | | 9 | public String getTitle() {↵
|
7 | return id;↵ | | 10 | return ↵
|
8 | }↵ | | |
|
9 |
↵ | | 11 | title;↵
|
| | | 12 | }↵
|
| | | 13 | /**↵
|
| | | 14 | * @param title The title to set.↵
|
| | | 15 | */↵
|
10 | public void setId(Long id) {
↵ | | 16 | public void setTitle(String title) {↵
|
11 | this.id = id;↵ | | 17 | this.↵
|
12 | }↵ | | |
|
13 |
↵ | | 18 | title = title;↵
|
| | | 19 | }↵
|
| | | 20 | /**↵
|
| | | 21 | * @return Returns the manager.↵
|
| | | 22 | */↵
|
14 | public String getName() {
↵ | | 23 | public Employee getManager() {↵
|
15 | return name;↵ | | 24 | return ↵
|
16 | }↵ | | |
|
|
17 | public void setName(String name↵ | | 25 | manager;↵
|
| | | 26 | }↵
|
| | | 27 | /**↵
|
| | | 28 | * @param manager The manager to set.↵
|
| | | 29 | */↵
|
18 | ) {
↵ | | 30 | public void setManager(Employee manager) {↵
|
19 | this.name = name;↵ | | 31 | this.manager = ↵
|
20 | }↵ | | |
|
|
21 | public MyEntity getOther↵ | | 32 | manager;↵
|
| | | 33 | }↵
|
| | | 34 | /**↵
|
| | | 35 | * @return Returns the salary.↵
|
| | | 36 | */↵
|
22 | () {
↵ | | 37 | public BigDecimal getSalary() {↵
|
23 | return other;↵ | | 38 | return ↵
|
24 | }↵ | | |
|
|
25 | public void setOther(MyEntity other↵ | | 39 | salary;↵
|
| | | 40 | }↵
|
| | | 41 | /**↵
|
| | | 42 | * @param salary The salary to set.↵
|
| | | 43 | */↵
|
26 | ) {
↵ | | 44 | public void setSalary(BigDecimal salary) {↵
|
27 | this.other = other;
↵ | | 45 | this.salary = salary;↵
|
28 | | | 46 |
|