001: /*
002: * Copyright 2006-2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.opensource.org/licenses/ecl1.php
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.kuali.module.kra.budget.bo;
017:
018: import java.sql.Timestamp;
019: import java.util.ArrayList;
020: import java.util.LinkedHashMap;
021: import java.util.List;
022:
023: import org.apache.ojb.broker.PersistenceBroker;
024: import org.kuali.core.bo.PersistableBusinessObjectBase;
025: import org.kuali.core.service.DateTimeService;
026: import org.kuali.core.util.KualiDecimal;
027: import org.kuali.kfs.context.SpringContext;
028:
029: /**
030: * Account Business Object
031: */
032: public class AppointmentType extends PersistableBusinessObjectBase {
033:
034: private static final long serialVersionUID = 5817907435877665832L;
035: private String appointmentTypeCode;
036: private String appointmentTypeDescription;
037: private String appointmentTypeAbbrieviation;
038: private KualiDecimal fringeRateAmount;
039: private KualiDecimal costShareFringeRateAmount;
040: private Timestamp lastUpdate;
041: private boolean displayGrid;
042: private boolean active;
043: private List appointmentTypeEffectiveDateItems = new ArrayList();
044: private String relatedAppointmentTypeCode;
045: private AppointmentType relatedAppointmentType;
046:
047: /*******************************************************************************************************************************
048: *
049: *
050: */
051: public AppointmentType() {
052: }
053:
054: public AppointmentType(String appointmentTypeCode) {
055: this ();
056: this .appointmentTypeCode = appointmentTypeCode;
057: }
058:
059: /**
060: * Gets the active attribute.
061: *
062: * @return Returns the active.
063: */
064: public boolean isActive() {
065: return active;
066: }
067:
068: /**
069: * Sets the active attribute value.
070: *
071: * @param active The active to set.
072: */
073: public void setActive(boolean active) {
074: this .active = active;
075: }
076:
077: /**
078: * @return Returns the appointmentTypeAbbrieviation.
079: */
080: public String getAppointmentTypeAbbrieviation() {
081: return appointmentTypeAbbrieviation;
082: }
083:
084: /**
085: * @param appointmentTypeAbbrieviation The appointmentTypeAbbrieviation to set.
086: */
087: public void setAppointmentTypeAbbrieviation(
088: String appointmentTypeAbbrieviation) {
089: this .appointmentTypeAbbrieviation = appointmentTypeAbbrieviation;
090: }
091:
092: /**
093: * @return Returns the appointmentTypeDescription.
094: */
095: public String getAppointmentTypeDescription() {
096: return appointmentTypeDescription;
097: }
098:
099: /**
100: * @param appointmentTypeDescription The appointmentTypeDescription to set.
101: */
102: public void setAppointmentTypeDescription(
103: String appointmentTypeDescription) {
104: this .appointmentTypeDescription = appointmentTypeDescription;
105: }
106:
107: /**
108: * @return Returns the costShareFringeRateAmount.
109: */
110: public KualiDecimal getCostShareFringeRateAmount() {
111: return costShareFringeRateAmount;
112: }
113:
114: /**
115: * @param costShareFringeRateAmount The costShareFringeRateAmount to set.
116: */
117: public void setCostShareFringeRateAmount(
118: KualiDecimal costShareFringeRateAmount) {
119: this .costShareFringeRateAmount = costShareFringeRateAmount;
120: }
121:
122: /**
123: * @return Returns the fringeRateAmount.
124: */
125: public KualiDecimal getFringeRateAmount() {
126: return fringeRateAmount;
127: }
128:
129: /**
130: * @param fringeRateAmount The fringeRateAmount to set.
131: */
132: public void setFringeRateAmount(KualiDecimal fringeRateAmount) {
133: this .fringeRateAmount = fringeRateAmount;
134: }
135:
136: /**
137: * @return Returns the appointmentTypeCode.
138: */
139: public String getAppointmentTypeCode() {
140: return appointmentTypeCode;
141: }
142:
143: /**
144: * @return Returns the lastUpdate.
145: */
146: public Timestamp getLastUpdate() {
147: return lastUpdate;
148: }
149:
150: public void beforeInsert(PersistenceBroker persistenceBroker) {
151: super .beforeInsert(persistenceBroker);
152: this .lastUpdate = SpringContext.getBean(DateTimeService.class)
153: .getCurrentTimestamp();
154: }
155:
156: public void beforeUpdate(PersistenceBroker persistenceBroker) {
157: super .beforeUpdate(persistenceBroker);
158: this .lastUpdate = SpringContext.getBean(DateTimeService.class)
159: .getCurrentTimestamp();
160: }
161:
162: /*
163: * (non-Javadoc)
164: *
165: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
166: */
167: protected LinkedHashMap toStringMapper() {
168: LinkedHashMap m = new LinkedHashMap();
169: m.put("appointmentTypeCode", this .appointmentTypeCode);
170:
171: return m;
172: }
173:
174: /**
175: * Sets the appointmentTypeCode attribute value.
176: *
177: * @param appointmentTypeCode The appointmentTypeCode to set.
178: */
179: public void setAppointmentTypeCode(String appointmentTypeCode) {
180: this .appointmentTypeCode = appointmentTypeCode;
181: }
182:
183: /**
184: * Sets the lastUpdate attribute value.
185: *
186: * @param lastUpdate The lastUpdate to set.
187: */
188: public void setLastUpdate(Timestamp lastUpdate) {
189: this .lastUpdate = lastUpdate;
190: }
191:
192: /**
193: * Gets the appointmentTypeEffectiveDateItems attribute.
194: *
195: * @return Returns the appointmentTypeEffectiveDateItems
196: */
197: public List getAppointmentTypeEffectiveDateItems() {
198: return appointmentTypeEffectiveDateItems;
199: }
200:
201: /**
202: * Sets the appointmentTypeEffectiveDateItems attribute.
203: *
204: * @param appointmentTypeEffectiveDateItems The appointmentTypeEffectiveDateItems to set.
205: */
206: public void setAppointmentTypeEffectiveDateItems(
207: List appointmentTypeEffectiveDateItems) {
208: this .appointmentTypeEffectiveDateItems = appointmentTypeEffectiveDateItems;
209: }
210:
211: public boolean isDisplayGrid() {
212: return displayGrid;
213: }
214:
215: public void setDisplayGrid(boolean displayGrid) {
216: this .displayGrid = displayGrid;
217: }
218:
219: public AppointmentType getRelatedAppointmentType() {
220: return relatedAppointmentType;
221: }
222:
223: public void setRelatedAppointmentType(
224: AppointmentType relatedAppointmentType) {
225: this .relatedAppointmentType = relatedAppointmentType;
226: }
227:
228: public String getRelatedAppointmentTypeCode() {
229: return relatedAppointmentTypeCode;
230: }
231:
232: public void setRelatedAppointmentTypeCode(
233: String relatedAppointmentTypeCode) {
234: this.relatedAppointmentTypeCode = relatedAppointmentTypeCode;
235: }
236: }
|