1 | public class Parent {↵ | | 1 | public class Person {↵
|
| | | 2 | ↵
|
2 | private Long id;↵ | | 3 | private String name;↵
|
3 | private String name;↵ | | 4 | private String employeeId;↵
|
4 | private Collection children = new HashSet();↵ | | 5 | private ↵
|
5 | Parent↵ | | 6 | Employee employee;↵
|
|
6 | () {}↵ | | 7 | public Person() {}↵
|
7 | public Parent(String name) {↵ | | 8 | public Person(String name) {↵
|
8 | this.name = name;↵ | | 9 | this.name = name;↵
|
9 | }↵ | | 10 | }↵
|
10 | /**↵ | | 11 | ↵
|
11 | * @return Returns the children.↵ | | |
|
12 | */↵ | | |
|
13 | public Collection getChildren() {↵ | | |
|
14 | return children;↵ | | |
|
15 | }↵ | | |
|
16 | /**↵ | | |
|
17 | * @param children The children to set.↵ | | |
|
18 | */↵ | | |
|
19 | public void setChildren(Collection children) {↵ | | |
|
20 | this.children = children;↵ | | |
|
21 | }↵ | | |
|
22 | /**↵ | | |
|
23 | * @return Returns the id.↵ | | |
|
24 | */↵ | | |
|
| | | 12 | public Employee getEmployee() {↵
|
| | | 13 | return employee;↵
|
| | | 14 | }↵
|
| | | 15 | ↵
|
| | | 16 | public void setEmployee(Employee employee) {↵
|
| | | 17 | this.employee = employee;↵
|
| | | 18 | }↵
|
| | | 19 | ↵
|
25 | public Long getId() {↵ | | 20 | public String getEmployeeId() {↵
|
26 | return id;↵ | | 21 | return ↵
|
27 | }↵ | | |
|
28 | /**↵ | | |
|
29 | * @param id The id to set.↵ | | |
|
30 | */↵ | | |
|
31 | public void setId(Long id) {↵ | | |
|
32 | this.id = id;↵ | | |
|
33 | }↵ | | |
|
34 | /**↵ | | |
|
35 | * @return Returns the name.↵ | | |
|
36 | */↵ | | 22 | employeeId;↵
|
| | | 23 | }↵
|
| | | 24 | ↵
|
| | | 25 | public void setEmployeeId(String employeeId) {↵
|
| | | 26 | this.employeeId = employeeId;↵
|
| | | 27 | }↵
|
| | | 28 | ↵
|
37 | public String getName() {↵ | | 29 | public String getName() {↵
|
38 | return name;↵ | | 30 | return name;↵
|
39 | }↵ | | 31 | }↵
|
40 | /**↵ | | 32 | ↵
|
41 | * @param name The name to set.↵ | | |
|
42 | */↵ | | |
|
43 | public void setName(String name) {↵ | | 33 | public void setName(String name) {↵
|
44 | this.name = name | | 34 | this.name = name
|