1 | public class Immutable {↵ | | 1 | public class Object2 {↵
|
2 | private String foo;↵ | | 2 | private Long id;↵
|
3 | private String bar;↵ | | 3 | private String dummy;↵
|
4 | private String id;↵ | | 4 | private MainObject belongsToMainObj;↵
|
5 | ↵ | | |
|
6 | public String getFoo() {↵ | | 5 | public Long getId() {↵
|
7 | return foo;↵ | | 6 | return id;↵
|
8 | }↵ | | 7 | }↵
|
9 | ↵ | | |
|
10 | public void setFoo(String foo) {↵ | | 8 | public void setId(Long l) {↵
|
11 | this.foo = foo;↵ | | 9 | this.id = l;↵
|
12 | }↵ | | 10 | }↵
|
13 | ↵ | | 11 | ↵
|
14 | public String getBar() {↵ | | 12 | public String getDummy() {↵
|
15 | return bar;↵ | | 13 | return dummy;↵
|
16 | }↵ | | 14 | }↵
|
17 | ↵ | | |
|
18 | public void setBar(String bar) {↵ | | 15 | public void setDummy(String ↵
|
19 | this.bar = bar↵ | | 16 | string) {↵
|
20 | ;↵ | | 17 | dummy = string;↵
|
21 | }↵ | | 18 | }↵
|
22 | ↵ | | |
|
23 | public String getId() {↵ | | 19 | public ↵
|
24 | return id↵ | | 20 | MainObject getBelongsToMainObj() {↵
|
25 | ;↵ | | 21 | return belongsToMainObj;↵
|
26 | }↵ | | 22 | }↵
|
27 | ↵ | | |
|
28 | public void setId(String id) {↵ | | 23 | public void set↵
|
29 | this.id = id | | 24 | BelongsToMainObj(MainObject object) {↵
|
| | | 25 | belongsToMainObj = object
|