1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package edu.sampleu.financial.bo; |
17 | |
|
18 | |
import org.apache.commons.lang.StringUtils; |
19 | |
import org.apache.log4j.Logger; |
20 | |
import org.kuali.rice.core.api.mo.common.active.MutableInactivatable; |
21 | |
import org.kuali.rice.core.framework.services.CoreFrameworkServiceLocator; |
22 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; |
23 | |
import org.kuali.rice.krad.util.KRADConstants; |
24 | |
import org.kuali.rice.location.api.country.Country; |
25 | |
import org.kuali.rice.location.api.services.LocationApiServiceLocator; |
26 | |
import org.kuali.rice.location.api.state.State; |
27 | |
|
28 | |
import java.util.ArrayList; |
29 | |
import java.util.List; |
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
public class VendorAddress extends PersistableBusinessObjectBase implements MutableInactivatable { |
35 | 0 | private static Logger LOG = Logger.getLogger(VendorAddress.class); |
36 | |
|
37 | |
private Integer vendorAddressGeneratedIdentifier; |
38 | |
private Integer vendorHeaderGeneratedIdentifier; |
39 | |
private Integer vendorDetailAssignedIdentifier; |
40 | |
private String vendorAddressTypeCode; |
41 | |
private String vendorLine1Address; |
42 | |
private String vendorLine2Address; |
43 | |
private String vendorCityName; |
44 | |
private String vendorStateCode; |
45 | |
private String vendorZipCode; |
46 | |
private String vendorCountryCode; |
47 | |
private String vendorAttentionName; |
48 | |
private String vendorAddressInternationalProvinceName; |
49 | |
private String vendorAddressEmailAddress; |
50 | |
private String vendorBusinessToBusinessUrlAddress; |
51 | |
private String vendorFaxNumber; |
52 | |
private boolean vendorDefaultAddressIndicator; |
53 | |
private boolean active; |
54 | |
|
55 | |
private List<VendorDefaultAddress> vendorDefaultAddresses; |
56 | |
|
57 | |
private VendorDetail vendorDetail; |
58 | |
private AddressType vendorAddressType; |
59 | |
private State vendorState; |
60 | |
private Country vendorCountry; |
61 | |
|
62 | |
|
63 | |
|
64 | |
|
65 | 0 | public VendorAddress() { |
66 | 0 | vendorDefaultAddresses = new ArrayList(); |
67 | 0 | } |
68 | |
|
69 | |
public Integer getVendorAddressGeneratedIdentifier() { |
70 | |
|
71 | 0 | return vendorAddressGeneratedIdentifier; |
72 | |
} |
73 | |
|
74 | |
public void setVendorAddressGeneratedIdentifier(Integer vendorAddressGeneratedIdentifier) { |
75 | 0 | this.vendorAddressGeneratedIdentifier = vendorAddressGeneratedIdentifier; |
76 | 0 | } |
77 | |
|
78 | |
public Integer getVendorHeaderGeneratedIdentifier() { |
79 | 0 | return vendorHeaderGeneratedIdentifier; |
80 | |
} |
81 | |
|
82 | |
public void setVendorHeaderGeneratedIdentifier(Integer vendorHeaderGeneratedIdentifier) { |
83 | 0 | this.vendorHeaderGeneratedIdentifier = vendorHeaderGeneratedIdentifier; |
84 | 0 | } |
85 | |
|
86 | |
public Integer getVendorDetailAssignedIdentifier() { |
87 | 0 | return vendorDetailAssignedIdentifier; |
88 | |
} |
89 | |
|
90 | |
public void setVendorDetailAssignedIdentifier(Integer vendorDetailAssignedIdentifier) { |
91 | 0 | this.vendorDetailAssignedIdentifier = vendorDetailAssignedIdentifier; |
92 | 0 | } |
93 | |
|
94 | |
public String getVendorAddressInternationalProvinceName() { |
95 | 0 | return vendorAddressInternationalProvinceName; |
96 | |
} |
97 | |
|
98 | |
public void setVendorAddressInternationalProvinceName(String vendorAddressInternationalProvinceName) { |
99 | 0 | this.vendorAddressInternationalProvinceName = vendorAddressInternationalProvinceName; |
100 | 0 | } |
101 | |
|
102 | |
public String getVendorAddressEmailAddress() { |
103 | 0 | return vendorAddressEmailAddress; |
104 | |
} |
105 | |
|
106 | |
public void setVendorAddressEmailAddress(String vendorAddressEmailAddress) { |
107 | 0 | this.vendorAddressEmailAddress = vendorAddressEmailAddress; |
108 | 0 | } |
109 | |
|
110 | |
public String getVendorAddressTypeCode() { |
111 | 0 | return vendorAddressTypeCode; |
112 | |
} |
113 | |
|
114 | |
public void setVendorAddressTypeCode(String vendorAddressTypeCode) { |
115 | 0 | this.vendorAddressTypeCode = vendorAddressTypeCode; |
116 | 0 | } |
117 | |
|
118 | |
public String getVendorLine1Address() { |
119 | 0 | return vendorLine1Address; |
120 | |
} |
121 | |
|
122 | |
public void setVendorLine1Address(String vendorLine1Address) { |
123 | 0 | this.vendorLine1Address = vendorLine1Address; |
124 | 0 | } |
125 | |
|
126 | |
public String getVendorLine2Address() { |
127 | 0 | return vendorLine2Address; |
128 | |
} |
129 | |
|
130 | |
public void setVendorLine2Address(String vendorLine2Address) { |
131 | 0 | this.vendorLine2Address = vendorLine2Address; |
132 | 0 | } |
133 | |
|
134 | |
public String getVendorCityName() { |
135 | 0 | return vendorCityName; |
136 | |
} |
137 | |
|
138 | |
public void setVendorCityName(String vendorCityName) { |
139 | 0 | this.vendorCityName = vendorCityName; |
140 | 0 | } |
141 | |
|
142 | |
public String getVendorStateCode() { |
143 | 0 | return vendorStateCode; |
144 | |
} |
145 | |
|
146 | |
public void setVendorStateCode(String vendorStateCode) { |
147 | 0 | this.vendorStateCode = vendorStateCode; |
148 | 0 | } |
149 | |
|
150 | |
public String getVendorZipCode() { |
151 | 0 | return vendorZipCode; |
152 | |
} |
153 | |
|
154 | |
public void setVendorZipCode(String vendorZipCode) { |
155 | 0 | this.vendorZipCode = vendorZipCode; |
156 | 0 | } |
157 | |
|
158 | |
public String getVendorCountryCode() { |
159 | 0 | return vendorCountryCode; |
160 | |
} |
161 | |
|
162 | |
public void setVendorCountryCode(String vendorCountryCode) { |
163 | 0 | this.vendorCountryCode = vendorCountryCode; |
164 | 0 | } |
165 | |
|
166 | |
public String getVendorAttentionName() { |
167 | 0 | return vendorAttentionName; |
168 | |
} |
169 | |
|
170 | |
public void setVendorAttentionName(String vendorAttentionName) { |
171 | 0 | this.vendorAttentionName = vendorAttentionName; |
172 | 0 | } |
173 | |
|
174 | |
public String getVendorBusinessToBusinessUrlAddress() { |
175 | 0 | return vendorBusinessToBusinessUrlAddress; |
176 | |
} |
177 | |
|
178 | |
public void setVendorBusinessToBusinessUrlAddress(String vendorBusinessToBusinessUrlAddress) { |
179 | 0 | this.vendorBusinessToBusinessUrlAddress = vendorBusinessToBusinessUrlAddress; |
180 | 0 | } |
181 | |
|
182 | |
public VendorDetail getVendorDetail() { |
183 | 0 | return vendorDetail; |
184 | |
} |
185 | |
|
186 | |
public void setVendorDetail(VendorDetail vendorDetail) { |
187 | 0 | this.vendorDetail = vendorDetail; |
188 | 0 | } |
189 | |
|
190 | |
public AddressType getVendorAddressType() { |
191 | 0 | return vendorAddressType; |
192 | |
} |
193 | |
|
194 | |
public void setVendorAddressType(AddressType vendorAddressType) { |
195 | 0 | this.vendorAddressType = vendorAddressType; |
196 | 0 | } |
197 | |
|
198 | |
public State getVendorState() { |
199 | 0 | if ((vendorState == null) || (StringUtils.equals(vendorState.getCode(), vendorStateCode))) { |
200 | 0 | vendorState = LocationApiServiceLocator.getStateService().getState(vendorCountryCode, vendorStateCode); |
201 | |
} |
202 | |
|
203 | 0 | return vendorState; |
204 | |
} |
205 | |
|
206 | |
public void setVendorState(State vendorState) { |
207 | 0 | this.vendorState = vendorState; |
208 | 0 | } |
209 | |
|
210 | |
public Country getVendorCountry() { |
211 | 0 | String postalCountryCode = CoreFrameworkServiceLocator.getParameterService().getParameterValueAsString( |
212 | |
KRADConstants.KRAD_NAMESPACE, |
213 | |
KRADConstants.DetailTypes.ALL_DETAIL_TYPE, KRADConstants.SystemGroupParameterNames.DEFAULT_COUNTRY); |
214 | 0 | vendorCountry = LocationApiServiceLocator.getCountryService().getCountry(postalCountryCode); |
215 | |
|
216 | 0 | return vendorCountry; |
217 | |
} |
218 | |
|
219 | |
public void setVendorCountry(Country vendorCountry) { |
220 | 0 | this.vendorCountry = vendorCountry; |
221 | 0 | } |
222 | |
|
223 | |
public String getVendorFaxNumber() { |
224 | 0 | return vendorFaxNumber; |
225 | |
} |
226 | |
|
227 | |
public void setVendorFaxNumber(String vendorFaxNumber) { |
228 | 0 | this.vendorFaxNumber = vendorFaxNumber; |
229 | 0 | } |
230 | |
|
231 | |
public boolean isVendorDefaultAddressIndicator() { |
232 | 0 | return vendorDefaultAddressIndicator; |
233 | |
} |
234 | |
|
235 | |
public void setVendorDefaultAddressIndicator(boolean vendorDefaultAddressIndicator) { |
236 | 0 | this.vendorDefaultAddressIndicator = vendorDefaultAddressIndicator; |
237 | 0 | } |
238 | |
|
239 | |
public boolean isActive() { |
240 | 0 | return active; |
241 | |
} |
242 | |
|
243 | |
public void setActive(boolean active) { |
244 | 0 | this.active = active; |
245 | 0 | } |
246 | |
|
247 | |
public List<VendorDefaultAddress> getVendorDefaultAddresses() { |
248 | 0 | return this.vendorDefaultAddresses; |
249 | |
} |
250 | |
|
251 | |
public void setVendorDefaultAddresses(List<VendorDefaultAddress> vendorDefaultAddresses) { |
252 | 0 | this.vendorDefaultAddresses = vendorDefaultAddresses; |
253 | 0 | } |
254 | |
} |