blob: 5b1f4767a37b706086e42c7b176ecbaba926ccb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
package com.vaadin.tests.data.bean;
import java.io.Serializable;
public class FatherAndSon implements Serializable {
private String firstName;
private String lastName;
private FatherAndSon father;
private FatherAndSon son;
public FatherAndSon() {
}
@Override
public String toString() {
return "FatherAndSon [firstName=" + firstName + ", lastName=" + lastName
+ ", father=" + father + ", son=" + son + "]";
}
public FatherAndSon(String firstName, String lastName, FatherAndSon father,
FatherAndSon son) {
super();
this.firstName = firstName;
this.lastName = lastName;
this.father = father;
if (this.father != null)
this.father.setSon(this);
else
this.son = son;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public FatherAndSon getFather() {
return father;
}
public void setFather(FatherAndSon father) {
this.father = father;
}
public FatherAndSon getSon() {
return son;
}
public void setSon(FatherAndSon son) {
this.son = son;
}
}
|