View Javadoc
1   /*
2    * Copyright 2005-2009 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.kuali.ole.integration.cg.businessobject;
18  
19  import org.kuali.ole.integration.cg.ContractsAndGrantsAgency;
20  import org.kuali.rice.core.api.util.type.KualiDecimal;
21  
22  /**
23   * This class defines an agency as it is used and referenced within the Contracts and Grants portion of a college or university
24   * financial system.
25   */
26  public class Agency implements ContractsAndGrantsAgency {
27  
28      private String agencyNumber;
29      private String reportingName;
30      private String fullName;
31      private String agencyTypeCode;
32      private String reportsToAgencyNumber;
33      private KualiDecimal indirectAmount;
34      private boolean inStateIndicator;
35      private Agency reportsToAgency;
36      private boolean active;
37  
38      /**
39       * Gets the agencyTypeCode attribute.
40       * 
41       * @return Returns the agencyTypeCode.
42       */
43      public String getAgencyTypeCode() {
44          return agencyTypeCode;
45      }
46  
47      /**
48       * Sets the agencyTypeCode attribute value.
49       * 
50       * @param agencyTypeCode The agencyTypeCode to set.
51       */
52      public void setAgencyTypeCode(String agencyTypeCode) {
53          this.agencyTypeCode = agencyTypeCode;
54      }
55  
56      /**
57       * Gets the reportsToAgencyNumber attribute.
58       * 
59       * @return Returns the reportsToAgencyNumber.
60       */
61      public String getReportsToAgencyNumber() {
62          return reportsToAgencyNumber;
63      }
64  
65      /**
66       * Sets the reportsToAgencyNumber attribute value.
67       * 
68       * @param reportsToAgencyNumber The reportsToAgencyNumber to set.
69       */
70      public void setReportsToAgencyNumber(String reportsToAgencyNumber) {
71          this.reportsToAgencyNumber = reportsToAgencyNumber;
72      }
73  
74      /**
75       * Default no-arg constructor.
76       */
77      public Agency() {
78  
79      }
80  
81      /**
82       * Gets the agencyNumber attribute.
83       * 
84       * @return Returns the agencyNumber
85       */
86      public String getAgencyNumber() {
87          return agencyNumber;
88      }
89  
90      /**
91       * Sets the agencyNumber attribute.
92       * 
93       * @param agencyNumber The agencyNumber to set.
94       */
95      public void setAgencyNumber(String agencyNumber) {
96          this.agencyNumber = agencyNumber;
97      }
98  
99      /**
100      * Gets the reportingName attribute.
101      * 
102      * @return Returns the reportingName
103      */
104     public String getReportingName() {
105         return reportingName;
106     }
107 
108     /**
109      * Sets the reportingName attribute.
110      * 
111      * @param reportingName The reportingName to set.
112      */
113     public void setReportingName(String reportingName) {
114         this.reportingName = reportingName;
115     }
116 
117     /**
118      * Gets the fullName attribute.
119      * 
120      * @return Returns the fullName
121      */
122     public String getFullName() {
123         return fullName;
124     }
125 
126     /**
127      * Sets the fullName attribute.
128      * 
129      * @param fullName The fullName to set.
130      */
131     public void setFullName(String fullName) {
132         this.fullName = fullName;
133     }
134 
135     /**
136      * Gets the indirectAmount attribute.
137      * 
138      * @return Returns the indirectAmount
139      */
140     public KualiDecimal getIndirectAmount() {
141         return indirectAmount;
142     }
143 
144     /**
145      * Sets the indirectAmount attribute.
146      * 
147      * @param indirectAmount The indirectAmount to set.
148      */
149     public void setIndirectAmount(KualiDecimal indirectAmount) {
150         this.indirectAmount = indirectAmount;
151     }
152 
153     /**
154      * Gets the inStateIndicator attribute.
155      * 
156      * @return Returns the inStateIndicator
157      */
158     public boolean isInStateIndicator() {
159         return inStateIndicator;
160     }
161 
162     /**
163      * Sets the inStateIndicator attribute.
164      * 
165      * @param inStateIndicator The inStateIndicator to set.
166      */
167     public void setInStateIndicator(boolean inStateIndicator) {
168         this.inStateIndicator = inStateIndicator;
169     }
170 
171     /**
172      * Gets the reportsToAgency attribute.
173      * 
174      * @return Returns the reportsToAgency
175      */
176     public Agency getReportsToAgency() {
177         return reportsToAgency;
178     }
179 
180     /**
181      * Sets the reportsToAgency attribute.
182      * 
183      * @param reportsToAgencyNumber The reportsToAgency to set.
184      * @deprecated
185      * @todo Why is this deprecated?
186      */
187     public void setReportsToAgency(Agency reportsToAgencyNumber) {
188         this.reportsToAgency = reportsToAgencyNumber;
189     }
190 
191     /**
192      * This method compares the passed in agency object against this agency object to check for equality. Equality is defined by if
193      * the agency passed in has the same agency number as the agency being compared to.
194      * 
195      * @param agency The agency object to be compared.
196      * @return True if the agency passed in is determined to be equal, false otherwise.
197      */
198     public boolean equals(Agency agency) {
199         return this.agencyNumber.equals(agency.getAgencyNumber());
200     }
201 
202     /**
203      * Gets the active attribute. 
204      * @return Returns the active.
205      */
206     public boolean isActive() {
207         return active;
208     }
209 
210     /**
211      * Sets the active attribute value.
212      * @param active The active to set.
213      */
214     public void setActive(boolean active) {
215         this.active = active;
216     }
217 
218     public void prepareForWorkflow() {}
219 
220     public void refresh() {}
221 
222 }