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