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.fp.businessobject;
018
019 import java.util.LinkedHashMap;
020
021 import org.kuali.kfs.sys.businessobject.SystemOptions;
022 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
023
024 /**
025 * This class is used to represent a fiscal year function control business object.
026 */
027 public class FiscalYearFunctionControl extends PersistableBusinessObjectBase {
028
029 private Integer universityFiscalYear;
030 private String financialSystemFunctionControlCode;
031 private boolean financialSystemFunctionActiveIndicator;
032
033 private FunctionControlCode functionControl;
034 private SystemOptions universityFiscal;
035
036 /**
037 * Default constructor.
038 */
039 public FiscalYearFunctionControl() {
040
041 }
042
043 /**
044 * Gets the universityFiscalYear attribute.
045 *
046 * @return Returns the universityFiscalYear
047 */
048 public Integer getUniversityFiscalYear() {
049 return universityFiscalYear;
050 }
051
052 /**
053 * Sets the universityFiscalYear attribute.
054 *
055 * @param universityFiscalYear The universityFiscalYear to set.
056 */
057 public void setUniversityFiscalYear(Integer universityFiscalYear) {
058 this.universityFiscalYear = universityFiscalYear;
059 }
060
061
062 /**
063 * Gets the financialSystemFunctionControlCode attribute.
064 *
065 * @return Returns the financialSystemFunctionControlCode
066 */
067 public String getFinancialSystemFunctionControlCode() {
068 return financialSystemFunctionControlCode;
069 }
070
071 /**
072 * Sets the financialSystemFunctionControlCode attribute.
073 *
074 * @param financialSystemFunctionControlCode The financialSystemFunctionControlCode to set.
075 */
076 public void setFinancialSystemFunctionControlCode(String financialSystemFunctionControlCode) {
077 this.financialSystemFunctionControlCode = financialSystemFunctionControlCode;
078 }
079
080
081 /**
082 * Gets the financialSystemFunctionActiveIndicator attribute.
083 *
084 * @return Returns the financialSystemFunctionActiveIndicator
085 */
086 public boolean isFinancialSystemFunctionActiveIndicator() {
087 return financialSystemFunctionActiveIndicator;
088 }
089
090
091 /**
092 * Sets the financialSystemFunctionActiveIndicator attribute.
093 *
094 * @param financialSystemFunctionActiveIndicator The financialSystemFunctionActiveIndicator to set.
095 */
096 public void setFinancialSystemFunctionActiveIndicator(boolean financialSystemFunctionActiveIndicator) {
097 this.financialSystemFunctionActiveIndicator = financialSystemFunctionActiveIndicator;
098 }
099
100
101 /**
102 * @return Returns the functionControl.
103 */
104 public FunctionControlCode getFunctionControl() {
105 return functionControl;
106 }
107
108 /**
109 * @param functionControl The functionControl to set.
110 * @deprecated
111 */
112 public void setFunctionControl(FunctionControlCode functionControl) {
113 this.functionControl = functionControl;
114 }
115
116 /**
117 * Implementing equals since I need contains to behave reasonably.
118 *
119 * @see java.lang.Object#equals(java.lang.Object)
120 */
121 public boolean equals(Object obj) {
122 boolean equal = false;
123
124 if (obj != null) {
125 if (this.getClass().equals(obj.getClass())) {
126 FiscalYearFunctionControl fiscalYearFunctionControl = (FiscalYearFunctionControl) obj;
127
128 if (this.getUniversityFiscalYear().equals(fiscalYearFunctionControl.getUniversityFiscalYear())) {
129 equal = true;
130 }
131 }
132 }
133
134 return equal;
135 }
136
137 /**
138 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
139 */
140 protected LinkedHashMap toStringMapper() {
141 LinkedHashMap m = new LinkedHashMap();
142 if (this.universityFiscalYear != null) {
143 m.put("universityFiscalYear", this.universityFiscalYear.toString());
144 }
145 m.put("financialSystemFunctionControlCode", this.financialSystemFunctionControlCode);
146 return m;
147 }
148
149 /**
150 * Gets the universityFiscal attribute.
151 *
152 * @return Returns the universityFiscal.
153 */
154 public SystemOptions getUniversityFiscal() {
155 return universityFiscal;
156 }
157
158 /**
159 * Sets the universityFiscal attribute value.
160 *
161 * @param universityFiscal The universityFiscal to set.
162 */
163 public void setUniversityFiscal(SystemOptions universityFiscal) {
164 this.universityFiscal = universityFiscal;
165 }
166
167 }