001: package org.apache.tapestry.tutorial.data;
002:
003: import org.apache.tapestry.beaneditor.Validate;
004:
005: public class Address {
006: private Honorific _honorific;
007:
008: private String _firstName;
009:
010: private String _lastName;
011:
012: private String _street1;
013:
014: private String _street2;
015:
016: private String _city;
017:
018: private String _state;
019:
020: private String _zip;
021:
022: private String _email;
023:
024: private String _phone;
025:
026: public Honorific getHonorific() {
027: return _honorific;
028: }
029:
030: @Validate("required")
031: public String getFirstName() {
032: return _firstName;
033: }
034:
035: public String getLastName() {
036: return _lastName;
037: }
038:
039: @Validate("required")
040: public String getStreet1() {
041: return _street1;
042: }
043:
044: public String getStreet2() {
045: return _street2;
046: }
047:
048: @Validate("required")
049: public String getCity() {
050: return _city;
051: }
052:
053: @Validate("required")
054: public String getState() {
055: return _state;
056: }
057:
058: @Validate("required,regexp")
059: public String getZip() {
060: return _zip;
061: }
062:
063: public String getEmail() {
064: return _email;
065: }
066:
067: public String getPhone() {
068: return _phone;
069: }
070:
071: public void setCity(String city) {
072: _city = city;
073: }
074:
075: public void setEmail(String email) {
076: _email = email;
077: }
078:
079: public void setFirstName(String firstName) {
080: _firstName = firstName;
081: }
082:
083: public void setHonorific(Honorific honorific) {
084: _honorific = honorific;
085: }
086:
087: public void setLastName(String lastName) {
088: _lastName = lastName;
089: }
090:
091: public void setPhone(String phone) {
092: _phone = phone;
093: }
094:
095: public void setState(String state) {
096: _state = state;
097: }
098:
099: public void setStreet1(String street1) {
100: _street1 = street1;
101: }
102:
103: public void setStreet2(String street2) {
104: _street2 = street2;
105: }
106:
107: public void setZip(String zip) {
108: _zip = zip;
109: }
110: }
|