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