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