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 */ 016package org.kuali.ole.select.businessobject; 017 018import org.kuali.rice.core.api.mo.common.active.MutableInactivatable; 019import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; 020 021import java.util.LinkedHashMap; 022 023public class OleRequestor extends PersistableBusinessObjectBase implements MutableInactivatable { 024 025 private String requestorId; 026 private String requestorTypeId; 027 private String requestorFirstName; 028 private String requestorLastName; 029 private String requestorAddress1; 030 private String requestorAddress2; 031 private String requestorCityName; 032 private String requestorStateCode; 033 private String requestorPostalCode; 034 private String requestorCountryCode; 035 private String requestorPhoneNumber; 036 private String requestorEmail; 037 private String requestorSms; 038 private boolean active; 039 private String requestorName; 040 private String refKrimId; 041 private String requestorProvince; 042 043 public String getRefKrimId() { 044 return refKrimId; 045 } 046 047 public void setRefKrimId(String refKrimId) { 048 this.refKrimId = refKrimId; 049 } 050 051 public String getRequestorId() { 052 return requestorId; 053 } 054 055 056 public void setRequestorId(String requestorId) { 057 this.requestorId = requestorId; 058 } 059 060 public String getRequestorTypeId() { 061 return requestorTypeId; 062 } 063 064 065 public void setRequestorTypeId(String requestorTypeId) { 066 this.requestorTypeId = requestorTypeId; 067 } 068 069 public String getRequestorFirstName() { 070 return requestorFirstName; 071 } 072 073 074 public void setRequestorFirstName(String requestorFirstName) { 075 this.requestorFirstName = requestorFirstName; 076 } 077 078 079 public String getRequestorLastName() { 080 return requestorLastName; 081 } 082 083 084 public void setRequestorLastName(String requestorLastName) { 085 this.requestorLastName = requestorLastName; 086 } 087 088 089 public String getRequestorAddress1() { 090 return requestorAddress1; 091 } 092 093 094 public void setRequestorAddress1(String requestorAddress1) { 095 this.requestorAddress1 = requestorAddress1; 096 } 097 098 099 public String getRequestorAddress2() { 100 return requestorAddress2; 101 } 102 103 104 public void setRequestorAddress2(String requestorAddress2) { 105 this.requestorAddress2 = requestorAddress2; 106 } 107 108 109 public String getRequestorCityName() { 110 return requestorCityName; 111 } 112 113 114 public void setRequestorCityName(String requestorCityName) { 115 this.requestorCityName = requestorCityName; 116 } 117 118 119 public String getRequestorStateCode() { 120 return requestorStateCode; 121 } 122 123 124 public void setRequestorStateCode(String requestorStateCode) { 125 this.requestorStateCode = requestorStateCode; 126 } 127 128 129 public String getRequestorPostalCode() { 130 return requestorPostalCode; 131 } 132 133 134 public void setRequestorPostalCode(String requestorPostalCode) { 135 this.requestorPostalCode = requestorPostalCode; 136 } 137 138 139 public String getRequestorCountryCode() { 140 return requestorCountryCode; 141 } 142 143 144 public void setRequestorCountryCode(String requestorCountryCode) { 145 this.requestorCountryCode = requestorCountryCode; 146 } 147 148 149 public String getRequestorPhoneNumber() { 150 return requestorPhoneNumber; 151 } 152 153 154 public void setRequestorPhoneNumber(String requestorPhoneNumber) { 155 this.requestorPhoneNumber = requestorPhoneNumber; 156 } 157 158 159 public String getRequestorEmail() { 160 return requestorEmail; 161 } 162 163 164 public void setRequestorEmail(String requestorEmail) { 165 this.requestorEmail = requestorEmail; 166 } 167 168 169 public String getRequestorSms() { 170 return requestorSms; 171 } 172 173 174 public void setRequestorSms(String requestorSms) { 175 this.requestorSms = requestorSms; 176 } 177 178 179 public boolean isActive() { 180 return active; 181 } 182 183 184 public void setActive(boolean active) { 185 this.active = active; 186 } 187 188 public String getName() { 189 StringBuffer buffer = new StringBuffer(); 190 buffer.append(requestorLastName).append(", "); 191 buffer.append(requestorFirstName); 192 return buffer.toString(); 193 } 194 195 /** 196 * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper() 197 */ 198 @SuppressWarnings("rawtypes") 199 protected LinkedHashMap toStringMapper_RICE20_REFACTORME() { 200 LinkedHashMap toStringMap = new LinkedHashMap(); 201 toStringMap.put("requestorFirstName", requestorFirstName); 202 toStringMap.put("requestorLastName", requestorLastName); 203 toStringMap.put("requestorAddress1", requestorAddress1); 204 toStringMap.put("requestorAddress2", requestorAddress2); 205 toStringMap.put("requestorCityName", requestorCityName); 206 toStringMap.put("requestorStateCode", requestorStateCode); 207 toStringMap.put("requestorPostalCode", requestorPostalCode); 208 toStringMap.put("requestorCountryCode", requestorCountryCode); 209 toStringMap.put("requestorPhoneNumber", requestorPhoneNumber); 210 toStringMap.put("requestorEmail", requestorEmail); 211 toStringMap.put("requestorSms", requestorSms); 212 toStringMap.put("requestorProvince", requestorProvince); 213 return toStringMap; 214 } 215 216 public String getRequestorName() { 217 if (this.requestorFirstName != null && this.requestorLastName != null) 218 this.requestorName = this.requestorLastName.concat(", ").concat(this.requestorFirstName); 219 else if (this.requestorLastName == null && this.requestorFirstName != null) 220 this.requestorName = this.requestorFirstName; 221 else if (this.requestorFirstName == null && this.requestorLastName != null) 222 this.requestorName = this.requestorLastName; 223 return requestorName; 224 } 225 226 public void setRequestorName(String requestorName) { 227 this.requestorName = requestorName; 228 } 229 230 public String getRequestorProvince() { 231 return requestorProvince; 232 } 233 234 public void setRequestorProvince(String requestorProvince) { 235 this.requestorProvince = requestorProvince; 236 } 237 238 239}