001: /*
002: * $Id: Employee.java 471756 2006-11-06 15:01:43Z husted $
003: *
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021: package org.apache.struts2.showcase.model;
022:
023: import java.io.Serializable;
024: import java.util.Date;
025: import java.util.List;
026:
027: /**
028: * Employee.
029: *
030: */
031:
032: public class Employee implements IdEntity {
033:
034: private static final long serialVersionUID = -6226845151026823748L;
035:
036: private Long empId; //textfield w/ conversion
037: private String firstName;
038: private String lastName;
039: private Date birthDate; //datepicker
040: private Float salary; //textfield w/ conversion
041: private boolean married; //checkbox
042: private String position; //combobox
043: private Skill mainSkill; //select
044: private List otherSkills; //doubleSelect
045: private String password; //password
046: private String level; //radio
047: private String comment; //textarea
048:
049: public Employee() {
050: }
051:
052: public Employee(Long empId, String firstName, String lastName) {
053: this .empId = empId;
054: this .firstName = firstName;
055: this .lastName = lastName;
056: }
057:
058: public Employee(Long empId, String firstName, String lastName,
059: Date birthDate, Float salary, boolean married,
060: String position, Skill mainSkill, List otherSkills,
061: String password, String level, String comment) {
062: this .empId = empId;
063: this .firstName = firstName;
064: this .lastName = lastName;
065: this .birthDate = birthDate;
066: this .salary = salary;
067: this .married = married;
068: this .position = position;
069: this .mainSkill = mainSkill;
070: this .otherSkills = otherSkills;
071: this .password = password;
072: this .level = level;
073: this .comment = comment;
074: }
075:
076: public Long getEmpId() {
077: return empId;
078: }
079:
080: public void setEmpId(Long empId) {
081: this .empId = empId;
082: }
083:
084: public Serializable getId() {
085: return getEmpId();
086: }
087:
088: public void setId(Serializable id) {
089: setEmpId((Long) id);
090: }
091:
092: public String getFirstName() {
093: return firstName;
094: }
095:
096: public void setFirstName(String firstName) {
097: this .firstName = firstName;
098: }
099:
100: public String getLastName() {
101: return lastName;
102: }
103:
104: public void setLastName(String lastName) {
105: this .lastName = lastName;
106: }
107:
108: public Date getBirthDate() {
109: return birthDate;
110: }
111:
112: public void setBirthDate(Date birthDate) {
113: this .birthDate = birthDate;
114: }
115:
116: public Float getSalary() {
117: return salary;
118: }
119:
120: public void setSalary(Float salary) {
121: this .salary = salary;
122: }
123:
124: public boolean isMarried() {
125: return married;
126: }
127:
128: public void setMarried(boolean married) {
129: this .married = married;
130: }
131:
132: public String getPosition() {
133: return position;
134: }
135:
136: public void setPosition(String position) {
137: this .position = position;
138: }
139:
140: public Skill getMainSkill() {
141: return mainSkill;
142: }
143:
144: public void setMainSkill(Skill mainSkill) {
145: this .mainSkill = mainSkill;
146: }
147:
148: public List getOtherSkills() {
149: return otherSkills;
150: }
151:
152: public void setOtherSkills(List otherSkills) {
153: this .otherSkills = otherSkills;
154: }
155:
156: public String getPassword() {
157: return password;
158: }
159:
160: public void setPassword(String password) {
161: this .password = password;
162: }
163:
164: public String getLevel() {
165: return level;
166: }
167:
168: public void setLevel(String level) {
169: this .level = level;
170: }
171:
172: public String getComment() {
173: return comment;
174: }
175:
176: public void setComment(String comment) {
177: this.comment = comment;
178: }
179: }
|