View Javadoc
1   /*
2    * Copyright 2005 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  package org.kuali.ole.coa.businessobject;
17  
18  import java.util.LinkedHashMap;
19  
20  import org.kuali.ole.sys.context.SpringContext;
21  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
22  import org.kuali.rice.kim.api.identity.Person;
23  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
24  
25  /**
26   * Reporting Codes Business Object
27   */
28  public class ReportingCode extends PersistableBusinessObjectBase implements MutableInactivatable {
29  
30      private static final long serialVersionUID = -1585612121519839488L;
31      private String chartOfAccountsCode;
32      private String organizationCode;
33      private String financialReportingCode;
34      private String financialReportingCodeDescription;
35      private String financialReportingCodeMgrId;
36      private String financialReportsToReportingCode;
37      private boolean active;
38  
39      private Chart chart;
40      private Organization org;
41      private Person person;
42      private ReportingCode reportingCodes;
43  
44      /**
45       * @return Returns the chartOfAccountsCode.
46       */
47      public String getChartOfAccountsCode() {
48          return chartOfAccountsCode;
49      }
50  
51      /**
52       * @param chartOfAccountsCode The chartOfAccountsCode to set.
53       */
54      public void setChartOfAccountsCode(String chartOfAccountsCode) {
55          this.chartOfAccountsCode = chartOfAccountsCode;
56      }
57  
58      /**
59       * @return Returns the financialReportingCode.
60       */
61      public String getFinancialReportingCode() {
62          return financialReportingCode;
63      }
64  
65      /**
66       * @param financialReportingCode The financialReportingCode to set.
67       */
68      public void setFinancialReportingCode(String financialReportingCode) {
69          this.financialReportingCode = financialReportingCode;
70      }
71  
72      /**
73       * @return Returns the financialReportingCodeDescription.
74       */
75      public String getFinancialReportingCodeDescription() {
76          return financialReportingCodeDescription;
77      }
78  
79      /**
80       * @param financialReportingCodeDescription The financialReportingCodeDescription to set.
81       */
82      public void setFinancialReportingCodeDescription(String financialReportingCodeDescription) {
83          this.financialReportingCodeDescription = financialReportingCodeDescription;
84      }
85  
86      /**
87       * @return Returns the financialReportingCodeMgrId.
88       */
89      public String getFinancialReportingCodeMgrId() {
90          return financialReportingCodeMgrId;
91      }
92  
93      /**
94       * @param financialReportingCodeMgrId The financialReportingCodeMgrId to set.
95       */
96      public void setFinancialReportingCodeMgrId(String financialReportingCodeMgrId) {
97          this.financialReportingCodeMgrId = financialReportingCodeMgrId;
98      }
99  
100     /**
101      * @return Returns the organizationCode.
102      */
103     public String getOrganizationCode() {
104         return organizationCode;
105     }
106 
107     /**
108      * @param organizationCode The organizationCode to set.
109      */
110     public void setOrganizationCode(String organizationCode) {
111         this.organizationCode = organizationCode;
112     }
113 
114     /**
115      * @return Returns the financialReportsToReportingCode.
116      */
117     public String getFinancialReportsToReportingCode() {
118         return financialReportsToReportingCode;
119     }
120 
121     /**
122      * @param financialReportsToReportingCode The financialReportsToReportingCode to set.
123      */
124     public void setFinancialReportsToReportingCode(String financialReportsToReportingCode) {
125         this.financialReportsToReportingCode = financialReportsToReportingCode;
126     }
127 
128     /**
129      * @return Returns the chart.
130      */
131     public Chart getChart() {
132         return chart;
133     }
134 
135     /**
136      * @param chart The chart to set.
137      * @deprecated
138      */
139     public void setChart(Chart chart) {
140         this.chart = chart;
141     }
142 
143     /**
144      * @return Returns the org.
145      */
146     public Organization getOrg() {
147         return org;
148     }
149 
150     /**
151      * @param org The org to set.
152      * @deprecated
153      */
154     public void setOrg(Organization org) {
155         this.org = org;
156     }
157 
158     public Person getPerson() {
159         person = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(financialReportingCodeMgrId, person);
160         return person;
161     }
162 
163     /**
164      * @param person The person to set.
165      * @deprecated
166      */
167     public void setPerson(Person person) {
168         this.person = person;
169     }
170 
171     /**
172      * @return Returns the reportingCodes.
173      */
174     public ReportingCode getReportingCodes() {
175         return reportingCodes;
176     }
177 
178     /**
179      * @param reportingCodes The reportingCodes to set.
180      * @deprecated
181      */
182     public void setReportingCodes(ReportingCode reportingCodes) {
183         this.reportingCodes = reportingCodes;
184     }
185 
186     /**
187      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
188      */
189     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
190         LinkedHashMap m = new LinkedHashMap();
191         m.put("chartOfAccountsCode", this.chartOfAccountsCode);
192         m.put("organizationCode", this.organizationCode);
193         m.put("financialReportingCode", this.financialReportingCode);
194         m.put("financialReportingCodeDescription", this.financialReportingCodeDescription);
195         m.put("financialReportingCodeMgrId", this.financialReportingCodeMgrId);
196         m.put("financialReportsToReportingCode", this.financialReportsToReportingCode);
197         return m;
198     }
199 
200     /**
201      * Gets the active attribute. 
202      * @return Returns the active.
203      */
204     public boolean isActive() {
205         return active;
206     }
207 
208     /**
209      * Sets the active attribute value.
210      * @param active The active to set.
211      */
212     public void setActive(boolean active) {
213         this.active = active;
214     }
215 
216 }
217