1 | public class MyEntity {
↵ | | 1 | public class Parent {↵
|
2 | private Long id;
↵ | | 2 | private Long id;↵
|
3 | private String name;
↵ | | 3 | private String name;↵
|
4 | private MyEntity other;↵ | | 4 | private ↵
|
5 |
↵ | | 5 | Collection children = new HashSet();↵
|
| | | 6 | /**↵
|
| | | 7 | * @return Returns the children.↵
|
| | | 8 | */↵
|
6 | public Long getId() {
↵ | | 9 | public Collection getChildren() {↵
|
7 | return id;↵ | | 10 | return ↵
|
8 | }↵ | | |
|
|
9 | public void setId(Long id↵ | | 11 | children;↵
|
| | | 12 | }↵
|
| | | 13 | /**↵
|
| | | 14 | * @param children The children to set.↵
|
| | | 15 | */↵
|
10 | ) {
↵ | | 16 | public void setChildren(Collection children) {↵
|
11 | this.id = id;↵ | | 17 | this.↵
|
12 | }↵ | | |
|
13 |
↵ | | 18 | children = children;↵
|
| | | 19 | }↵
|
| | | 20 | /**↵
|
| | | 21 | * @return Returns the id.↵
|
| | | 22 | */↵
|
14 | public String getName() {
↵ | | 23 | public Long getId() {↵
|
15 | return name;↵ | | 24 | return ↵
|
16 | }↵ | | |
|
17 |
↵ | | 25 | id;↵
|
| | | 26 | }↵
|
| | | 27 | /**↵
|
| | | 28 | * @param id The id to set.↵
|
| | | 29 | */↵
|
18 | public void setName(String name) {
↵ | | 30 | public void setId(Long id) {↵
|
19 | this.name = name;↵ | | 31 | this.↵
|
20 | }↵ | | |
|
21 |
↵ | | 32 | id = id;↵
|
| | | 33 | }↵
|
| | | 34 | /**↵
|
| | | 35 | * @return Returns the name.↵
|
| | | 36 | */↵
|
22 | public MyEntity getOther() {
↵ | | 37 | public String getName() {↵
|
23 | return other;↵ | | 38 | return ↵
|
24 | }↵ | | |
|
|
25 | public void setOther(MyEntity other↵ | | 39 | name;↵
|
| | | 40 | }↵
|
| | | 41 | /**↵
|
| | | 42 | * @param name The name to set.↵
|
| | | 43 | */↵
|
26 | ) {
↵ | | 44 | public void setName(String name) {↵
|
27 | this.other = other | | 45 | this.name = name
|