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