001: /*
002: * Copyright 2005-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:
017: package org.kuali.module.cg.bo;
018:
019: import java.util.LinkedHashMap;
020:
021: import org.kuali.core.bo.PersistableBusinessObjectBase;
022: import org.kuali.core.util.KualiDecimal;
023: import org.kuali.module.kra.budget.bo.AgencyExtension;
024:
025: /**
026: * This class defines an agency as it is used and referenced within the Contracts and Grants portion of a college or university
027: * financial system.
028: */
029: public class Agency extends PersistableBusinessObjectBase {
030:
031: private String agencyNumber;
032: private String reportingName;
033: private String fullName;
034: private String agencyTypeCode;
035: private String reportsToAgencyNumber;
036: private KualiDecimal indirectAmount;
037: private boolean historicalIndicator;
038: private boolean inStateIndicator;
039: private Agency reportsToAgency;
040: private AgencyType agencyType;
041: private AgencyExtension agencyExtension;
042:
043: /**
044: * Gets the agencyTypeCode attribute.
045: *
046: * @return Returns the agencyTypeCode.
047: */
048: public String getAgencyTypeCode() {
049: return agencyTypeCode;
050: }
051:
052: /**
053: * Sets the agencyTypeCode attribute value.
054: *
055: * @param agencyTypeCode The agencyTypeCode to set.
056: */
057: public void setAgencyTypeCode(String agencyTypeCode) {
058: this .agencyTypeCode = agencyTypeCode;
059: }
060:
061: /**
062: * Gets the reportsToAgencyNumber attribute.
063: *
064: * @return Returns the reportsToAgencyNumber.
065: */
066: public String getReportsToAgencyNumber() {
067: return reportsToAgencyNumber;
068: }
069:
070: /**
071: * Sets the reportsToAgencyNumber attribute value.
072: *
073: * @param reportsToAgencyNumber The reportsToAgencyNumber to set.
074: */
075: public void setReportsToAgencyNumber(String reportsToAgencyNumber) {
076: this .reportsToAgencyNumber = reportsToAgencyNumber;
077: }
078:
079: /**
080: * Default no-arg constructor.
081: */
082: public Agency() {
083:
084: }
085:
086: /**
087: * Gets the agencyNumber attribute.
088: *
089: * @return Returns the agencyNumber
090: */
091: public String getAgencyNumber() {
092: return agencyNumber;
093: }
094:
095: /**
096: * Sets the agencyNumber attribute.
097: *
098: * @param agencyNumber The agencyNumber to set.
099: */
100: public void setAgencyNumber(String agencyNumber) {
101: this .agencyNumber = agencyNumber;
102: }
103:
104: /**
105: * Gets the reportingName attribute.
106: *
107: * @return Returns the reportingName
108: */
109: public String getReportingName() {
110: return reportingName;
111: }
112:
113: /**
114: * Sets the reportingName attribute.
115: *
116: * @param reportingName The reportingName to set.
117: */
118: public void setReportingName(String reportingName) {
119: this .reportingName = reportingName;
120: }
121:
122: /**
123: * Gets the fullName attribute.
124: *
125: * @return Returns the fullName
126: */
127: public String getFullName() {
128: return fullName;
129: }
130:
131: /**
132: * Sets the fullName attribute.
133: *
134: * @param fullName The fullName to set.
135: */
136: public void setFullName(String fullName) {
137: this .fullName = fullName;
138: }
139:
140: /**
141: * Gets the indirectAmount attribute.
142: *
143: * @return Returns the indirectAmount
144: */
145: public KualiDecimal getIndirectAmount() {
146: return indirectAmount;
147: }
148:
149: /**
150: * Sets the indirectAmount attribute.
151: *
152: * @param indirectAmount The indirectAmount to set.
153: */
154: public void setIndirectAmount(KualiDecimal indirectAmount) {
155: this .indirectAmount = indirectAmount;
156: }
157:
158: /**
159: * Gets the historicalIndicator attribute.
160: *
161: * @return Returns the historicalIndicator
162: */
163: public boolean isHistoricalIndicator() {
164: return historicalIndicator;
165: }
166:
167: /**
168: * Sets the historicalIndicator attribute.
169: *
170: * @param historicalIndicator The historicalIndicator to set.
171: */
172: public void setHistoricalIndicator(boolean historicalIndicator) {
173: this .historicalIndicator = historicalIndicator;
174: }
175:
176: /**
177: * Gets the inStateIndicator attribute.
178: *
179: * @return Returns the inStateIndicator
180: */
181: public boolean isInStateIndicator() {
182: return inStateIndicator;
183: }
184:
185: /**
186: * Sets the inStateIndicator attribute.
187: *
188: * @param inStateIndicator The inStateIndicator to set.
189: */
190: public void setInStateIndicator(boolean inStateIndicator) {
191: this .inStateIndicator = inStateIndicator;
192: }
193:
194: /**
195: * Gets the reportsToAgency attribute.
196: *
197: * @return Returns the reportsToAgency
198: */
199: public Agency getReportsToAgency() {
200: return reportsToAgency;
201: }
202:
203: /**
204: * Sets the reportsToAgency attribute.
205: *
206: * @param reportsToAgencyNumber The reportsToAgency to set.
207: * @deprecated
208: * @todo Why is this deprecated?
209: */
210: public void setReportsToAgency(Agency reportsToAgencyNumber) {
211: this .reportsToAgency = reportsToAgencyNumber;
212: }
213:
214: /**
215: * Gets the agencyType attribute.
216: *
217: * @return Returns the agencyType
218: */
219: public AgencyType getAgencyType() {
220: return agencyType;
221: }
222:
223: /**
224: * Sets the agencyType attribute.
225: *
226: * @param agencyType The agencyType to set.
227: * @deprecated
228: * @todo Why is this deprecated?
229: */
230: public void setAgencyType(AgencyType agencyType) {
231: this .agencyType = agencyType;
232: }
233:
234: /**
235: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
236: */
237: protected LinkedHashMap toStringMapper() {
238: LinkedHashMap m = new LinkedHashMap();
239:
240: m.put("agencyNumber", getAgencyNumber());
241: return m;
242: }
243:
244: /**
245: * Gets the agencyExtension attribute.
246: *
247: * @return Returns the agencyExtension.
248: */
249: public AgencyExtension getAgencyExtension() {
250: return agencyExtension;
251: }
252:
253: /**
254: * Sets the agencyExtension attribute value.
255: *
256: * @param agencyExtension The agencyExtension to set.
257: */
258: public void setAgencyExtension(AgencyExtension agencyExtension) {
259: this .agencyExtension = agencyExtension;
260: }
261:
262: /**
263: * This method compares the passed in agency object against this agency object to check for equality. Equality is defined by if
264: * the agency passed in has the same agency number as the agency being compared to.
265: *
266: * @param agency The agency object to be compared.
267: * @return True if the agency passed in is determined to be equal, false otherwise.
268: */
269: public boolean equals(Agency agency) {
270: return this.agencyNumber.equals(agency.getAgencyNumber());
271: }
272:
273: }
|