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