1 | public class ComponentOwner {↵ | | 1 | public class ↵
|
2 | ↵ | | 2 | Employee extends Person {↵
|
3 | private Long id;
↵ | | 3 | private String title;↵
|
4 | private String name;
↵ | | 4 | private String department;↵
|
5 | private Component component;↵ | | 5 | private ↵
|
6 |
↵ | | 6 | Employee manager;↵
|
| | | 7 | private Set minions = new HashSet();↵
|
|
7 | public ComponentOwner() {
↵ | | 8 | public Employee() {↵
|
8 | }↵ | | 9 | }↵
|
9 |
↵ | | |
|
|
10 | public ComponentOwner(String name) {
↵ | | 10 | public Employee(String name) {↵
|
11 | this.name = name;↵ | | 11 | super( name↵
|
12 | }↵ | | |
|
13 |
↵ | | 12 | );↵
|
| | | 13 | }↵
|
|
14 | public Long getId() {
↵ | | 14 | public String getTitle() {↵
|
15 | return id;↵ | | 15 | return ↵
|
16 | }↵ | | |
|
17 |
↵ | | 16 | title;↵
|
| | | 17 | }↵
|
|
18 | public void setId(Long id) {
↵ | | 18 | public void setTitle(String title) {↵
|
19 | this.id = id;↵ | | 19 | this.↵
|
20 | }↵ | | |
|
21 |
↵ | | 20 | title = title;↵
|
| | | 21 | }↵
|
|
22 | public String getName() {
↵ | | 22 | public String getDepartment() {↵
|
23 | return name;↵ | | 23 | return ↵
|
24 | }↵ | | |
|
25 |
↵ | | 24 | department;↵
|
| | | 25 | }↵
|
|
26 | public void setName(String name) {
↵ | | 26 | public void setDepartment(String department) {↵
|
27 | this.name = name;↵ | | 27 | this.↵
|
28 | }↵ | | |
|
29 |
↵ | | 28 | department = department;↵
|
| | | 29 | }↵
|
|
30 | public Component getComponent() {
↵ | | 30 | public Employee getManager() {↵
|
31 | return component;↵ | | 31 | return ↵
|
32 | }↵ | | |
|
33 |
↵ | | 32 | manager;↵
|
| | | 33 | }↵
|
|
34 | public void setComponent(Component component) {
↵ | | 34 | public void setManager(Employee manager) {↵
|
35 | this.component = component;↵ | | 35 | this.↵
|
36 | }↵ | | |
|
|
37 | public static class Component {↵ | | |
|
38 | private int generated;↵ | | |
|
|
39 | public int getGenerated↵ | | 36 | manager = manager;↵
|
| | | 37 | }↵
|
|
40 | () {↵ | | 38 | public Set getMinions() {↵
|
41 | ↵ | | |
|
42 | return generated;↵ | | 39 | return ↵
|
43 | }↵ | | |
|
|
44 | public void setGenerated(int generated) {↵ | | |
|
45 | this.generated = generated | | 40 | minions;↵
|
| | | 41 | }↵
|
|
| | | 42 | public void setMinions(Set minions) {↵
|
| | | 43 | this.minions = minions
|