001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.module.chart.bo;
017:
018: import java.util.LinkedHashMap;
019:
020: import org.kuali.core.bo.PersistableBusinessObjectBase;
021:
022: public class BasicAccountingCategory extends
023: PersistableBusinessObjectBase {
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: * Gets the description attribute.
058: *
059: * @return Returns the description
060: */
061: public String getDescription() {
062: return description;
063: }
064:
065: /**
066: * Sets the description attribute.
067: *
068: * @param description The description to set.
069: */
070: public void setDescription(String accountCategoryDescription) {
071: this .description = accountCategoryDescription;
072: }
073:
074: /**
075: * Gets the accountCategoryShortName attribute.
076: *
077: * @return Returns the accountCategoryShortName
078: */
079: public String getShortName() {
080: return shortName;
081: }
082:
083: /**
084: * Sets the accountCategoryShortName attribute.
085: *
086: * @param accountCategoryShortName The accountCategoryShortName to set.
087: */
088: public void setShortName(String basicAccountingCategoryShortName) {
089: this .shortName = basicAccountingCategoryShortName;
090: }
091:
092: /**
093: * Gets the sortCode attribute.
094: *
095: * @return Returns the sortCode
096: */
097: public String getSortCode() {
098: return sortCode;
099: }
100:
101: /**
102: * Sets the sortCode attribute.
103: *
104: * @param sortCode The sortCode to set.
105: */
106: public void setSortCode(String financialReportingSortCode) {
107: this .sortCode = financialReportingSortCode;
108: }
109:
110: /**
111: * Gets the active attribute.
112: *
113: * @return Returns the active.
114: */
115: public boolean isActive() {
116: return active;
117: }
118:
119: /**
120: * Sets the active attribute.
121: *
122: * @param active The active to set.
123: */
124: public void setActive(boolean active) {
125: this .active = active;
126: }
127:
128: /**
129: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
130: */
131: protected LinkedHashMap toStringMapper() {
132: LinkedHashMap m = new LinkedHashMap();
133: m.put("accountCategoryCode", this .code);
134: return m;
135: }
136:
137: /**
138: * This method generates a standard String of the code and description together
139: *
140: * @return string representation of the code and description for this Account Category.
141: */
142: public String getCodeAndDescription() {
143: StringBuilder codeAndDescription = new StringBuilder();
144: codeAndDescription.append(this .getCode());
145: codeAndDescription.append(" - ");
146: codeAndDescription.append(this.getDescription());
147: return codeAndDescription.toString();
148: }
149: }
|