Bael 769 javers (#1543)

* BAEL-769 code for javers article

* BAEL-769 add more examples
This commit is contained in:
Tomasz Lelek
2017-04-02 23:54:28 +02:00
committed by adamd1985
parent 09329512cd
commit 44e63c68f2
5 changed files with 197 additions and 0 deletions
@@ -0,0 +1,11 @@
package com.baeldung.javers;
public class Address {
private String country;
public Address(String country) {
this.country = country;
}
}
@@ -0,0 +1,27 @@
package com.baeldung.javers;
public class Person {
private Integer id;
private String name;
public Person(Integer id, String name) {
this.id = id;
this.name = name;
}
public Integer getId() {
return id;
}
public String getName() {
return name;
}
public void setId(Integer id) {
this.id = id;
}
public void setName(String name) {
this.name = name;
}
}
@@ -0,0 +1,40 @@
package com.baeldung.javers;
import java.util.List;
public class PersonWithAddress {
private Integer id;
private String name;
private List<Address> address;
public PersonWithAddress(Integer id, String name, List<Address> address) {
this.id = id;
this.name = name;
this.address = address;
}
public Integer getId() {
return id;
}
public String getName() {
return name;
}
public void setId(Integer id) {
this.id = id;
}
public void setName(String name) {
this.name = name;
}
public List<Address> getAddress() {
return address;
}
public void setAddress(List<Address> address) {
this.address = address;
}
}