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