View Javadoc
1   /*
2    * Copyright 2006 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.fp.businessobject;
18  
19  import java.util.LinkedHashMap;
20  
21  import org.kuali.ole.sys.businessobject.FiscalYearBasedBusinessObject;
22  import org.kuali.ole.sys.businessobject.SystemOptions;
23  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
24  
25  /**
26   * This class is used to represent a fiscal year function control business object.
27   */
28  public class FiscalYearFunctionControl extends PersistableBusinessObjectBase implements FiscalYearBasedBusinessObject {
29  
30      private Integer universityFiscalYear;
31      private String financialSystemFunctionControlCode;
32      private boolean financialSystemFunctionActiveIndicator;
33  
34      private FunctionControlCode functionControl;
35      private SystemOptions universityFiscal;
36  
37      /**
38       * Default constructor.
39       */
40      public FiscalYearFunctionControl() {
41  
42      }
43  
44      /**
45       * Gets the universityFiscalYear attribute.
46       * 
47       * @return Returns the universityFiscalYear
48       */
49      public Integer getUniversityFiscalYear() {
50          return universityFiscalYear;
51      }
52  
53      /**
54       * Sets the universityFiscalYear attribute.
55       * 
56       * @param universityFiscalYear The universityFiscalYear to set.
57       */
58      public void setUniversityFiscalYear(Integer universityFiscalYear) {
59          this.universityFiscalYear = universityFiscalYear;
60      }
61  
62  
63      /**
64       * Gets the financialSystemFunctionControlCode attribute.
65       * 
66       * @return Returns the financialSystemFunctionControlCode
67       */
68      public String getFinancialSystemFunctionControlCode() {
69          return financialSystemFunctionControlCode;
70      }
71  
72      /**
73       * Sets the financialSystemFunctionControlCode attribute.
74       * 
75       * @param financialSystemFunctionControlCode The financialSystemFunctionControlCode to set.
76       */
77      public void setFinancialSystemFunctionControlCode(String financialSystemFunctionControlCode) {
78          this.financialSystemFunctionControlCode = financialSystemFunctionControlCode;
79      }
80  
81  
82      /**
83       * Gets the financialSystemFunctionActiveIndicator attribute.
84       * 
85       * @return Returns the financialSystemFunctionActiveIndicator
86       */
87      public boolean isFinancialSystemFunctionActiveIndicator() {
88          return financialSystemFunctionActiveIndicator;
89      }
90  
91  
92      /**
93       * Sets the financialSystemFunctionActiveIndicator attribute.
94       * 
95       * @param financialSystemFunctionActiveIndicator The financialSystemFunctionActiveIndicator to set.
96       */
97      public void setFinancialSystemFunctionActiveIndicator(boolean financialSystemFunctionActiveIndicator) {
98          this.financialSystemFunctionActiveIndicator = financialSystemFunctionActiveIndicator;
99      }
100 
101 
102     /**
103      * @return Returns the functionControl.
104      */
105     public FunctionControlCode getFunctionControl() {
106         return functionControl;
107     }
108 
109     /**
110      * @param functionControl The functionControl to set.
111      * @deprecated
112      */
113     public void setFunctionControl(FunctionControlCode functionControl) {
114         this.functionControl = functionControl;
115     }
116 
117     /**
118      * Implementing equals since I need contains to behave reasonably.
119      * 
120      * @see java.lang.Object#equals(java.lang.Object)
121      */
122     public boolean equals(Object obj) {
123         boolean equal = false;
124 
125         if (obj != null) {
126             if (this.getClass().equals(obj.getClass())) {
127                 FiscalYearFunctionControl fiscalYearFunctionControl = (FiscalYearFunctionControl) obj;
128 
129                 if (this.getUniversityFiscalYear().equals(fiscalYearFunctionControl.getUniversityFiscalYear())) {
130                     equal = true;
131                 }
132             }
133         }
134 
135         return equal;
136     }
137 
138     /**
139      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
140      */
141     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
142         LinkedHashMap m = new LinkedHashMap();
143         if (this.universityFiscalYear != null) {
144             m.put("universityFiscalYear", this.universityFiscalYear.toString());
145         }
146         m.put("financialSystemFunctionControlCode", this.financialSystemFunctionControlCode);
147         return m;
148     }
149 
150     /**
151      * Gets the universityFiscal attribute.
152      * 
153      * @return Returns the universityFiscal.
154      */
155     public SystemOptions getUniversityFiscal() {
156         return universityFiscal;
157     }
158 
159     /**
160      * Sets the universityFiscal attribute value.
161      * 
162      * @param universityFiscal The universityFiscal to set.
163      */
164     public void setUniversityFiscal(SystemOptions universityFiscal) {
165         this.universityFiscal = universityFiscal;
166     }
167 
168 }