1 | public class MyEntity {
↵ | | 1 | public class Object2 {↵
|
2 | private Long id;
↵ | | 2 | private Long id;↵
|
3 | private String name;
↵ | | 3 | private String dummy;↵
|
4 | private MyEntity other;↵ | | 4 | private M↵
|
5 |
↵ | | 5 | ainObject belongsToMainObj;↵
|
|
6 | public Long getId() {
↵ | | 6 | public Long getId() {↵
|
7 | return id;
↵ | | 7 | return id;↵
|
8 | }↵ | | 8 | }↵
|
9 |
↵ | | |
|
|
10 | public void setId(Long id) {
↵ | | 9 | public void setId(Long l) {↵
|
11 | this.id = id;↵ | | 10 | this.id = ↵
|
12 | }↵ | | |
|
13 |
↵ | | 11 | l;↵
|
| | | 12 | }↵
|
| | | 13 | ↵
|
14 | public String getName() {
↵ | | 14 | public String getDummy() {↵
|
15 | return name;↵ | | 15 | return ↵
|
16 | }↵ | | |
|
17 |
↵ | | 16 | dummy;↵
|
| | | 17 | }↵
|
|
18 | public void setName(String name) {
↵ | | 18 | public void setDummy(String string) {↵
|
19 | this.name = name;↵ | | 19 | ↵
|
20 | }↵ | | |
|
|
21 | public MyEntity getOther↵ | | 20 | dummy = string;↵
|
| | | 21 | }↵
|
|
22 | () {
↵ | | 22 | public MainObject getBelongsToMainObj() {↵
|
23 | return other;↵ | | 23 | return ↵
|
24 | }↵ | | |
|
|
25 | public void setOther(MyEntity other↵ | | 24 | belongsToMainObj;↵
|
| | | 25 | }↵
|
|
26 | ) {
↵ | | 26 | public void setBelongsToMainObj(MainObject object) {↵
|
27 | this.other = other | | 27 | belongsToMainObj = object
|