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