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 017 package org.kuali.kfs.module.ld.businessobject; 018 019 import java.util.LinkedHashMap; 020 021 import org.kuali.kfs.coa.businessobject.Chart; 022 import org.kuali.kfs.coa.businessobject.ObjectCode; 023 import org.kuali.kfs.integration.ld.LaborLedgerObject; 024 import org.kuali.kfs.integration.ld.LaborLedgerPositionObjectGroup; 025 import org.kuali.kfs.sys.businessobject.SystemOptions; 026 import org.kuali.rice.kns.bo.Inactivateable; 027 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; 028 029 /** 030 * Labor business object for LaborObject. 031 */ 032 public class LaborObject extends PersistableBusinessObjectBase implements LaborLedgerObject, Inactivateable { 033 private Integer universityFiscalYear; 034 private String chartOfAccountsCode; 035 private String financialObjectCode; 036 private boolean detailPositionRequiredIndicator; 037 private boolean financialObjectHoursRequiredIndicator; 038 private String financialObjectPayTypeCode; 039 private String financialObjectFringeOrSalaryCode; 040 private String positionObjectGroupCode; 041 private boolean active; 042 043 private ObjectCode financialObject; 044 private Chart chartOfAccounts; 045 private PositionObjectGroup positionObjectGroup; 046 private SystemOptions option; 047 048 /** 049 * Default constructor. 050 */ 051 public LaborObject() { 052 053 } 054 055 /** 056 * Gets the universityFiscalYear 057 * 058 * @return Returns the universityFiscalYear 059 */ 060 public Integer getUniversityFiscalYear() { 061 return universityFiscalYear; 062 } 063 064 /** 065 * Sets the universityFiscalYear 066 * 067 * @param universityFiscalYear The universityFiscalYear to set. 068 */ 069 public void setUniversityFiscalYear(Integer universityFiscalYear) { 070 this.universityFiscalYear = universityFiscalYear; 071 } 072 073 /** 074 * Gets the chartOfAccountsCode 075 * 076 * @return Returns the chartOfAccountsCode 077 */ 078 public String getChartOfAccountsCode() { 079 return chartOfAccountsCode; 080 } 081 082 /** 083 * Sets the chartOfAccountsCode 084 * 085 * @param chartOfAccountsCode The chartOfAccountsCode to set. 086 */ 087 public void setChartOfAccountsCode(String chartOfAccountsCode) { 088 this.chartOfAccountsCode = chartOfAccountsCode; 089 } 090 091 /** 092 * Gets the financialObjectCode 093 * 094 * @return Returns the financialObjectCode 095 */ 096 public String getFinancialObjectCode() { 097 return financialObjectCode; 098 } 099 100 /** 101 * Sets the financialObjectCode 102 * 103 * @param financialObjectCode The financialObjectCode to set. 104 */ 105 public void setFinancialObjectCode(String financialObjectCode) { 106 this.financialObjectCode = financialObjectCode; 107 } 108 109 /** 110 * Gets the detailPositionRequiredIndicator 111 * 112 * @return Returns the detailPositionRequiredIndicator 113 */ 114 public boolean isDetailPositionRequiredIndicator() { 115 return detailPositionRequiredIndicator; 116 } 117 118 /** 119 * Sets the detailPositionRequiredIndicator 120 * 121 * @param detailPositionRequiredIndicator The detailPositionRequiredIndicator to set. 122 */ 123 public void setDetailPositionRequiredIndicator(boolean detailPositionRequiredIndicator) { 124 this.detailPositionRequiredIndicator = detailPositionRequiredIndicator; 125 } 126 127 /** 128 * Gets the financialObjectHoursRequiredIndicator 129 * 130 * @return Returns the financialObjectHoursRequiredIndicator 131 */ 132 public boolean isFinancialObjectHoursRequiredIndicator() { 133 return financialObjectHoursRequiredIndicator; 134 } 135 136 /** 137 * Sets the financialObjectHoursRequiredIndicator 138 * 139 * @param financialObjectHoursRequiredIndicator The financialObjectHoursRequiredIndicator to set. 140 */ 141 public void setFinancialObjectHoursRequiredIndicator(boolean financialObjectHoursRequiredIndicator) { 142 this.financialObjectHoursRequiredIndicator = financialObjectHoursRequiredIndicator; 143 } 144 145 /** 146 * Gets the financialObjectPayTypeCode 147 * 148 * @return Returns the financialObjectPayTypeCode 149 */ 150 public String getFinancialObjectPayTypeCode() { 151 return financialObjectPayTypeCode; 152 } 153 154 /** 155 * Sets the financialObjectPayTypeCode 156 * 157 * @param financialObjectPayTypeCode The financialObjectPayTypeCode to set. 158 */ 159 public void setFinancialObjectPayTypeCode(String financialObjectPayTypeCode) { 160 this.financialObjectPayTypeCode = financialObjectPayTypeCode; 161 } 162 163 /** 164 * Gets the financialObjectFringeOrSalaryCode 165 * 166 * @return Returns the financialObjectFringeOrSalaryCode 167 */ 168 public String getFinancialObjectFringeOrSalaryCode() { 169 return financialObjectFringeOrSalaryCode; 170 } 171 172 /** 173 * Sets the financialObjectFringeOrSalaryCode 174 * 175 * @param financialObjectFringeOrSalaryCode The financialObjectFringeOrSalaryCode to set. 176 */ 177 public void setFinancialObjectFringeOrSalaryCode(String financialObjectFringeOrSalaryCode) { 178 this.financialObjectFringeOrSalaryCode = financialObjectFringeOrSalaryCode; 179 } 180 181 /** 182 * Gets the positionObjectGroupCode 183 * 184 * @return Returns the positionObjectGroupCode 185 */ 186 public String getPositionObjectGroupCode() { 187 return positionObjectGroupCode; 188 } 189 190 /** 191 * Sets the positionObjectGroupCode 192 * 193 * @param positionObjectGroupCode The positionObjectGroupCode to set. 194 */ 195 public void setPositionObjectGroupCode(String positionObjectGroupCode) { 196 this.positionObjectGroupCode = positionObjectGroupCode; 197 } 198 199 /** 200 * Gets the financialObject 201 * 202 * @return Returns the financialObject 203 */ 204 public ObjectCode getFinancialObject() { 205 return financialObject; 206 } 207 208 /** 209 * Sets the financialObject 210 * 211 * @param financialObject The financialObject to set. 212 */ 213 @Deprecated 214 public void setFinancialObject(ObjectCode financialObject) { 215 this.financialObject = financialObject; 216 } 217 218 /** 219 * Gets the chartOfAccounts 220 * 221 * @return Returns the chartOfAccounts 222 */ 223 public Chart getChartOfAccounts() { 224 return chartOfAccounts; 225 } 226 227 /** 228 * Sets the chartOfAccounts 229 * 230 * @param chartOfAccounts The chartOfAccounts to set. 231 */ 232 @Deprecated 233 public void setChartOfAccounts(Chart chartOfAccounts) { 234 this.chartOfAccounts = chartOfAccounts; 235 } 236 237 /** 238 * Gets the positionObjectGroup attribute. 239 * 240 * @return Returns the positionObjectGroup. 241 */ 242 public PositionObjectGroup getPositionObjectGroup() { 243 return positionObjectGroup; 244 } 245 246 /** 247 * Sets the positionObjectGroup attribute value. 248 * 249 * @param positionObjectGroup The positionObjectGroup to set. 250 */ 251 @Deprecated 252 public void setPositionObjectGroup(PositionObjectGroup positionObjectGroup) { 253 this.positionObjectGroup = positionObjectGroup; 254 } 255 256 /** 257 * @see org.kuali.kfs.bo.LaborLedgerObject#getLaborLedgerPositionObjectGroup() 258 */ 259 public LaborLedgerPositionObjectGroup getLaborLedgerPositionObjectGroup() { 260 return this.positionObjectGroup; 261 } 262 263 /** 264 * @see org.kuali.kfs.bo.LaborLedgerObject#setLaborLedgerPositionObjectGroup(org.kuali.kfs.bo.LaborLedgerPositionObjectGroup) 265 */ 266 @Deprecated 267 public void setLaborLedgerPositionObjectGroup(LaborLedgerPositionObjectGroup laborLedgerPositionObjectGroup) { 268 this.positionObjectGroup = (PositionObjectGroup) laborLedgerPositionObjectGroup; 269 } 270 271 /** 272 * Gets the option 273 * 274 * @return Returns the option. 275 */ 276 public SystemOptions getOption() { 277 return option; 278 } 279 280 /** 281 * Sets the option 282 * 283 * @param option The option to set. 284 */ 285 public void setOption(SystemOptions option) { 286 this.option = option; 287 } 288 289 /** 290 * Gets the active attribute. 291 * 292 * @return Returns the active. 293 */ 294 public boolean isActive() { 295 return active; 296 } 297 298 /** 299 * Sets the active attribute value. 300 * 301 * @param active The active to set. 302 */ 303 public void setActive(boolean active) { 304 this.active = active; 305 } 306 307 /** 308 * This method (a hack by any other name...) returns a string so that an Labor Object Code can have a link to view its own 309 * inquiry page after a look up 310 * 311 * @return the String "View Labor Object Code" 312 */ 313 public String getLaborObjectCodeViewer() { 314 return "View Labor Object Code"; 315 } 316 317 /** 318 * construct the key list of the business object. 319 * 320 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() 321 */ 322 protected LinkedHashMap toStringMapper() { 323 LinkedHashMap m = new LinkedHashMap(); 324 if (this.universityFiscalYear != null) { 325 m.put("universityFiscalYear", this.universityFiscalYear.toString()); 326 } 327 m.put("chartOfAccountsCode", this.chartOfAccountsCode); 328 m.put("financialObjectCode", this.financialObjectCode); 329 330 return m; 331 } 332 }