001 /*
002 * Copyright 2011 The Kuali Foundation.
003 *
004 * Licensed under the Educational Community License, Version 2.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/ecl2.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.kfs.module.ec.businessobject;
017
018 import java.util.HashMap;
019 import java.util.LinkedHashMap;
020 import java.util.Map;
021
022 import org.kuali.kfs.coa.businessobject.Chart;
023 import org.kuali.kfs.coa.businessobject.Organization;
024 import org.kuali.kfs.module.ec.EffortPropertyConstants;
025 import org.kuali.kfs.sys.KFSPropertyConstants;
026 import org.kuali.kfs.sys.businessobject.SystemOptions;
027 import org.kuali.kfs.sys.context.SpringContext;
028 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
029 import org.kuali.rice.kns.service.BusinessObjectService;
030
031 public class OutstandingCertificationsByReport extends PersistableBusinessObjectBase {
032
033 private Integer universityFiscalYear;
034 private String effortCertificationReportNumber;
035 private String chartOfAccountsCode;
036 private String organizationCode;
037 private Integer outstandingCertificationCount;
038
039 private SystemOptions options;
040 private EffortCertificationReportDefinition effortCertificationReportDefinition;
041 private Chart chart;
042 private Organization organization;
043
044 /**
045 * Return the chartOfAccountsCode
046 *
047 * @return
048 */
049 public String getChartOfAccountsCode() {
050 return chartOfAccountsCode;
051 }
052
053 /**
054 * Sets chartOfAccountsCode
055 *
056 * @param chartOfAccountsCode
057 */
058 public void setChartOfAccountsCode(String chartOfAccountsCode) {
059 this.chartOfAccountsCode = chartOfAccountsCode;
060 }
061
062 /**
063 * Gets effortCertificationReportNumber
064 *
065 * @return
066 */
067 public String getEffortCertificationReportNumber() {
068 return effortCertificationReportNumber;
069 }
070
071 /**
072 * Sets effortCertificationReportNumber
073 *
074 * @param effortCertificationReportNumber
075 */
076 public void setEffortCertificationReportNumber(String effortCertificationReportNumber) {
077 this.effortCertificationReportNumber = effortCertificationReportNumber;
078 }
079
080 /**
081 * Gets organizationCode
082 *
083 * @return
084 */
085 public String getOrganizationCode() {
086 return organizationCode;
087 }
088
089 /**
090 * Sets organizationCode
091 *
092 * @param organizationCode
093 */
094 public void setOrganizationCode(String organizationCode) {
095 this.organizationCode = organizationCode;
096 }
097
098 /**
099 * Gets outstandingCertificationCount
100 *
101 * @return
102 */
103 public Integer getOutstandingCertificationCount() {
104 return outstandingCertificationCount;
105 }
106
107 /**
108 * Sets outstandingCertificationCount
109 *
110 * @param outstandingCertificationCount
111 */
112 public void setOutstandingCertificationCount(Integer outstandingCertificationCount) {
113 this.outstandingCertificationCount = outstandingCertificationCount;
114 }
115
116 /**
117 * Gets universityFiscalYear
118 *
119 * @return
120 */
121 public Integer getUniversityFiscalYear() {
122 return universityFiscalYear;
123 }
124
125 /**
126 * Sets universityFiscalYear
127 *
128 * @param universityFiscalYear
129 */
130 public void setUniversityFiscalYear(Integer universityFiscalYear) {
131 this.universityFiscalYear = universityFiscalYear;
132 }
133
134 /**
135 * Gets the options attribute.
136 *
137 * @return Returns the options.
138 */
139 public SystemOptions getOptions() {
140 return options;
141 }
142
143 /**
144 * Sets the options attribute value.
145 *
146 * @param options The options to set.
147 */
148 public void setOptions(SystemOptions options) {
149 this.options = options;
150 }
151
152 @Override
153 protected LinkedHashMap toStringMapper() {
154 LinkedHashMap m = new LinkedHashMap();
155 m.put(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR, this.universityFiscalYear);
156 m.put(EffortPropertyConstants.EFFORT_CERTIFICATION_REPORT_NUMBER, this.effortCertificationReportNumber);
157 m.put(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE, this.chartOfAccountsCode);
158 m.put(KFSPropertyConstants.ORGANIZATION_CODE, this.organizationCode);
159
160 return m;
161 }
162
163 /**
164 * Gets the effort certification report definition
165 *
166 * @return
167 */
168 public EffortCertificationReportDefinition getEffortCertificationReportDefinition() {
169 return effortCertificationReportDefinition;
170 }
171
172 /**
173 * Sets effort certification report definition
174 *
175 * @param effortCertificationReportDefinition
176 */
177 public void setEffortCertificationReportDefinition(EffortCertificationReportDefinition effortCertificationReportDefinition) {
178 this.effortCertificationReportDefinition = effortCertificationReportDefinition;
179 }
180
181 /**
182 * Gets the organization
183 *
184 * @return
185 */
186 public Organization getOrganization() {
187 return organization;
188 }
189
190 /**
191 * Sets organization
192 *
193 * @param organization
194 */
195 public void setOrganization(Organization organization) {
196 this.organization = organization;
197 }
198
199 /**
200 * Gets the chart
201 *
202 * @return
203 */
204 public Chart getChart() {
205 Map objectKeys = new HashMap();
206 objectKeys.put(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE, this.getChartOfAccountsCode());
207
208 return (Chart) SpringContext.getBean(BusinessObjectService.class).findByPrimaryKey(Chart.class, objectKeys);
209 }
210
211 /**
212 * Sets the chart
213 *
214 * @param chart
215 */
216 public void setChart(Chart chart) {
217 this.chart = chart;
218 }
219
220 }