#2069 - Add ebean-querybean, querybean-generator and kotlin-querybean-generator as modules

This commit is contained in:
rob bygrave
2020-10-09 00:02:09 +13:00
parent bc055fea25
commit 038db79737
140 changed files with 11583 additions and 0 deletions
@@ -0,0 +1,100 @@
package org.example.domain;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.Size;
/**
* Address entity bean.
*/
@Entity
@Table(name = "o_address")
public class Address extends BaseModel {
@Size(max = 100)
String line1;
@Size(max = 100)
String line2;
@Size(max = 100)
String city;
@ManyToOne
Country country;
/**
* Create a copy of the address. Used to provide a 'snapshot' of
* the shippingAddress for a give order.
*/
public Address createCopy() {
Address copy = new Address();
copy.setLine1(line1);
copy.setLine2(line2);
copy.setCity(city);
copy.setCountry(country);
return copy;
}
public String toString() {
return id + " " + line1 + " " + line2 + " " + city + " " + country;
}
/**
* Return line 1.
*/
public String getLine1() {
return line1;
}
/**
* Set line 1.
*/
public void setLine1(String line1) {
this.line1 = line1;
}
/**
* Return line 2.
*/
public String getLine2() {
return line2;
}
/**
* Set line 2.
*/
public void setLine2(String line2) {
this.line2 = line2;
}
/**
* Return city.
*/
public String getCity() {
return city;
}
/**
* Set city.
*/
public void setCity(String city) {
this.city = city;
}
/**
* Return country.
*/
public Country getCountry() {
return country;
}
/**
* Set country.
*/
public void setCountry(Country country) {
this.country = country;
}
}