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.coa.businessobject;
017
018 import java.util.LinkedHashMap;
019
020 import org.kuali.rice.kns.bo.Inactivateable;
021 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
022
023 public class BasicAccountingCategory extends PersistableBusinessObjectBase implements Inactivateable {
024
025 private String code;
026 private String description;
027 private String shortName;
028 private String sortCode;
029 private boolean active;
030
031 /**
032 * Default constructor.
033 */
034 public BasicAccountingCategory() {
035
036 }
037
038 /**
039 * Gets the accountCategoryCode attribute.
040 *
041 * @return Returns the accountCategoryCode
042 */
043 public String getCode() {
044 return code;
045 }
046
047 /**
048 * Sets the accountCategoryCode attribute.
049 *
050 * @param accountCategoryCode The accountCategoryCode to set.
051 */
052 public void setCode(String basicAccountingCategoryCode) {
053 this.code = basicAccountingCategoryCode;
054 }
055
056
057 /**
058 * Gets the description attribute.
059 *
060 * @return Returns the description
061 */
062 public String getDescription() {
063 return description;
064 }
065
066 /**
067 * Sets the description attribute.
068 *
069 * @param description The description to set.
070 */
071 public void setDescription(String accountCategoryDescription) {
072 this.description = accountCategoryDescription;
073 }
074
075
076 /**
077 * Gets the accountCategoryShortName attribute.
078 *
079 * @return Returns the accountCategoryShortName
080 */
081 public String getShortName() {
082 return shortName;
083 }
084
085 /**
086 * Sets the accountCategoryShortName attribute.
087 *
088 * @param accountCategoryShortName The accountCategoryShortName to set.
089 */
090 public void setShortName(String basicAccountingCategoryShortName) {
091 this.shortName = basicAccountingCategoryShortName;
092 }
093
094
095 /**
096 * Gets the sortCode attribute.
097 *
098 * @return Returns the sortCode
099 */
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.kns.bo.BusinessObjectBase#toStringMapper()
133 */
134 protected LinkedHashMap toStringMapper() {
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 }