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