| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| PersonDocumentAddress |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2007-2008 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 org.hibernate.annotations.GenericGenerator; | |
| 19 | import org.hibernate.annotations.Parameter; | |
| 20 | import org.kuali.rice.kim.bo.reference.AddressType; | |
| 21 | import org.kuali.rice.kim.bo.reference.impl.AddressTypeImpl; | |
| 22 | ||
| 23 | import javax.persistence.*; | |
| 24 | ||
| 25 | /** | |
| 26 | * This is a description of what this class does - shyu don't forget to fill this in. | |
| 27 | * | |
| 28 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 29 | * | |
| 30 | */ | |
| 31 | @IdClass(PersonDocumentAddressId.class) | |
| 32 | @Entity | |
| 33 | @Table(name = "KRIM_PND_ADDR_MT") | |
| 34 | public class PersonDocumentAddress extends PersonDocumentBoDefaultBase { | |
| 35 | @Id | |
| 36 | @GeneratedValue(generator="KRIM_ENTITY_ADDR_ID_S") | |
| 37 | @GenericGenerator(name="KRIM_ENTITY_ADDR_ID_S",strategy="org.kuali.rice.core.jpa.spring.RiceNumericStringSequenceStyleGenerator",parameters={ | |
| 38 | @Parameter(name="sequence_name",value="KRIM_ENTITY_ADDR_ID_S"), | |
| 39 | @Parameter(name="value_column",value="id") | |
| 40 | }) | |
| 41 | @Column(name = "ENTITY_ADDR_ID") | |
| 42 | protected String entityAddressId; | |
| 43 | ||
| 44 | ||
| 45 | @Column(name = "ADDR_TYP_CD") | |
| 46 | protected String addressTypeCode; | |
| 47 | ||
| 48 | //@Column(name = "ENT_TYP_CD") | |
| 49 | @Transient | |
| 50 | protected String entityTypeCode; | |
| 51 | ||
| 52 | @Column(name = "CITY_NM") | |
| 53 | protected String cityName; | |
| 54 | ||
| 55 | @Column(name = "POSTAL_STATE_CD") | |
| 56 | protected String stateCode; | |
| 57 | ||
| 58 | @Column(name = "POSTAL_CD") | |
| 59 | protected String postalCode; | |
| 60 | ||
| 61 | @Column(name = "POSTAL_CNTRY_CD") | |
| 62 | protected String countryCode; | |
| 63 | ||
| 64 | @Column(name = "ADDR_LINE_1") | |
| 65 | protected String line1; | |
| 66 | ||
| 67 | @Column(name = "ADDR_LINE_2") | |
| 68 | protected String line2; | |
| 69 | ||
| 70 | @Column(name = "ADDR_LINE_3") | |
| 71 | protected String line3; | |
| 72 | ||
| 73 | @ManyToOne(targetEntity=AddressTypeImpl.class, fetch = FetchType.EAGER, cascade = {}) | |
| 74 | @JoinColumn(name = "ADDR_TYP_CD", insertable = false, updatable = false) | |
| 75 | protected AddressType addressType; | |
| 76 | ||
| 77 | // Waiting until we pull in from KFS | |
| 78 | // protected State state; | |
| 79 | // protected PostalCode postalCode; | |
| 80 | // protected Country country; | |
| 81 | 0 | public PersonDocumentAddress() { |
| 82 | 0 | this.active = true; |
| 83 | 0 | } |
| 84 | ||
| 85 | /** | |
| 86 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getAddressTypeCode() | |
| 87 | */ | |
| 88 | public String getAddressTypeCode() { | |
| 89 | 0 | return addressTypeCode; |
| 90 | } | |
| 91 | ||
| 92 | /** | |
| 93 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getCityName() | |
| 94 | */ | |
| 95 | public String getCityName() { | |
| 96 | 0 | return cityName; |
| 97 | } | |
| 98 | ||
| 99 | /** | |
| 100 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getCountryCode() | |
| 101 | */ | |
| 102 | public String getCountryCode() { | |
| 103 | 0 | return countryCode; |
| 104 | } | |
| 105 | ||
| 106 | /** | |
| 107 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getEntityAddressId() | |
| 108 | */ | |
| 109 | public String getEntityAddressId() { | |
| 110 | 0 | return entityAddressId; |
| 111 | } | |
| 112 | ||
| 113 | /** | |
| 114 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getLine1() | |
| 115 | */ | |
| 116 | public String getLine1() { | |
| 117 | 0 | return line1; |
| 118 | } | |
| 119 | ||
| 120 | /** | |
| 121 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getLine2() | |
| 122 | */ | |
| 123 | public String getLine2() { | |
| 124 | 0 | return line2; |
| 125 | } | |
| 126 | ||
| 127 | /** | |
| 128 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getLine3() | |
| 129 | */ | |
| 130 | public String getLine3() { | |
| 131 | 0 | return line3; |
| 132 | } | |
| 133 | ||
| 134 | /** | |
| 135 | * This overridden method ... | |
| 136 | * | |
| 137 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getPostalCode() | |
| 138 | */ | |
| 139 | public String getPostalCode() { | |
| 140 | 0 | return postalCode; |
| 141 | } | |
| 142 | ||
| 143 | /** | |
| 144 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#getStateCode() | |
| 145 | */ | |
| 146 | public String getStateCode() { | |
| 147 | 0 | return stateCode; |
| 148 | } | |
| 149 | ||
| 150 | /** | |
| 151 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setAddressTypeCode(java.lang.String) | |
| 152 | */ | |
| 153 | public void setAddressTypeCode(String addressTypeCode) { | |
| 154 | 0 | this.addressTypeCode = addressTypeCode; |
| 155 | 0 | } |
| 156 | ||
| 157 | /** | |
| 158 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setCityName(java.lang.String) | |
| 159 | */ | |
| 160 | public void setCityName(String cityName) { | |
| 161 | 0 | this.cityName = cityName; |
| 162 | 0 | } |
| 163 | ||
| 164 | /** | |
| 165 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setCountryCode(java.lang.String) | |
| 166 | */ | |
| 167 | public void setCountryCode(String countryCode) { | |
| 168 | 0 | this.countryCode = countryCode; |
| 169 | 0 | } |
| 170 | ||
| 171 | /** | |
| 172 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setLine1(java.lang.String) | |
| 173 | */ | |
| 174 | public void setLine1(String line1) { | |
| 175 | 0 | this.line1 = line1; |
| 176 | 0 | } |
| 177 | ||
| 178 | /** | |
| 179 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setLine2(java.lang.String) | |
| 180 | */ | |
| 181 | public void setLine2(String line2) { | |
| 182 | 0 | this.line2 = line2; |
| 183 | 0 | } |
| 184 | ||
| 185 | /** | |
| 186 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setLine3(java.lang.String) | |
| 187 | */ | |
| 188 | public void setLine3(String line3) { | |
| 189 | 0 | this.line3 = line3; |
| 190 | 0 | } |
| 191 | ||
| 192 | /** | |
| 193 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setPostalCode(java.lang.String) | |
| 194 | */ | |
| 195 | public void setPostalCode(String postalCode) { | |
| 196 | 0 | this.postalCode = postalCode; |
| 197 | 0 | } |
| 198 | ||
| 199 | /** | |
| 200 | * @see org.kuali.rice.kim.bo.entity.KimEntityAddress#setStateCode(java.lang.String) | |
| 201 | */ | |
| 202 | public void setStateCode(String stateCode) { | |
| 203 | 0 | this.stateCode = stateCode; |
| 204 | 0 | } |
| 205 | ||
| 206 | /** | |
| 207 | * @see org.kuali.rice.kim.bo.entity.KimDefaultableEntityTypeData#getEntityTypeCode() | |
| 208 | */ | |
| 209 | public String getEntityTypeCode() { | |
| 210 | 0 | return entityTypeCode; |
| 211 | } | |
| 212 | ||
| 213 | /** | |
| 214 | * @see org.kuali.rice.kim.bo.entity.KimDefaultableEntityTypeData#setEntityTypeCode(java.lang.String) | |
| 215 | */ | |
| 216 | public void setEntityTypeCode(String entityTypeCode) { | |
| 217 | 0 | this.entityTypeCode = entityTypeCode; |
| 218 | 0 | } |
| 219 | ||
| 220 | public void setEntityAddressId(String entityAddressId) { | |
| 221 | 0 | this.entityAddressId = entityAddressId; |
| 222 | 0 | } |
| 223 | ||
| 224 | public AddressType getAddressType() { | |
| 225 | 0 | return this.addressType; |
| 226 | } | |
| 227 | ||
| 228 | public void setAddressType(AddressType addressType) { | |
| 229 | 0 | this.addressType = addressType; |
| 230 | 0 | } |
| 231 | } |