View Javadoc

1   /*
2    * Copyright 2007 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.rice.core.api.mo.common.active.MutableInactivatable;
21  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
22  
23  public class BasicAccountingCategory extends PersistableBusinessObjectBase implements MutableInactivatable {
24  
25      private String code;
26      private String description;
27      private String shortName;
28      private String sortCode;
29      private boolean active;
30  
31      /**
32       * Default constructor.
33       */
34      public BasicAccountingCategory() {
35  
36      }
37  
38      /**
39       * Gets the accountCategoryCode attribute.
40       * 
41       * @return Returns the accountCategoryCode
42       */
43      public String getCode() {
44          return code;
45      }
46  
47      /**
48       * Sets the accountCategoryCode attribute.
49       * 
50       * @param accountCategoryCode The accountCategoryCode to set.
51       */
52      public void setCode(String basicAccountingCategoryCode) {
53          this.code = basicAccountingCategoryCode;
54      }
55  
56  
57      /**
58       * Gets the description attribute.
59       * 
60       * @return Returns the description
61       */
62      public String getDescription() {
63          return description;
64      }
65  
66      /**
67       * Sets the description attribute.
68       * 
69       * @param description The description to set.
70       */
71      public void setDescription(String accountCategoryDescription) {
72          this.description = accountCategoryDescription;
73      }
74  
75  
76      /**
77       * Gets the accountCategoryShortName attribute.
78       * 
79       * @return Returns the accountCategoryShortName
80       */
81      public String getShortName() {
82          return shortName;
83      }
84  
85      /**
86       * Sets the accountCategoryShortName attribute.
87       * 
88       * @param accountCategoryShortName The accountCategoryShortName to set.
89       */
90      public void setShortName(String basicAccountingCategoryShortName) {
91          this.shortName = basicAccountingCategoryShortName;
92      }
93  
94  
95      /**
96       * Gets the sortCode attribute.
97       * 
98       * @return Returns the sortCode
99       */
100     public String getSortCode() {
101         return sortCode;
102     }
103 
104     /**
105      * Sets the sortCode attribute.
106      * 
107      * @param sortCode The sortCode to set.
108      */
109     public void setSortCode(String financialReportingSortCode) {
110         this.sortCode = financialReportingSortCode;
111     }
112 
113     /**
114      * Gets the active attribute.
115      * 
116      * @return Returns the active.
117      */
118     public boolean isActive() {
119         return active;
120     }
121 
122     /**
123      * Sets the active attribute.
124      * 
125      * @param active The active to set.
126      */
127     public void setActive(boolean active) {
128         this.active = active;
129     }
130 
131     /**
132      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
133      */
134     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
135         LinkedHashMap m = new LinkedHashMap();
136         m.put("accountCategoryCode", this.code);
137         return m;
138     }
139 
140     /**
141      * This method generates a standard String of the code and description together
142      * 
143      * @return string representation of the code and description for this Account Category.
144      */
145     public String getCodeAndDescription() {
146         StringBuilder codeAndDescription = new StringBuilder();
147         codeAndDescription.append(this.getCode());
148         codeAndDescription.append(" - ");
149         codeAndDescription.append(this.getDescription());
150         return codeAndDescription.toString();
151     }
152 }