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 017 package org.kuali.kfs.integration.cg.businessobject; 018 019 import org.kuali.kfs.integration.cg.ContractsAndGrantsAgency; 020 import org.kuali.rice.kns.util.KualiDecimal; 021 022 /** 023 * This class defines an agency as it is used and referenced within the Contracts and Grants portion of a college or university 024 * financial system. 025 */ 026 public class Agency implements ContractsAndGrantsAgency { 027 028 private String agencyNumber; 029 private String reportingName; 030 private String fullName; 031 private String agencyTypeCode; 032 private String reportsToAgencyNumber; 033 private KualiDecimal indirectAmount; 034 private boolean inStateIndicator; 035 private Agency reportsToAgency; 036 private boolean active; 037 038 /** 039 * Gets the agencyTypeCode attribute. 040 * 041 * @return Returns the agencyTypeCode. 042 */ 043 public String getAgencyTypeCode() { 044 return agencyTypeCode; 045 } 046 047 /** 048 * Sets the agencyTypeCode attribute value. 049 * 050 * @param agencyTypeCode The agencyTypeCode to set. 051 */ 052 public void setAgencyTypeCode(String agencyTypeCode) { 053 this.agencyTypeCode = agencyTypeCode; 054 } 055 056 /** 057 * Gets the reportsToAgencyNumber attribute. 058 * 059 * @return Returns the reportsToAgencyNumber. 060 */ 061 public String getReportsToAgencyNumber() { 062 return reportsToAgencyNumber; 063 } 064 065 /** 066 * Sets the reportsToAgencyNumber attribute value. 067 * 068 * @param reportsToAgencyNumber The reportsToAgencyNumber to set. 069 */ 070 public void setReportsToAgencyNumber(String reportsToAgencyNumber) { 071 this.reportsToAgencyNumber = reportsToAgencyNumber; 072 } 073 074 /** 075 * Default no-arg constructor. 076 */ 077 public Agency() { 078 079 } 080 081 /** 082 * Gets the agencyNumber attribute. 083 * 084 * @return Returns the agencyNumber 085 */ 086 public String getAgencyNumber() { 087 return agencyNumber; 088 } 089 090 /** 091 * Sets the agencyNumber attribute. 092 * 093 * @param agencyNumber The agencyNumber to set. 094 */ 095 public void setAgencyNumber(String agencyNumber) { 096 this.agencyNumber = agencyNumber; 097 } 098 099 /** 100 * Gets the reportingName attribute. 101 * 102 * @return Returns the reportingName 103 */ 104 public String getReportingName() { 105 return reportingName; 106 } 107 108 /** 109 * Sets the reportingName attribute. 110 * 111 * @param reportingName The reportingName to set. 112 */ 113 public void setReportingName(String reportingName) { 114 this.reportingName = reportingName; 115 } 116 117 /** 118 * Gets the fullName attribute. 119 * 120 * @return Returns the fullName 121 */ 122 public String getFullName() { 123 return fullName; 124 } 125 126 /** 127 * Sets the fullName attribute. 128 * 129 * @param fullName The fullName to set. 130 */ 131 public void setFullName(String fullName) { 132 this.fullName = fullName; 133 } 134 135 /** 136 * Gets the indirectAmount attribute. 137 * 138 * @return Returns the indirectAmount 139 */ 140 public KualiDecimal getIndirectAmount() { 141 return indirectAmount; 142 } 143 144 /** 145 * Sets the indirectAmount attribute. 146 * 147 * @param indirectAmount The indirectAmount to set. 148 */ 149 public void setIndirectAmount(KualiDecimal indirectAmount) { 150 this.indirectAmount = indirectAmount; 151 } 152 153 /** 154 * Gets the inStateIndicator attribute. 155 * 156 * @return Returns the inStateIndicator 157 */ 158 public boolean isInStateIndicator() { 159 return inStateIndicator; 160 } 161 162 /** 163 * Sets the inStateIndicator attribute. 164 * 165 * @param inStateIndicator The inStateIndicator to set. 166 */ 167 public void setInStateIndicator(boolean inStateIndicator) { 168 this.inStateIndicator = inStateIndicator; 169 } 170 171 /** 172 * Gets the reportsToAgency attribute. 173 * 174 * @return Returns the reportsToAgency 175 */ 176 public Agency getReportsToAgency() { 177 return reportsToAgency; 178 } 179 180 /** 181 * Sets the reportsToAgency attribute. 182 * 183 * @param reportsToAgencyNumber The reportsToAgency to set. 184 * @deprecated 185 * @todo Why is this deprecated? 186 */ 187 public void setReportsToAgency(Agency reportsToAgencyNumber) { 188 this.reportsToAgency = reportsToAgencyNumber; 189 } 190 191 /** 192 * This method compares the passed in agency object against this agency object to check for equality. Equality is defined by if 193 * the agency passed in has the same agency number as the agency being compared to. 194 * 195 * @param agency The agency object to be compared. 196 * @return True if the agency passed in is determined to be equal, false otherwise. 197 */ 198 public boolean equals(Agency agency) { 199 return this.agencyNumber.equals(agency.getAgencyNumber()); 200 } 201 202 /** 203 * Gets the active attribute. 204 * @return Returns the active. 205 */ 206 public boolean isActive() { 207 return active; 208 } 209 210 /** 211 * Sets the active attribute value. 212 * @param active The active to set. 213 */ 214 public void setActive(boolean active) { 215 this.active = active; 216 } 217 218 public void prepareForWorkflow() {} 219 220 public void refresh() {} 221 222 }