01: /*
02: * Copyright 2005-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
05: * in compliance with the License. You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software distributed under the License
10: * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11: * or implied. See the License for the specific language governing permissions and limitations under
12: * the License.
13: */
14:
15: package org.strecks.holidaybooking.domain;
16:
17: import java.io.Serializable;
18: import java.util.Date;
19:
20: /**
21: * @author Phil Zoio
22: */
23: public class HolidayBooking implements Serializable {
24:
25: private static final long serialVersionUID = 8230500555897220325L;
26:
27: private long entryId;
28:
29: private String title;
30:
31: private LeaveType leaveType;
32:
33: private Date startDate;
34:
35: private int days;
36:
37: public Date getStartDate() {
38: return startDate;
39: }
40:
41: public void setStartDate(Date date) {
42: this .startDate = date;
43: }
44:
45: public int getDays() {
46: return days;
47: }
48:
49: public void setDays(int days) {
50: this .days = days;
51: }
52:
53: public long getEntryId() {
54: return entryId;
55: }
56:
57: public void setEntryId(long entryId) {
58: this .entryId = entryId;
59: }
60:
61: public String getTitle() {
62: return title;
63: }
64:
65: public void setTitle(String title) {
66: this .title = title;
67: }
68:
69: public LeaveType getLeaveType() {
70: return leaveType;
71: }
72:
73: public void setLeaveType(LeaveType leaveType) {
74: this .leaveType = leaveType;
75: }
76:
77: public boolean equals(Object obj) {
78: if (obj instanceof HolidayBooking) {
79: HolidayBooking booking = (HolidayBooking) obj;
80: return booking.getEntryId() == entryId;
81: } else
82: return false;
83: }
84:
85: }
|