1 | public class Site {↵ | | 1 | public class Thing {↵
|
2 | private String name;↵ | | 2 | private String ↵
|
3 | private String descripti↵ | | 3 | description;↵
|
4 | on;↵ | | 4 | private Person person;↵
|
5 | private Set employees = new HashSet();↵ | | 5 | private ↵
|
6 | private Set managers = new HashSet();↵ | | |
|
|
7 | Site() {}↵ | | |
|
8 | public Site(String name) {↵ | | |
|
9 | this.name=name;↵ | | |
|
10 | }↵ | | |
|
11 | public Set getManagers() {↵ | | |
|
12 | return managers;↵ | | |
|
13 | }↵ | | |
|
14 | public void setManagers(Set manag↵ | | 6 | int version;↵
|
| | | 7 | private String longDescription;↵
|
| | | 8 | ↵
|
| | | 9 | public int getVersion() {↵
|
| | | 10 | return version;↵
|
| | | 11 | }↵
|
| | | 12 | public void setVersion(int version) {↵
|
| | | 13 | this.version = version;↵
|
| | | 14 | }↵
|
| | | 15 | Thing() {}↵
|
15 | ers) {↵ | | 16 | public Thing(String description, Person person) {↵
|
16 | this.manag↵ | | 17 | this.description = description;↵
|
17 | ers = managers↵ | | 18 | this.person = person;↵
|
18 | ;↵ | | 19 | person.getThings().add(this);↵
|
19 | }↵ | | 20 | }↵
|
20 | public String getDescription() {↵ | | 21 | public String getDescription() {↵
|
21 | return description;↵ | | 22 | return description;↵
|
22 | }↵ | | 23 | }↵
|
23 | public void setDescription(String description) {↵ | | 24 | public void setDescription(String description) {↵
|
24 | this.description = description;↵ | | 25 | this.description = description;↵
|
25 | }↵ | | 26 | }↵
|
26 | public Set getEmployees() {↵ | | 27 | public Person getPerson() {↵
|
27 | return employees;↵ | | 28 | return person;↵
|
28 | }↵ | | 29 | }↵
|
29 | public void setEmployees(Set employees) {↵ | | 30 | public void setPerson(Person person) {↵
|
30 | this.employees = employees;↵ | | 31 | this.person = person;↵
|
31 | }↵ | | 32 | }↵
|
32 | public String getName() {↵ | | 33 | public String get↵
|
33 | return name↵ | | 34 | LongDescription() {↵
|
34 | ;↵ | | 35 | return longDescription;↵
|
35 | }↵ | | 36 | }↵
|
36 | public void setName(String name) {↵ | | 37 | public void set↵
|
37 | this.name = name | | 38 | LongDescription(String longDescription) {↵
|
| | | 39 | this.longDescription = longDescription
|