1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.kuali.ole.module.purap.businessobject;
21
22 import org.apache.commons.lang.builder.ToStringBuilder;
23
24 import java.util.ArrayList;
25 import java.util.List;
26
27 public class ElectronicInvoicePostalAddress {
28
29 private String type;
30 private String line1 = "";
31 private String line2 = "";
32 private String line3 = "";
33 private String cityName;
34 private String stateCode;
35 private String postalCode;
36 private String countryCode;
37 private String countryName;
38
39 private List names = new ArrayList();
40
41 private List<String> street = new ArrayList<String>();
42
43 public ElectronicInvoicePostalAddress() {
44 super();
45 }
46
47 public void addName(String name) {
48 this.names.add(name);
49 }
50
51
52
53
54 public String getName() {
55 if (names.isEmpty()) {
56 return "";
57 } else {
58 return (String) names.get(0);
59 }
60 }
61
62
63
64
65 public String getCityName() {
66 return cityName;
67 }
68
69
70
71
72 public void setCityName(String cityName) {
73 this.cityName = cityName;
74 }
75
76
77
78
79 public String getCountryCode() {
80 return countryCode;
81 }
82
83
84
85
86 public void setCountryCode(String countryCode) {
87 this.countryCode = countryCode;
88 }
89
90
91
92
93 public String getCountryName() {
94 return countryName;
95 }
96
97
98
99
100 public void setCountryName(String countryName) {
101 this.countryName = countryName;
102 }
103
104
105
106
107 public String getLine1() {
108
109 if (street.size() > 0) {
110 return street.get(0);
111 } else {
112 return null;
113 }
114 }
115
116
117
118
119 public void setLine1(String line1) {
120 this.line1 = line1;
121 }
122
123
124
125
126 public String getLine2() {
127
128 if (street.size() > 1) {
129 return street.get(1);
130 } else {
131 return null;
132 }
133 }
134
135
136
137
138 public void setLine2(String line2) {
139 this.line2 = line2;
140 }
141
142
143
144
145 public String getLine3() {
146
147 if (street.size() > 2) {
148 return street.get(2);
149 } else {
150 return null;
151 }
152 }
153
154
155
156
157 public void setLine3(String line3) {
158 this.line3 = line3;
159 }
160
161
162
163
164 public List getNames() {
165 return names;
166 }
167
168
169
170
171 public void setNames(List names) {
172 this.names = names;
173 }
174
175
176
177
178 public String getPostalCode() {
179 return postalCode;
180 }
181
182
183
184
185 public void setPostalCode(String postalCode) {
186 this.postalCode = postalCode;
187 }
188
189
190
191
192 public String getStateCode() {
193 return stateCode;
194 }
195
196
197
198
199 public void setStateCode(String stateCode) {
200 this.stateCode = stateCode;
201 }
202
203
204
205
206 public String getType() {
207 return type;
208 }
209
210
211
212
213 public void setType(String type) {
214 this.type = type;
215 }
216
217 public void addStreet(String street) {
218 this.street.add(street);
219 }
220
221 public String toString() {
222
223 ToStringBuilder toString = new ToStringBuilder(this);
224
225 toString.append("type", getType());
226 toString.append("line1", getLine1());
227 toString.append("line2", getLine2());
228 toString.append("line3", getLine3());
229 toString.append("cityName", getCityName());
230 toString.append("stateCode", getStateCode());
231 toString.append("postalCode", getPostalCode());
232 toString.append("countryCode", getCountryCode());
233 toString.append("countryName", getCountryName());
234 toString.append("Names(DeliverTo)", getNames());
235
236 return toString.toString();
237 }
238 }