@Embeddable public class PostalAddress extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
private String |
city |
private String |
state |
private String |
street1 |
private String |
street2 |
private String |
zip |
Constructor and Description |
---|
PostalAddress() |
Modifier and Type | Method and Description |
---|---|
String |
getCity() |
String |
getState() |
String |
getStreet1() |
String |
getStreet2() |
String |
getZip() |
void |
setCity(String city) |
void |
setState(String state) |
void |
setStreet1(String street1) |
void |
setStreet2(String street2) |
void |
setZip(String zip) |
String |
toString() |
@NotNull(groups={PreNormalizedCheck.class,PrePersistCheck.class}) @Size(min=2, max=30, groups={PostNormalizedCheck.class,PrePersistCheck.class}) @Pattern(regexp="^[0-9-A-Za-z\'\\ ]+$",groups=PreNormalizedCheck.class) @Pattern(regexp="^([0-9]+\\ )([A-Z][a-z0-9-]+\\ *)+$",groups=PostNormalizedCheck.class) private String street1
@Pattern(regexp="^[0-9-A-Za-z\'\\ ]+$",groups=PreNormalizedCheck.class) @Pattern(regexp="^([A-Z][a-z0-9-]+\\ *)+$",groups=PostNormalizedCheck.class) private String street2
@NotNull(groups={PreNormalizedCheck.class,PrePersistCheck.class}) @Pattern(regexp="^[A-Za-z-\'\\ ]+$",groups=PreNormalizedCheck.class) @Pattern(regexp="^([A-Z][a-z-]+\\ *)+$",groups=PostNormalizedCheck.class) private String city
@NotNull(groups=PrePersistCheck.class) @Size(min=2, max=2, groups={PostNormalizedCheck.class,PrePersistCheck.class}) @Pattern(regexp="[A-Za-z]{2}",groups=PreNormalizedCheck.class) @Pattern(regexp="[A-Z][A-Z]",groups=PostNormalizedCheck.class) private String state
@NotNull(groups={PreNormalizedCheck.class,PrePersistCheck.class}) @Size(min=5, max=10, groups={PostNormalizedCheck.class,PrePersistCheck.class}) @Pattern(regexp="^[0-9]{5}(-[0-9]{4})?$", groups=PostNormalizedCheck.class) private String zip
public String getStreet1()
public void setStreet1(String street1)
public String getStreet2()
public void setStreet2(String street2)
public String getCity()
public void setCity(String city)
public String getState()
public void setState(String state)
public String getZip()
public void setZip(String zip)
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.