KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > validator > example > ValidateBean


1 /*
2  * $Id: ValidateBean.java 155434 2005-02-26 13:16:41Z dirkv $
3  * $Rev$
4  * $Date: 2005-02-26 05:16:41 -0800 (Sat, 26 Feb 2005) $
5  *
6  * ====================================================================
7  * Copyright 2000-2005 The Apache Software Foundation
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */

21
22 package org.apache.commons.validator.example;
23
24 /**
25  * A simple bean to use with the Validator Example.
26  */

27 public class ValidateBean extends Object JavaDoc {
28
29     String JavaDoc lastName, firstName, street1, street2, city, state, postalCode, age;
30
31     public void setLastName(String JavaDoc lastName) {
32         this.lastName = lastName;
33     }
34     
35     public void setFirstName(String JavaDoc firstName) {
36         this.firstName = firstName;
37     }
38     
39     public void setStreet1(String JavaDoc street1) {
40         this.street1 = street1;
41     }
42     
43     public void setStreet2(String JavaDoc street2) {
44         this.street2 = street2;
45     }
46     
47     public void setCity(String JavaDoc city) {
48         this.city = city;
49     }
50     
51     public void setState(String JavaDoc state) {
52         this.state = state;
53     }
54     
55     public void setPostalCode(String JavaDoc postalCode) {
56         this.postalCode = postalCode;
57     }
58     
59     public void setAge(String JavaDoc age) {
60         this.age = age;
61     }
62
63     public String JavaDoc getLastName() {
64         return this.lastName;
65     }
66     
67     public String JavaDoc getFirstName() {
68         return this.firstName;
69     }
70     
71     public String JavaDoc getStreet1() {
72         return this.street1;
73     }
74     
75     public String JavaDoc getStreet2() {
76         return this.street2;
77     }
78     
79     public String JavaDoc getCity() {
80         return this.city;
81     }
82     
83     public String JavaDoc getState() {
84         return this.state;
85     }
86     
87     public String JavaDoc getPostalCode() {
88         return this.postalCode;
89     }
90     
91     public String JavaDoc getAge() {
92         return this.age;
93     }
94
95     public String JavaDoc toString() {
96         return "{lastname="
97             + this.lastName
98             + ", firstname="
99             + this.firstName
100             + ", street1="
101             + this.street1
102             + ",\n street2="
103             + this.street2
104             + ", "
105             + "city="
106             + this.city
107             + ", state="
108             + this.state
109             + ",\n postalcode="
110             + this.postalCode
111             + ", age="
112             + this.age
113             + "}";
114     }
115
116 }
117
Popular Tags