View Javadoc
1   /**
2    * Copyright 2005-2014 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.rice.kim.bo.ui;
17  
18  import java.sql.Timestamp;
19  
20  import javax.persistence.CascadeType;
21  import javax.persistence.Column;
22  import javax.persistence.Convert;
23  import javax.persistence.Entity;
24  import javax.persistence.GeneratedValue;
25  import javax.persistence.Id;
26  import javax.persistence.JoinColumn;
27  import javax.persistence.ManyToOne;
28  import javax.persistence.Table;
29  import javax.persistence.Transient;
30  
31  import org.kuali.rice.kim.impl.identity.address.EntityAddressTypeBo;
32  import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter;
33  import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
34  
35  /**
36   * This is a description of what this class does - shyu don't forget to fill this in. 
37   * 
38   * @author Kuali Rice Team (rice.collab@kuali.org)
39   *
40   */
41  @Entity
42  @Table(name = "KRIM_PND_ADDR_MT")
43  public class PersonDocumentAddress extends PersonDocumentBoDefaultBase {
44      private static final long serialVersionUID = 1L;
45  
46      @PortableSequenceGenerator(name = "KRIM_ENTITY_ADDR_ID_S")
47      @GeneratedValue(generator = "KRIM_ENTITY_ADDR_ID_S")
48      @Id
49      @Column(name = "ENTITY_ADDR_ID")
50      protected String entityAddressId;
51  
52      @Column(name = "ADDR_TYP_CD")
53      protected String addressTypeCode;
54  
55      //@Column(name = "ENT_TYP_CD")                       
56      @Transient
57      protected String entityTypeCode;
58  
59      @Column(name = "CITY")
60      protected String city;
61  
62      @Column(name = "STATE_PVC_CD")
63      protected String stateProvinceCode;
64  
65      @Column(name = "POSTAL_CD")
66      protected String postalCode;
67  
68      @Column(name = "POSTAL_CNTRY_CD")
69      protected String countryCode;
70  
71      @Column(name = "ATTN_LINE")
72      protected String attentionLine;
73  
74      @Column(name = "ADDR_LINE_1")
75      protected String line1;
76  
77      @Column(name = "ADDR_LINE_2")
78      protected String line2;
79  
80      @Column(name = "ADDR_LINE_3")
81      protected String line3;
82  
83      @Column(name = "ADDR_FMT")
84      protected String addressFormat;
85  
86      @Column(name = "MOD_DT")
87      protected Timestamp modifiedDate;
88  
89      @Column(name = "VALID_DT")
90      protected Timestamp validatedDate;
91  
92      @Column(name = "VALID_IND")
93      @Convert(converter = BooleanYNConverter.class)
94      protected boolean validated;
95  
96      @Column(name = "NOTE_MSG")
97      protected String noteMessage;
98  
99      @ManyToOne(targetEntity = EntityAddressTypeBo.class, cascade = { CascadeType.REFRESH })
100     @JoinColumn(name = "ADDR_TYP_CD", referencedColumnName = "ADDR_TYP_CD", insertable = false, updatable = false)
101     private EntityAddressTypeBo addressType;
102 
103     // Waiting until we pull in from KFS                       
104     // protected State state;                       
105     // protected PostalCode postalCode;                       
106     // protected Country country;                       
107     public PersonDocumentAddress() {
108         this.active = true;
109     }
110 
111     /**
112 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getAddressTypeCode()
113 	 */
114     public String getAddressTypeCode() {
115         return addressTypeCode;
116     }
117 
118     /**
119 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getCity()
120 	 */
121     public String getCity() {
122         return city;
123     }
124 
125     /**
126 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getCountryCode()
127 	 */
128     public String getCountryCode() {
129         return countryCode;
130     }
131 
132     /**
133 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getEntityAddressId()
134 	 */
135     public String getEntityAddressId() {
136         return entityAddressId;
137     }
138 
139     /**
140 	 * @see org.kuali.rice.kim.api.identity.address.EntityAddressContract#getAttentionLine()
141 	 */
142     public String getAttentionLine() {
143         return attentionLine;
144     }
145 
146     /**
147 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getLine1()
148 	 */
149     public String getLine1() {
150         return line1;
151     }
152 
153     /**
154 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getLine2()
155 	 */
156     public String getLine2() {
157         return line2;
158     }
159 
160     /**
161 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getLine3()
162 	 */
163     public String getLine3() {
164         return line3;
165     }
166 
167     /**
168 	 * @see @see org.kuali.rice.kim.api.identity.address.EntityAddressContract#getAddressFormat
169 	 */
170     public String getAddressFormat() {
171         return addressFormat;
172     }
173 
174     public Timestamp getModifiedDate() {
175         return modifiedDate;
176     }
177 
178     public Timestamp getValidatedDate() {
179         return validatedDate;
180     }
181 
182     public boolean isValidated() {
183         return validated;
184     }
185 
186     public String getNoteMessage() {
187         return noteMessage;
188     }
189 
190     /**
191 	 * This overridden method ...
192 	 * 
193 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getPostalCode()
194 	 */
195     public String getPostalCode() {
196         return postalCode;
197     }
198 
199     /**
200 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getStateCode()
201 	 */
202     public String getStateProvinceCode() {
203         return stateProvinceCode;
204     }
205 
206     /**
207 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setAddressTypeCode(java.lang.String)
208 	 */
209     public void setAddressTypeCode(String addressTypeCode) {
210         this.addressTypeCode = addressTypeCode;
211     }
212 
213     /**
214 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setCity(java.lang.String)
215 	 */
216     public void setCity(String city) {
217         this.city = city;
218     }
219 
220     /**
221 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setCountryCode(java.lang.String)
222 	 */
223     public void setCountryCode(String countryCode) {
224         this.countryCode = countryCode;
225     }
226 
227     /**
228 	 * @see org.kuali.rice.kim.api.identity.address.EntityAddressContract#getAttentionLine()
229 	 */
230     public void setAttentionLine(String attentionLine) {
231         this.attentionLine = attentionLine;
232     }
233 
234     /**
235 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setLine1(java.lang.String)
236 	 */
237     public void setLine1(String line1) {
238         this.line1 = line1;
239     }
240 
241     /**
242 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setLine2(java.lang.String)
243 	 */
244     public void setLine2(String line2) {
245         this.line2 = line2;
246     }
247 
248     /**
249 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setLine3(java.lang.String)
250 	 */
251     public void setLine3(String line3) {
252         this.line3 = line3;
253     }
254 
255     /**
256 	 * @see org.kuali.rice.kim.api.identity.address.EntityAddressContract#getAddressFormat()
257 	 */
258     public void setAddressFormat(String addressFormat) {
259         this.addressFormat = addressFormat;
260     }
261 
262     public void setModifiedDate(Timestamp modifiedDate) {
263         this.modifiedDate = modifiedDate;
264     }
265 
266     public void setValidatedDate(Timestamp validatedDate) {
267         this.validatedDate = validatedDate;
268     }
269 
270     public void setValidated(boolean validated) {
271         this.validated = validated;
272     }
273 
274     public void setNoteMessage(String noteMessage) {
275         this.noteMessage = noteMessage;
276     }
277 
278     /**
279 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setPostalCode(java.lang.String)
280 	 */
281     public void setPostalCode(String postalCode) {
282         this.postalCode = postalCode;
283     }
284 
285     /**
286 	 * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setStateCode(java.lang.String)
287 	 */
288     public void setStateProvinceCode(String stateProvinceCode) {
289         this.stateProvinceCode = stateProvinceCode;
290     }
291 
292     /**
293 	 * @see org.kuali.rice.kim.impl.identity.type.EntityTypeContactInfoBo#getEntityTypeCode()
294 	 */
295     public String getEntityTypeCode() {
296         return entityTypeCode;
297     }
298 
299     public void setEntityTypeCode(String entityTypeCode) {
300         this.entityTypeCode = entityTypeCode;
301     }
302 
303     public void setEntityAddressId(String entityAddressId) {
304         this.entityAddressId = entityAddressId;
305     }
306 
307     public EntityAddressTypeBo getAddressType() {
308         return this.addressType;
309     }
310 
311     public void setAddressType(EntityAddressTypeBo addressType) {
312         this.addressType = addressType;
313     }
314 }