001: /*
002: * Copyright 2007 Bastian Schenke Licensed under the Apache License, Version 2.0 (the "License");
003: * you may not use this file except in compliance with the License.
004: * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
005: * Unless required by applicable law or agreed to in writing, software distributed under the
006: * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
007: * either express or implied. See the License for the specific language governing permissions
008: * and limitations under the License.
009: */
010: package example.nz.org.take.r2ml.userv.domain;
011:
012: public class Driver {
013:
014: public static final String GENDER_MALE = "male";
015: public static final String GENDER_FEMALE = "female";
016: public static final String TRAINING_CERTIFICATE_CATEGORY_SCHOOL = "school certificate";
017: public static final String TRAINING_CERTIFICATE_CATEGORY_LICENSE = "licensed training company";
018: public static final String TRAINING_CERTIFICATE_CATEGORY_SENIOR = "senior citizen refresher course";
019:
020: private long age = 0;
021: private long birthDate = 0;
022: private String gender = GENDER_MALE;
023: private String name = "";
024: private long numberOfMovingViolations = 0;
025: private long numberOfAccidents = 0;
026: private boolean dui = false;
027: private String trainingCertificateCategory = "";
028:
029: public Driver(String name, String gender, int age) {
030: this .name = name;
031: this .gender = gender;
032: this .age = age;
033: }
034:
035: public boolean isPerson() {
036: return true;
037: }
038:
039: public boolean isBusinessParty() {
040: return true;
041: }
042:
043: public boolean isServiceParticipant() {
044: return true;
045: }
046:
047: public boolean isDriver() {
048: return true;
049: }
050:
051: /**
052: * @return the age
053: */
054: public long getAge() {
055: return age;
056: }
057:
058: /**
059: * @param age the age to set
060: */
061: public void setAge(long age) {
062: this .age = age;
063: }
064:
065: /**
066: * @return the birthDate
067: */
068: public long getBirthDate() {
069: return birthDate;
070: }
071:
072: /**
073: * @param birthDate the birthDate to set
074: */
075: public void setBirthDate(long birthDate) {
076: this .birthDate = birthDate;
077: }
078:
079: /**
080: * @return the dui
081: */
082: public boolean isDui() {
083: return dui;
084: }
085:
086: /**
087: * @param dui the dui to set
088: */
089: public void setDui(boolean dui) {
090: this .dui = dui;
091: }
092:
093: /**
094: * @return the gender
095: */
096: public String getGender() {
097: return gender;
098: }
099:
100: /**
101: * @param gender the gender to set
102: */
103: public void setGender(String gender) {
104: this .gender = gender;
105: }
106:
107: /**
108: * @return the name
109: */
110: public String getName() {
111: return name;
112: }
113:
114: /**
115: * @param name the name to set
116: */
117: public void setName(String name) {
118: this .name = name;
119: }
120:
121: /**
122: * @return the numberOfAccidents
123: */
124: public long getNumberOfAccidents() {
125: return numberOfAccidents;
126: }
127:
128: /**
129: * @param numberOfAccidents the numberOfAccidents to set
130: */
131: public void setNumberOfAccidents(long numberOfAccidents) {
132: this .numberOfAccidents = numberOfAccidents;
133: }
134:
135: /**
136: * @return the numberOfMovingViolations
137: */
138: public long getNumberOfMovingViolations() {
139: return numberOfMovingViolations;
140: }
141:
142: /**
143: * @param numberOfMovingViolations the numberOfMovingViolations to set
144: */
145: public void setNumberOfMovingViolations(
146: long numberOfMovingViolations) {
147: this .numberOfMovingViolations = numberOfMovingViolations;
148: }
149:
150: /**
151: * @return the trainingCertificateCategory
152: */
153: public String getTrainingCertificateCategory() {
154: return trainingCertificateCategory;
155: }
156:
157: /**
158: * @param trainingCertificateCategory the trainingCertificateCategory to set
159: */
160: public void setTrainingCertificateCategory(
161: String trainingCertificateCategory) {
162: this.trainingCertificateCategory = trainingCertificateCategory;
163: }
164: }
|