001: /*
002: * Copyright 2006-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.kra.budget.bo;
017:
018: import java.util.LinkedHashMap;
019:
020: import org.kuali.core.bo.PersistableBusinessObjectBase;
021:
022: /**
023: *
024: */
025:
026: public class NonpersonnelObjectCode extends
027: PersistableBusinessObjectBase implements Comparable {
028: private static final long serialVersionUID = -5150973847161350622L;
029:
030: /**
031: * Default no-arg constructor.
032: */
033: public NonpersonnelObjectCode() {
034: super ();
035: }
036:
037: public NonpersonnelObjectCode(String nonpersonnelCategoryCode,
038: String nonpersonnelSubCategoryCode) {
039: super ();
040: this .budgetNonpersonnelCategoryCode = nonpersonnelCategoryCode;
041: this .budgetNonpersonnelSubCategoryCode = nonpersonnelSubCategoryCode;
042: this .refresh();
043: }
044:
045: private String budgetNonpersonnelCategoryCode;
046: private String budgetNonpersonnelSubCategoryCode;
047: private boolean active;
048: private String budgetNonpersonnelObjectCode;
049: private NonpersonnelCategory nonpersonnelCategory;
050: private NonpersonnelSubCategory nonpersonnelSubCategory;
051:
052: /**
053: * @param o
054: */
055: public void setBudgetNonpersonnelCategoryCode(String o) {
056: budgetNonpersonnelCategoryCode = o;
057: }
058:
059: /**
060: * @return budgetNonpersonnelCategoryCode
061: */
062: public String getBudgetNonpersonnelCategoryCode() {
063: return budgetNonpersonnelCategoryCode;
064: }
065:
066: /**
067: * @param o
068: */
069: public void setBudgetNonpersonnelSubCategoryCode(String o) {
070: budgetNonpersonnelSubCategoryCode = o;
071: }
072:
073: /**
074: * @return budgetNonpersonnelSubCategoryCode
075: */
076: public String getBudgetNonpersonnelSubCategoryCode() {
077: return budgetNonpersonnelSubCategoryCode;
078: }
079:
080: /**
081: * @param o
082: */
083: public void setActive(boolean o) {
084: active = o;
085: }
086:
087: /**
088: * @return active
089: */
090: public boolean getActive() {
091: return active;
092: }
093:
094: /**
095: * @param o
096: */
097: public void setBudgetNonpersonnelObjectCode(String o) {
098: budgetNonpersonnelObjectCode = o;
099: }
100:
101: /**
102: * @return budgetNonpersonnelObjectCode
103: */
104: public String getBudgetNonpersonnelObjectCode() {
105: return budgetNonpersonnelObjectCode;
106: }
107:
108: /**
109: * @return Returns the nonpersonelCategory.
110: */
111: public NonpersonnelCategory getNonpersonnelCategory() {
112: return nonpersonnelCategory;
113: }
114:
115: /**
116: * @param nonpersonelCategory The nonpersonelCategory to set.
117: */
118: public void setNonpersonnelCategory(
119: NonpersonnelCategory nonpersonnelCategory) {
120: this .nonpersonnelCategory = nonpersonnelCategory;
121: }
122:
123: /**
124: * @return Returns the nonpersonnelSubCategory.
125: */
126: public NonpersonnelSubCategory getNonpersonnelSubCategory() {
127: return nonpersonnelSubCategory;
128: }
129:
130: /**
131: * @param nonpersonnelSubCategory The nonpersonnelSubCategory to set.
132: */
133: public void setNonpersonnelSubCategory(
134: NonpersonnelSubCategory nonpersonnelSubCategory) {
135: this .nonpersonnelSubCategory = nonpersonnelSubCategory;
136: }
137:
138: public int compareTo(Object o) {
139: return this .getNonpersonnelSubCategory().compareTo(
140: ((NonpersonnelObjectCode) o)
141: .getNonpersonnelSubCategory());
142: }
143:
144: /**
145: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
146: */
147: protected LinkedHashMap toStringMapper() {
148: LinkedHashMap m = new LinkedHashMap();
149: m.put("budgetNonpersonnelCategoryCode",
150: this .budgetNonpersonnelCategoryCode);
151: m.put("budgetNonpersonnelSubCategoryCode",
152: this.budgetNonpersonnelSubCategoryCode);
153: return m;
154: }
155: }
|