1 | public class MyChild {
↵ | | 1 | public class OneToOneProxy {↵
|
2 | private Long id;
↵ | | 2 | private Long entityId;↵
|
3 | private String name;
↵ | | 3 | private String name;↵
|
4 | private MyEntity inverseParent;↵ | | 4 | private Entity↵
|
|
5 | public MyChild() {↵ | | |
|
6 | }↵ | | |
|
|
7 | public MyChild↵ | | 5 | WithOneToOnes entity;↵
|
|
| | | 6 | public OneToOneProxy() {}↵
|
8 | (String name) {
↵ | | 7 | public OneToOneProxy(String name) {↵
|
9 | this.name = name;
↵ | | 8 | this.name = name;↵
|
10 | }↵ | | 9 | }↵
|
11 |
↵ | | |
|
| | | 10 | /**↵
|
| | | 11 | * @return Returns the id.↵
|
| | | 12 | */↵
|
12 | public Long getId() {
↵ | | 13 | public Long getEntityId() {↵
|
13 | return id;
↵ | | 14 | return entityId;↵
|
14 | }↵ | | 15 | }↵
|
15 |
↵ | | |
|
| | | 16 | /**↵
|
| | | 17 | * @param entityId The id to set.↵
|
| | | 18 | */↵
|
16 | public void setId(Long id) {
↵ | | 19 | public void setEntityId(Long entityId) {↵
|
17 | this.id = id;
↵ | | 20 | this.entityId = entityId;↵
|
18 | }↵ | | 21 | }↵
|
19 |
↵ | | |
|
| | | 22 | /**↵
|
| | | 23 | * @return Returns the name.↵
|
| | | 24 | */↵
|
20 | public String getName() {
↵ | | 25 | public String getName() {↵
|
21 | return name;
↵ | | 26 | return name;↵
|
22 | }↵ | | 27 | }↵
|
23 |
↵ | | |
|
| | | 28 | /**↵
|
| | | 29 | * @param name The name to set.↵
|
| | | 30 | */↵
|
24 | public void setName(String name) {
↵ | | 31 | public void setName(String name) {↵
|
25 | this.name = name;
↵ | | 32 | this.name = name;↵
|
26 | }↵ | | 33 | }↵
|
27 |
↵ | | |
|
28 | public MyEntity getInverseParent() {
↵ | | 34 | public EntityWithOneToOnes getEntity() {↵
|
29 | return inverseParent;↵ | | 35 | return ↵
|
30 | }↵ | | |
|
31 |
↵ | | 36 | entity;↵
|
| | | 37 | }↵
|
32 | public void setInverseParent(MyEntity inverseParent) {
↵ | | 38 | public void setEntity(EntityWithOneToOnes entity) {↵
|
33 | this.inverseParent = inverseParent;
↵ | | 39 | this.entity = entity;↵
|
34 | | | 40 |
|