1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.Date;
21  import java.util.List;
22  
23  /**
24   * <a href="AddressSoap.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class is used by
33   * {@link com.liferay.portal.service.http.AddressServiceSoap}.
34   * </p>
35   *
36   * @author    Brian Wing Shun Chan
37   * @see       com.liferay.portal.service.http.AddressServiceSoap
38   * @generated
39   */
40  public class AddressSoap implements Serializable {
41      public static AddressSoap toSoapModel(Address model) {
42          AddressSoap soapModel = new AddressSoap();
43  
44          soapModel.setAddressId(model.getAddressId());
45          soapModel.setCompanyId(model.getCompanyId());
46          soapModel.setUserId(model.getUserId());
47          soapModel.setUserName(model.getUserName());
48          soapModel.setCreateDate(model.getCreateDate());
49          soapModel.setModifiedDate(model.getModifiedDate());
50          soapModel.setClassNameId(model.getClassNameId());
51          soapModel.setClassPK(model.getClassPK());
52          soapModel.setStreet1(model.getStreet1());
53          soapModel.setStreet2(model.getStreet2());
54          soapModel.setStreet3(model.getStreet3());
55          soapModel.setCity(model.getCity());
56          soapModel.setZip(model.getZip());
57          soapModel.setRegionId(model.getRegionId());
58          soapModel.setCountryId(model.getCountryId());
59          soapModel.setTypeId(model.getTypeId());
60          soapModel.setMailing(model.getMailing());
61          soapModel.setPrimary(model.getPrimary());
62  
63          return soapModel;
64      }
65  
66      public static AddressSoap[] toSoapModels(Address[] models) {
67          AddressSoap[] soapModels = new AddressSoap[models.length];
68  
69          for (int i = 0; i < models.length; i++) {
70              soapModels[i] = toSoapModel(models[i]);
71          }
72  
73          return soapModels;
74      }
75  
76      public static AddressSoap[][] toSoapModels(Address[][] models) {
77          AddressSoap[][] soapModels = null;
78  
79          if (models.length > 0) {
80              soapModels = new AddressSoap[models.length][models[0].length];
81          }
82          else {
83              soapModels = new AddressSoap[0][0];
84          }
85  
86          for (int i = 0; i < models.length; i++) {
87              soapModels[i] = toSoapModels(models[i]);
88          }
89  
90          return soapModels;
91      }
92  
93      public static AddressSoap[] toSoapModels(List<Address> models) {
94          List<AddressSoap> soapModels = new ArrayList<AddressSoap>(models.size());
95  
96          for (Address model : models) {
97              soapModels.add(toSoapModel(model));
98          }
99  
100         return soapModels.toArray(new AddressSoap[soapModels.size()]);
101     }
102 
103     public AddressSoap() {
104     }
105 
106     public long getPrimaryKey() {
107         return _addressId;
108     }
109 
110     public void setPrimaryKey(long pk) {
111         setAddressId(pk);
112     }
113 
114     public long getAddressId() {
115         return _addressId;
116     }
117 
118     public void setAddressId(long addressId) {
119         _addressId = addressId;
120     }
121 
122     public long getCompanyId() {
123         return _companyId;
124     }
125 
126     public void setCompanyId(long companyId) {
127         _companyId = companyId;
128     }
129 
130     public long getUserId() {
131         return _userId;
132     }
133 
134     public void setUserId(long userId) {
135         _userId = userId;
136     }
137 
138     public String getUserName() {
139         return _userName;
140     }
141 
142     public void setUserName(String userName) {
143         _userName = userName;
144     }
145 
146     public Date getCreateDate() {
147         return _createDate;
148     }
149 
150     public void setCreateDate(Date createDate) {
151         _createDate = createDate;
152     }
153 
154     public Date getModifiedDate() {
155         return _modifiedDate;
156     }
157 
158     public void setModifiedDate(Date modifiedDate) {
159         _modifiedDate = modifiedDate;
160     }
161 
162     public long getClassNameId() {
163         return _classNameId;
164     }
165 
166     public void setClassNameId(long classNameId) {
167         _classNameId = classNameId;
168     }
169 
170     public long getClassPK() {
171         return _classPK;
172     }
173 
174     public void setClassPK(long classPK) {
175         _classPK = classPK;
176     }
177 
178     public String getStreet1() {
179         return _street1;
180     }
181 
182     public void setStreet1(String street1) {
183         _street1 = street1;
184     }
185 
186     public String getStreet2() {
187         return _street2;
188     }
189 
190     public void setStreet2(String street2) {
191         _street2 = street2;
192     }
193 
194     public String getStreet3() {
195         return _street3;
196     }
197 
198     public void setStreet3(String street3) {
199         _street3 = street3;
200     }
201 
202     public String getCity() {
203         return _city;
204     }
205 
206     public void setCity(String city) {
207         _city = city;
208     }
209 
210     public String getZip() {
211         return _zip;
212     }
213 
214     public void setZip(String zip) {
215         _zip = zip;
216     }
217 
218     public long getRegionId() {
219         return _regionId;
220     }
221 
222     public void setRegionId(long regionId) {
223         _regionId = regionId;
224     }
225 
226     public long getCountryId() {
227         return _countryId;
228     }
229 
230     public void setCountryId(long countryId) {
231         _countryId = countryId;
232     }
233 
234     public int getTypeId() {
235         return _typeId;
236     }
237 
238     public void setTypeId(int typeId) {
239         _typeId = typeId;
240     }
241 
242     public boolean getMailing() {
243         return _mailing;
244     }
245 
246     public boolean isMailing() {
247         return _mailing;
248     }
249 
250     public void setMailing(boolean mailing) {
251         _mailing = mailing;
252     }
253 
254     public boolean getPrimary() {
255         return _primary;
256     }
257 
258     public boolean isPrimary() {
259         return _primary;
260     }
261 
262     public void setPrimary(boolean primary) {
263         _primary = primary;
264     }
265 
266     private long _addressId;
267     private long _companyId;
268     private long _userId;
269     private String _userName;
270     private Date _createDate;
271     private Date _modifiedDate;
272     private long _classNameId;
273     private long _classPK;
274     private String _street1;
275     private String _street2;
276     private String _street3;
277     private String _city;
278     private String _zip;
279     private long _regionId;
280     private long _countryId;
281     private int _typeId;
282     private boolean _mailing;
283     private boolean _primary;
284 }