001/** 002 * Copyright 2005-2014 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.rice.kim.bo.ui; 017 018import java.sql.Timestamp; 019 020import javax.persistence.CascadeType; 021import javax.persistence.Column; 022import javax.persistence.Convert; 023import javax.persistence.Entity; 024import javax.persistence.GeneratedValue; 025import javax.persistence.Id; 026import javax.persistence.JoinColumn; 027import javax.persistence.ManyToOne; 028import javax.persistence.Table; 029import javax.persistence.Transient; 030 031import org.kuali.rice.kim.impl.identity.address.EntityAddressTypeBo; 032import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter; 033import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator; 034 035/** 036 * This is a description of what this class does - shyu don't forget to fill this in. 037 * 038 * @author Kuali Rice Team (rice.collab@kuali.org) 039 * 040 */ 041@Entity 042@Table(name = "KRIM_PND_ADDR_MT") 043public class PersonDocumentAddress extends PersonDocumentBoDefaultBase { 044 private static final long serialVersionUID = 1L; 045 046 @PortableSequenceGenerator(name = "KRIM_ENTITY_ADDR_ID_S") 047 @GeneratedValue(generator = "KRIM_ENTITY_ADDR_ID_S") 048 @Id 049 @Column(name = "ENTITY_ADDR_ID") 050 protected String entityAddressId; 051 052 @Column(name = "ADDR_TYP_CD") 053 protected String addressTypeCode; 054 055 //@Column(name = "ENT_TYP_CD") 056 @Transient 057 protected String entityTypeCode; 058 059 @Column(name = "CITY") 060 protected String city; 061 062 @Column(name = "STATE_PVC_CD") 063 protected String stateProvinceCode; 064 065 @Column(name = "POSTAL_CD") 066 protected String postalCode; 067 068 @Column(name = "POSTAL_CNTRY_CD") 069 protected String countryCode; 070 071 @Column(name = "ATTN_LINE") 072 protected String attentionLine; 073 074 @Column(name = "ADDR_LINE_1") 075 protected String line1; 076 077 @Column(name = "ADDR_LINE_2") 078 protected String line2; 079 080 @Column(name = "ADDR_LINE_3") 081 protected String line3; 082 083 @Column(name = "ADDR_FMT") 084 protected String addressFormat; 085 086 @Column(name = "MOD_DT") 087 protected Timestamp modifiedDate; 088 089 @Column(name = "VALID_DT") 090 protected Timestamp validatedDate; 091 092 @Column(name = "VALID_IND") 093 @Convert(converter = BooleanYNConverter.class) 094 protected boolean validated; 095 096 @Column(name = "NOTE_MSG") 097 protected String noteMessage; 098 099 @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}