1 | public class Employee {
↵ | | 1 | public class C1 extends B{↵
|
2 | private Long id;↵ | | 2 | private ↵
|
3 | private Person person;↵ | | |
|
4 | private Date hireDate;↵ | | |
|
5 | private OptionalComponent optionalComponent;↵ | | |
|
6 | private Set directReports = new HashSet();↵ | | |
|
7 |
↵ | | 3 | String address;↵
|
| | | 4 | private String c1Name;↵
|
| | | 5 | private C2 c2;↵
|
| | | 6 | private D d;↵
|
| | | 7 | private Collection c2s = new ArrayList();↵
|
| | | 8 | /**↵
|
| | | 9 | * Returns the address.↵
|
| | | 10 | * @return String↵
|
| | | 11 | */↵
|
8 | public Long getId() {
↵ | | 12 | public String getAddress() {↵
|
9 | return id;↵ | | 13 | return ↵
|
10 | }↵ | | |
|
11 |
↵ | | 14 | address;↵
|
| | | 15 | }↵
|
| | | 16 | ↵
|
| | | 17 | /**↵
|
| | | 18 | * Sets the address.↵
|
| | | 19 | * @param address The address to set↵
|
| | | 20 | */↵
|
12 | public void setId(Long id) {
↵ | | 21 | public void setAddress(String address) {↵
|
13 | this.id = id;↵ | | 22 | this.↵
|
14 | }↵ | | |
|
|
15 | public Person getPerson↵ | | 23 | address = address;↵
|
| | | 24 | }↵
|
| | | 25 | ↵
|
| | | 26 | /**↵
|
| | | 27 | * Returns the d.↵
|
| | | 28 | * @return D↵
|
| | | 29 | */↵
|
16 | () {
↵ | | 30 | public D getD() {↵
|
17 | return person;↵ | | 31 | return ↵
|
18 | }↵ | | |
|
|
19 | public void setPerson(Person person↵ | | 32 | d;↵
|
| | | 33 | }↵
|
| | | 34 | ↵
|
| | | 35 | /**↵
|
| | | 36 | * Sets the d.↵
|
| | | 37 | * @param d The d to set↵
|
| | | 38 | */↵
|
20 | ) {
↵ | | 39 | public void setD(D d) {↵
|
21 | this.person = person;↵ | | 40 | this.↵
|
22 | }↵ | | |
|
|
23 | public Date getHireDate↵ | | 41 | d = d;↵
|
| | | 42 | }↵
|
| | | 43 | ↵
|
| | | 44 | /**↵
|
| | | 45 | * @return Returns the c.↵
|
| | | 46 | */↵
|
24 | () {
↵ | | 47 | public C2 getC2() {↵
|
25 | return hireDate;↵ | | 48 | return ↵
|
26 | }↵ | | |
|
|
27 | public void setHireDate(Date hireDate↵ | | 49 | c2;↵
|
| | | 50 | }↵
|
|
| | | 51 | /**↵
|
| | | 52 | * @param c The c to set.↵
|
| | | 53 | */↵
|
28 | ) {
↵ | | 54 | public void setC2(C2 c) {↵
|
29 | this.hireDate = hireDate;↵ | | 55 | this.↵
|
30 | }↵ | | |
|
|
31 | public OptionalComponent getOptionalComponent↵ | | 56 | c2 = c;↵
|
| | | 57 | }↵
|
|
| | | 58 | /**↵
|
| | | 59 | * @return Returns the cs.↵
|
| | | 60 | */↵
|
32 | () {
↵ | | 61 | public Collection getC2s() {↵
|
33 | return optionalComponent;↵ | | 62 | return ↵
|
34 | }↵ | | |
|
|
35 | public void setOptionalComponent(OptionalComponent optionalComponent↵ | | 63 | c2s;↵
|
| | | 64 | }↵
|
|
| | | 65 | /**↵
|
| | | 66 | * @param cs The cs to set.↵
|
| | | 67 | */↵
|
36 | ) {
↵ | | 68 | public void setC2s(Collection cs) {↵
|
37 | this.optionalComponent = optionalComponent;↵ | | 69 | this.↵
|
38 | }↵ | | |
|
|
39 | public Set getDirectReports↵ | | 70 | c2s = cs;↵
|
| | | 71 | }↵
|
|
| | | 72 | /**↵
|
| | | 73 | * @return Returns the c1Name.↵
|
| | | 74 | */↵
|
40 | () {
↵ | | 75 | public String getC1Name() {↵
|
41 | return directReports;↵ | | 76 | return ↵
|
42 | }↵ | | |
|
43 |
↵ | | 77 | c1Name;↵
|
| | | 78 | }↵
|
| | | 79 | /**↵
|
| | | 80 | * @param name The c1Name to set.↵
|
| | | 81 | */↵
|
44 | public void setDirectReports(Set directReports) {
↵ | | 82 | public void setC1Name(String name) {↵
|
45 | this.directReports = directReports;
↵ | | 83 | c1Name = name;↵
|
46 | | | 84 |
|