Create Address.java
This commit is contained in:
parent
2a7a33f717
commit
18f4728a9f
|
@ -0,0 +1,42 @@
|
||||||
|
package com.baeldung.ebean.model;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
public class Address extends BaseModel{
|
||||||
|
|
||||||
|
public Address(String addressLine1, String addressLine2, String city) {
|
||||||
|
super();
|
||||||
|
this.addressLine1 = addressLine1;
|
||||||
|
this.addressLine2 = addressLine2;
|
||||||
|
this.city = city;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String addressLine1;
|
||||||
|
private String addressLine2;
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
public String getAddressLine1() {
|
||||||
|
return addressLine1;
|
||||||
|
}
|
||||||
|
public void setAddressLine1(String addressLine1) {
|
||||||
|
this.addressLine1 = addressLine1;
|
||||||
|
}
|
||||||
|
public String getAddressLine2() {
|
||||||
|
return addressLine2;
|
||||||
|
}
|
||||||
|
public void setAddressLine2(String addressLine2) {
|
||||||
|
this.addressLine2 = addressLine2;
|
||||||
|
}
|
||||||
|
public String getCity() {
|
||||||
|
return city;
|
||||||
|
}
|
||||||
|
public void setCity(String city) {
|
||||||
|
this.city = city;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Address [id=" + id + ", addressLine1=" + addressLine1 + ", addressLine2=" + addressLine2 + ", city=" + city + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue