001: /*
002: * $Header: /cvsroot/jvalidate/jvalidate-framework/jvalidate/src/test/java/nl/knowlogy/validation/test/Customer.java,v 1.5 2007/04/23 22:14:55 roberthofstra Exp $
003: * $Revision: 1.5 $
004: * $Date: 2007/04/23 22:14:55 $
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: * @validate.class
025: *
026: * @author Robert
027: */
028: public class Customer {
029:
030: private String number;
031: private String firstName;
032: private String lastName;
033: private String creditcardNumber;
034:
035: private Address homeAdress;
036: private Address shippingAdress;
037: private String email;
038:
039: private int shoeSize;
040:
041: /**
042: * @validate.isnotblank
043: * @validate.maxlength value="20"
044: *
045: * @validate.group value="names"
046: *
047: * @param firstName The firstName to set.
048: * @return Returns the firstName.
049: */
050: public String getFirstName() {
051: return firstName;
052: }
053:
054: /**
055: * @param firstName The firstName to set.
056: */
057: public void setFirstName(String firstName) {
058: this .firstName = firstName;
059: }
060:
061: /**
062: * @validate.isrequired
063: * @validate.isnotblank
064: * @validate.maxlength value="2"
065: *
066: * @validate.group value="names"
067: *
068: * @return Returns the lastName.
069: */
070: public String getLastName() {
071: return lastName;
072: }
073:
074: /**
075: *
076: * @param lastName The lastName to set.
077: */
078: public void setLastName(String lastName) {
079: this .lastName = lastName;
080: }
081:
082: /**
083: * @return Returns the number.
084: */
085: public String getNumber() {
086: return number;
087: }
088:
089: /**
090: * @param number The number to set.
091: */
092: public void setNumber(String number) {
093: this .number = number;
094: }
095:
096: /**
097: *
098: * @validate.isvalid
099: * @validate.isrequired
100: *
101: * @return Returns the homeAdress.
102: */
103: public Address getHomeAdress() {
104: return homeAdress;
105: }
106:
107: /**
108: *
109: * @param homeAdress The homeAdress to set.
110: */
111: public void setHomeAdress(Address homeAdress) {
112: this .homeAdress = homeAdress;
113: }
114:
115: /**
116: *
117: * @validate.isvalid
118: *
119: * @return Returns the shippingAdress.
120: */
121: public Address getShippingAdress() {
122: return shippingAdress;
123: }
124:
125: /**
126: *
127: * @param shippingAdress The shippingAdress to set.
128: */
129: public void setShippingAdress(Address shippingAdress) {
130: this .shippingAdress = shippingAdress;
131: }
132:
133: /**
134: * @validate.custom class="nl.knowlogy.validation.customvalidators.CreditcardNumberValidator" errorcode="invalid.creditcardnumber"
135: *
136: * @return Returns the creditcardNumber.
137: */
138: public String getCreditcardNumber() {
139: return creditcardNumber;
140: }
141:
142: /**
143: * @param creditcardNumber The creditcardNumber to set.
144: */
145: public void setCreditcardNumber(String creditcardNumber) {
146: this .creditcardNumber = creditcardNumber;
147: }
148:
149: /**
150: * @validate.minsize value="22"
151: * @validate.maxsize value="50"
152: *
153: * @return
154: */
155: public int getShoeSize() {
156: return shoeSize;
157: }
158:
159: /**
160: * @param shoeSize
161: */
162: public void setShoeSize(int shoeSize) {
163: this .shoeSize = shoeSize;
164: }
165:
166: public String getEmail() {
167: return email;
168: }
169:
170: /**
171: * @validate.maxsize value="150"
172: * @validate.email
173: *
174: * @return
175: */
176: public void setEmail(String email) {
177: this.email = email;
178: }
179: }
|