001: package com.silvermindsoftware.hitch.sample.model;
002:
003: /**
004: * Copyright 2007 Brandon Goodin
005: *
006: * Licensed under the Apache License, Version 2.0 (the "License");
007: * you may not use this file except in compliance with the License.
008: * You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing, software
013: * distributed under the License is distributed on an "AS IS" BASIS,
014: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015: * See the License for the specific language governing permissions and
016: * limitations under the License.
017: */
018:
019: import java.util.Date;
020:
021: public class Person {
022:
023: private String firstName;
024: private String lastName;
025: private String middleName;
026: private Integer age;
027: private Float height;
028: private Double income;
029: private Date birthDate;
030: private Integer sex;
031: private boolean cool;
032: private String favoriteColor;
033: private Vehicle primaryVehicle;
034: private Vehicle secondaryVehicle;
035: private Integer numberOfChildren;
036: private Vehicle favoriteVehicle;
037: private Integer fanciestVehicle;
038: private Integer shoeSize;
039: private String notes;
040:
041: public Person() {
042: }
043:
044: public Person(String firstName, String lastName, String middleName,
045: Integer age, Float height, Double income, Date birthDate,
046: Sex sex, boolean cool, String favoriteColor,
047: Vehicle primaryVehicle, Vehicle secondaryVehicle,
048: Integer numberOfChildren, Vehicle favoriteVehicle,
049: Integer fanciestVehicle, Integer shoeSize, String notes) {
050:
051: this .firstName = firstName;
052: this .lastName = lastName;
053: this .middleName = middleName;
054: this .age = age;
055: this .height = height;
056: this .income = income;
057: this .birthDate = birthDate;
058: this .sex = sex.getId();
059: this .cool = cool;
060: this .favoriteColor = favoriteColor;
061: this .primaryVehicle = primaryVehicle;
062: this .secondaryVehicle = secondaryVehicle;
063: this .numberOfChildren = numberOfChildren;
064: this .favoriteVehicle = favoriteVehicle;
065: this .fanciestVehicle = fanciestVehicle;
066: this .shoeSize = shoeSize;
067: this .notes = notes;
068:
069: }
070:
071: public String getFirstName() {
072: return firstName;
073: }
074:
075: public void setFirstName(String firstName) {
076: this .firstName = firstName;
077: }
078:
079: public String getLastName() {
080: return lastName;
081: }
082:
083: public void setLastName(String lastName) {
084: this .lastName = lastName;
085: }
086:
087: public String getMiddleName() {
088: return middleName;
089: }
090:
091: public void setMiddleName(String middleName) {
092: this .middleName = middleName;
093: }
094:
095: public Integer getAge() {
096: return age;
097: }
098:
099: public void setAge(Integer age) {
100: this .age = age;
101: }
102:
103: public Float getHeight() {
104: return height;
105: }
106:
107: public void setHeight(Float height) {
108: this .height = height;
109: }
110:
111: public Double getIncome() {
112: return income;
113: }
114:
115: public void setIncome(Double income) {
116: this .income = income;
117: }
118:
119: public Date getBirthDate() {
120: return birthDate;
121: }
122:
123: public void setBirthDate(Date birthDate) {
124: this .birthDate = birthDate;
125: }
126:
127: public Integer getSex() {
128: return sex;
129: }
130:
131: public void setSex(Integer sex) {
132: this .sex = sex;
133: }
134:
135: public boolean isCool() {
136: return cool;
137: }
138:
139: public void setCool(boolean cool) {
140: this .cool = cool;
141: }
142:
143: public String getFavoriteColor() {
144: return favoriteColor;
145: }
146:
147: public void setFavoriteColor(String favoriteColor) {
148: this .favoriteColor = favoriteColor;
149: }
150:
151: public Vehicle getPrimaryVehicle() {
152: return primaryVehicle;
153: }
154:
155: public void setPrimaryVehicle(Vehicle primaryVehicle) {
156: this .primaryVehicle = primaryVehicle;
157: }
158:
159: public Vehicle getSecondaryVehicle() {
160: return secondaryVehicle;
161: }
162:
163: public void setSecondaryVehicle(Vehicle secondaryVehicle) {
164: this .secondaryVehicle = secondaryVehicle;
165: }
166:
167: public Integer getNumberOfChildren() {
168: return numberOfChildren;
169: }
170:
171: public void setNumberOfChildren(Integer numberOfChildren) {
172: this .numberOfChildren = numberOfChildren;
173: }
174:
175: public Vehicle getFavoriteVehicle() {
176: return favoriteVehicle;
177: }
178:
179: public void setFavoriteVehicle(Vehicle favoriteVehicle) {
180: this .favoriteVehicle = favoriteVehicle;
181: }
182:
183: public Integer getFanciestVehicle() {
184: return fanciestVehicle;
185: }
186:
187: public void setFanciestVehicle(Integer fanciestVehicle) {
188: this .fanciestVehicle = fanciestVehicle;
189: }
190:
191: public Integer getShoeSize() {
192: return shoeSize;
193: }
194:
195: public void setShoeSize(Integer shoeSize) {
196: this .shoeSize = shoeSize;
197: }
198:
199: public String getNotes() {
200: return notes;
201: }
202:
203: public void setNotes(String notes) {
204: this .notes = notes;
205: }
206:
207: public String toString() {
208: return "First Name: " + firstName + "\n Last Name: " + lastName
209: + "\n Middle Name: " + middleName + "\n Age: " + age
210: + "\n Height: " + height + "\n Income: " + income
211: + "\n Birth Date: " + birthDate + "\n Sex: " + sex
212: + "\n Cool: " + cool + "\n Favorite Color: "
213: + favoriteColor + "\n Primary Vehicle: "
214: + primaryVehicle + "\n Secondary Vehicle: "
215: + secondaryVehicle + "\n Favorite Vehicle: "
216: + favoriteVehicle + "\n Number of Children: "
217: + numberOfChildren + "\n Fanciest Vehicle: "
218: + fanciestVehicle + "\n Shoe Size: " + shoeSize
219: + "\n Notes: " + notes;
220: }
221: }
|