12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- package com.vaadin.tests.data.bean;
-
- import java.io.Serializable;
-
- import javax.validation.constraints.Max;
- import javax.validation.constraints.Min;
- import javax.validation.constraints.NotNull;
-
- @SuppressWarnings("serial")
- public class Address implements Serializable {
-
- @NotNull
- private String streetAddress = "";
-
- @NotNull
- @Min(0)
- @Max(99999)
- private Integer postalCode = 0;
-
- @NotNull
- private String city = "";
-
- @NotNull
- private Country country = Country.FINLAND;
-
- public Address() {
-
- }
-
- public Address(String streetAddress, int postalCode, String city,
- Country country) {
- setStreetAddress(streetAddress);
- setPostalCode(postalCode);
- setCity(city);
- setCountry(country);
- }
-
- @Override
- public String toString() {
- return "Address [streetAddress=" + streetAddress + ", postalCode="
- + postalCode + ", city=" + city + ", country=" + country + "]";
- }
-
- public String getStreetAddress() {
- return streetAddress;
- }
-
- public void setStreetAddress(String streetAddress) {
- this.streetAddress = streetAddress;
- }
-
- public Integer getPostalCode() {
- return postalCode;
- }
-
- public void setPostalCode(Integer postalCode) {
- this.postalCode = postalCode;
- }
-
- public String getCity() {
- return city;
- }
-
- public void setCity(String city) {
- this.city = city;
- }
-
- public Country getCountry() {
- return country;
- }
-
- public void setCountry(Country country) {
- this.country = country;
- }
-
- }
|