001: /*
002: * $Header: /cvsroot/jvalidate/jvalidate-framework/jvalidate/src/test/java/nl/knowlogy/validation/test/Address.java,v 1.1 2007/04/07 12:28:01 roberthofstra Exp $
003: * $Revision: 1.1 $
004: * $Date: 2007/04/07 12:28:01 $
005: *
006: *
007: * Created on Oct 6, 2004
008: *
009: * All right reserved(c) 2004, Knowlogy
010: *
011: * Copyright 2004 - 2005 Knowlogy, the Netherlands. All rights reserved.
012: * All Knowlogy brand and product names are trademarks or registered trademarks
013: * of Knowlogy in the Netherlands and other countries.
014: *
015: * No part of this publication may be reproduced, transmitted, stored in a retrieval system,
016: * or translated into any human or computer language, in any form, or by any means, electronic,
017: * mechanical, magnetic, optical, chemical, manual, or otherwise,
018: * without the prior written permission of the copyright owner, Knowlogy.
019: *
020: */
021: package nl.knowlogy.validation.test;
022:
023: /**
024: *
025: * @validate.class
026: * @author Robert
027: */
028: public class Address {
029:
030: private String street;
031: private Integer houseNumber;
032: private String houseNumberExtension;
033: private String zipCode;
034: private String city;
035: private String countryCode;
036: private String typeAdres;
037:
038: /**
039: * @return Returns the city.
040: */
041: public String getCity() {
042: return city;
043: }
044:
045: /**
046: * @validate.isrequired
047: * @validate.isnotblank
048: * @validate.maxlength value="10"
049: *
050: *
051: * @param city The city to set.
052: */
053: public void setCity(String city) {
054: this .city = city;
055: }
056:
057: /**
058: * @return Returns the countryCode.
059: */
060: public String getCountryCode() {
061: return countryCode;
062: }
063:
064: /**
065: * @validate.isrequired
066: * @validate.length value="3"
067: *
068: * @param countryCode The countryCode to set.
069: */
070: public void setCountryCode(String countryCode) {
071: this .countryCode = countryCode;
072: }
073:
074: /**
075: *
076: *
077: * @return Returns the houseNumber.
078: */
079: public Integer getHouseNumber() {
080: return houseNumber;
081: }
082:
083: /**
084: * @validate.isrequired
085: * @validate.isnotblank
086: * @validate.maxlength value="5"
087: *
088: * @param houseNumber The houseNumber to set.
089: */
090: public void setHouseNumber(Integer houseNumber) {
091: this .houseNumber = houseNumber;
092: }
093:
094: /**
095: * @validate.isnotblank
096: * @validate.length value="5"
097: *
098: * @return Returns the houseNumberExtension.
099: */
100: public String getHouseNumberExtension() {
101: return houseNumberExtension;
102: }
103:
104: /**
105: * @param houseNumberExtension The houseNumberExtension to set.
106: */
107: public void setHouseNumberExtension(String houseNumberExtension) {
108: this .houseNumberExtension = houseNumberExtension;
109: }
110:
111: /**
112: * @return Returns the street.
113: */
114: public String getStreet() {
115: return street;
116: }
117:
118: /**
119: * @validate.isrequired
120: * @validate.isnotblank
121: * @validate.maxlength value="30"
122: *
123: * @param street The street to set.
124: */
125: public void setStreet(String street) {
126: this .street = street;
127: }
128:
129: /**
130: * @return Returns the zipCode.
131: */
132: public String getZipCode() {
133: return zipCode;
134: }
135:
136: /**
137: * @validate.pattern value="^[1-9]\\d{3}[- ]?[a-zA-Z]{2}$" errorcode="zipcode.invalidformat"
138: * @validate.isrequired errorcode="zipcode.isrequired"
139: * @validate.maxlength value="6" errorcode="zipcode.tolong"
140: *
141: * @param zipCode The zipCode to set.
142: */
143: public void setZipCode(String zipCode) {
144: this .zipCode = zipCode;
145: }
146:
147: /**
148: * @return Returns the typeAdres.
149: */
150: public String getTypeAdres() {
151: return typeAdres;
152: }
153:
154: /**
155: * @validate.isrequired
156: * @validate.allowedvalues value="C,V" errorcode="typeadress.notallowedvalue"
157: *
158: * @param typeAdres The typeAdres to set.
159: */
160: public void setTypeAdres(String typeAdres) {
161: this.typeAdres = typeAdres;
162: }
163: }
|