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