View Javadoc
1   /*
2    * Copyright 2011 The Kuali Foundation.
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.select.businessobject;
17  
18  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
19  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
20  
21  import java.util.LinkedHashMap;
22  
23  public class OleRequestor extends PersistableBusinessObjectBase implements MutableInactivatable {
24  
25      private String requestorId;
26      private String requestorTypeId;
27      private String requestorFirstName;
28      private String requestorLastName;
29      private String requestorAddress1;
30      private String requestorAddress2;
31      private String requestorCityName;
32      private String requestorStateCode;
33      private String requestorPostalCode;
34      private String requestorCountryCode;
35      private String requestorPhoneNumber;
36      private String requestorEmail;
37      private String requestorSms;
38      private boolean active;
39      private String requestorName;
40      private String refKrimId;
41      private String requestorProvince;
42  
43      public String getRefKrimId() {
44          return refKrimId;
45      }
46  
47      public void setRefKrimId(String refKrimId) {
48          this.refKrimId = refKrimId;
49      }
50  
51      public String getRequestorId() {
52          return requestorId;
53      }
54  
55  
56      public void setRequestorId(String requestorId) {
57          this.requestorId = requestorId;
58      }
59  
60      public String getRequestorTypeId() {
61          return requestorTypeId;
62      }
63  
64  
65      public void setRequestorTypeId(String requestorTypeId) {
66          this.requestorTypeId = requestorTypeId;
67      }
68  
69      public String getRequestorFirstName() {
70          return requestorFirstName;
71      }
72  
73  
74      public void setRequestorFirstName(String requestorFirstName) {
75          this.requestorFirstName = requestorFirstName;
76      }
77  
78  
79      public String getRequestorLastName() {
80          return requestorLastName;
81      }
82  
83  
84      public void setRequestorLastName(String requestorLastName) {
85          this.requestorLastName = requestorLastName;
86      }
87  
88  
89      public String getRequestorAddress1() {
90          return requestorAddress1;
91      }
92  
93  
94      public void setRequestorAddress1(String requestorAddress1) {
95          this.requestorAddress1 = requestorAddress1;
96      }
97  
98  
99      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 }