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