001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.commons.validator.example;
018:
019: /**
020: * A simple bean to use with the Validator Example.
021: *
022: * @version $Revision: 478334 $ $Date: 2006-11-22 21:31:54 +0000 (Wed, 22 Nov 2006) $
023: */
024: public class ValidateBean extends Object {
025:
026: String lastName, firstName, street1, street2, city, state,
027: postalCode, age;
028:
029: public void setLastName(String lastName) {
030: this .lastName = lastName;
031: }
032:
033: public void setFirstName(String firstName) {
034: this .firstName = firstName;
035: }
036:
037: public void setStreet1(String street1) {
038: this .street1 = street1;
039: }
040:
041: public void setStreet2(String street2) {
042: this .street2 = street2;
043: }
044:
045: public void setCity(String city) {
046: this .city = city;
047: }
048:
049: public void setState(String state) {
050: this .state = state;
051: }
052:
053: public void setPostalCode(String postalCode) {
054: this .postalCode = postalCode;
055: }
056:
057: public void setAge(String age) {
058: this .age = age;
059: }
060:
061: public String getLastName() {
062: return this .lastName;
063: }
064:
065: public String getFirstName() {
066: return this .firstName;
067: }
068:
069: public String getStreet1() {
070: return this .street1;
071: }
072:
073: public String getStreet2() {
074: return this .street2;
075: }
076:
077: public String getCity() {
078: return this .city;
079: }
080:
081: public String getState() {
082: return this .state;
083: }
084:
085: public String getPostalCode() {
086: return this .postalCode;
087: }
088:
089: public String getAge() {
090: return this .age;
091: }
092:
093: public String toString() {
094: return "{lastname=" + this .lastName + ", firstname="
095: + this .firstName + ", street1=" + this .street1
096: + ",\n street2=" + this .street2 + ", " + "city="
097: + this .city + ", state=" + this .state
098: + ",\n postalcode=" + this .postalCode + ", age="
099: + this .age + "}";
100: }
101:
102: }
|