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.module.endow.businessobject;
017
018 import java.util.LinkedHashMap;
019 import java.util.List;
020
021 import org.apache.commons.lang.StringUtils;
022 import org.kuali.kfs.sys.KFSConstants;
023 import org.kuali.rice.kns.bo.KualiCodeBase;
024 import org.kuali.rice.kns.util.TypedArrayList;
025
026 /**
027 * Business Object for Endowment Transaction table.
028 */
029 public class EndowmentTransactionCode extends KualiCodeBase {
030
031 private String endowmentTransactionTypeCode;
032 private EndowmentTransactionType endowmentTransactionType;
033 private boolean corpusIndicator;
034
035 private List<GLLink> glLinks;
036
037 /**
038 * Constructs a EndowmentTransactionCode.
039 */
040 public EndowmentTransactionCode() {
041 glLinks = new TypedArrayList(GLLink.class);
042 }
043
044 /**
045 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
046 */
047 @Override
048 protected LinkedHashMap toStringMapper() {
049 LinkedHashMap m = new LinkedHashMap();
050 m.put("code", this.code);
051 return m;
052 }
053
054
055 /**
056 * This method gets the endowmentTransactionType
057 *
058 * @return endowmentTransactionType
059 */
060 public EndowmentTransactionType getEndowmentTransactionType() {
061 return endowmentTransactionType;
062 }
063
064 /**
065 * This method sets the endowmentTransactionType
066 *
067 * @param endowmentTransactionType
068 */
069 public void setEndowmentTransactionType(EndowmentTransactionType endowmentTransactionType) {
070 this.endowmentTransactionType = endowmentTransactionType;
071 }
072
073 /**
074 * This method gets the endowmentTransactionTypeCode
075 *
076 * @return endowmentTransactionTypeCode
077 */
078 public String getEndowmentTransactionTypeCode() {
079 return endowmentTransactionTypeCode;
080 }
081
082 /**
083 * This method sets the endowmentTransactionTypeCode
084 *
085 * @param endowmentTransactionTypeCode
086 */
087 public void setEndowmentTransactionTypeCode(String endowmentTransactionTypeCode) {
088 this.endowmentTransactionTypeCode = endowmentTransactionTypeCode;
089 }
090
091 /**
092 * Gets endowment transaction code and description.
093 *
094 * @return
095 */
096 public String getCodeAndDescription() {
097 if (StringUtils.isEmpty(code)) {
098 return KFSConstants.EMPTY_STRING;
099 }
100 return super.getCodeAndDescription();
101 }
102
103 /**
104 * Sets endowment transaction code and description.
105 *
106 * @param codeAndDescription
107 */
108 public void setCodeAndDescription(String codeAndDescription) {
109
110 }
111
112
113 /**
114 * Gets glLinks.
115 *
116 * @return glLinks
117 */
118 public List<GLLink> getGlLinks() {
119 return glLinks;
120 }
121
122 /**
123 * Sets glLinks.
124 *
125 * @param glLinks
126 */
127 public void setGlLinks(List<GLLink> glLinks) {
128 this.glLinks = glLinks;
129 }
130
131 /**
132 * Gets the corpusIndicator.
133 *
134 * @return corpusIndicator
135 */
136 public boolean isCorpusIndicator() {
137 return corpusIndicator;
138 }
139
140 /**
141 * Sets the corpusIndicator.
142 *
143 * @param corpusIndicator
144 */
145 public void setCorpusIndicator(boolean corpusIndicator) {
146 this.corpusIndicator = corpusIndicator;
147 }
148
149
150 }