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