1 | public class ListOwner {
↵ | | 1 | public class Person {↵
|
| | | 2 | ↵
|
2 | private String name;
↵ | | 3 | private String name;↵
|
3 | private ListOwner parent;↵ | | 4 | private ↵
|
4 | private List children = new ArrayList();↵ | | |
|
|
5 | public ListOwner() {↵ | | |
|
6 | }↵ | | |
|
|
7 | public ListOwner↵ | | 5 | String employeeId;↵
|
| | | 6 | private Employee employee;↵
|
|
| | | 7 | public Person() {}↵
|
8 | (String name) {
↵ | | 8 | public Person(String name) {↵
|
9 | this.name = name;
↵ | | 9 | this.name = name;↵
|
10 | }↵ | | 10 | }↵
|
11 |
↵ | | |
|
| | | 11 | ↵
|
12 | public String getName() {
↵ | | 12 | public Employee getEmployee() {↵
|
13 | return name;
↵ | | 13 | return employee;↵
|
14 | }↵ | | 14 | }↵
|
15 |
↵ | | |
|
| | | 15 | ↵
|
16 | public void setName(String name) {
↵ | | 16 | public void setEmployee(Employee employee) {↵
|
17 | this.name = name;
↵ | | 17 | this.employee = employee;↵
|
18 | }↵ | | 18 | }↵
|
19 |
↵ | | |
|
| | | 19 | ↵
|
20 | public ListOwner getParent() {
↵ | | 20 | public String getEmployeeId() {↵
|
21 | return parent;↵ | | 21 | return ↵
|
22 | }↵ | | |
|
23 |
↵ | | 22 | employeeId;↵
|
| | | 23 | }↵
|
| | | 24 | ↵
|
24 | public void setParent(ListOwner parent) {
↵ | | 25 | public void setEmployeeId(String employeeId) {↵
|
25 | this.parent = parent;↵ | | 26 | this.↵
|
26 | }↵ | | |
|
|
27 | public List getChildren↵ | | 27 | employeeId = employeeId;↵
|
| | | 28 | }↵
|
| | | 29 | ↵
|
28 | () {
↵ | | 30 | public String getName() {↵
|
29 | return children;↵ | | 31 | return ↵
|
30 | }↵ | | |
|
31 |
↵ | | 32 | name;↵
|
| | | 33 | }↵
|
| | | 34 | ↵
|
32 | public void setChildren(List children) {
↵ | | 35 | public void setName(String name) {↵
|
33 | this.children = children;
↵ | | 36 | this.name = name;↵
|
34 | | | 37 |
|