Bael 769 javers (#1543)
* BAEL-769 code for javers article * BAEL-769 add more examples
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user