1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.Date;
29  import java.util.List;
30  
31  /**
32   * <a href="AddressSoap.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This class is used by
41   * <code>com.liferay.portal.service.http.AddressServiceSoap</code>.
42   * </p>
43   *
44   * @author Brian Wing Shun Chan
45   *
46   * @see com.liferay.portal.service.http.AddressServiceSoap
47   *
48   */
49  public class AddressSoap implements Serializable {
50      public static AddressSoap toSoapModel(Address model) {
51          AddressSoap soapModel = new AddressSoap();
52  
53          soapModel.setAddressId(model.getAddressId());
54          soapModel.setCompanyId(model.getCompanyId());
55          soapModel.setUserId(model.getUserId());
56          soapModel.setUserName(model.getUserName());
57          soapModel.setCreateDate(model.getCreateDate());
58          soapModel.setModifiedDate(model.getModifiedDate());
59          soapModel.setClassNameId(model.getClassNameId());
60          soapModel.setClassPK(model.getClassPK());
61          soapModel.setStreet1(model.getStreet1());
62          soapModel.setStreet2(model.getStreet2());
63          soapModel.setStreet3(model.getStreet3());
64          soapModel.setCity(model.getCity());
65          soapModel.setZip(model.getZip());
66          soapModel.setRegionId(model.getRegionId());
67          soapModel.setCountryId(model.getCountryId());
68          soapModel.setTypeId(model.getTypeId());
69          soapModel.setMailing(model.getMailing());
70          soapModel.setPrimary(model.getPrimary());
71  
72          return soapModel;
73      }
74  
75      public static AddressSoap[] toSoapModels(Address[] models) {
76          AddressSoap[] soapModels = new AddressSoap[models.length];
77  
78          for (int i = 0; i < models.length; i++) {
79              soapModels[i] = toSoapModel(models[i]);
80          }
81  
82          return soapModels;
83      }
84  
85      public static AddressSoap[][] toSoapModels(Address[][] models) {
86          AddressSoap[][] soapModels = null;
87  
88          if (models.length > 0) {
89              soapModels = new AddressSoap[models.length][models[0].length];
90          }
91          else {
92              soapModels = new AddressSoap[0][0];
93          }
94  
95          for (int i = 0; i < models.length; i++) {
96              soapModels[i] = toSoapModels(models[i]);
97          }
98  
99          return soapModels;
100     }
101 
102     public static AddressSoap[] toSoapModels(List<Address> models) {
103         List<AddressSoap> soapModels = new ArrayList<AddressSoap>(models.size());
104 
105         for (Address model : models) {
106             soapModels.add(toSoapModel(model));
107         }
108 
109         return soapModels.toArray(new AddressSoap[soapModels.size()]);
110     }
111 
112     public AddressSoap() {
113     }
114 
115     public long getPrimaryKey() {
116         return _addressId;
117     }
118 
119     public void setPrimaryKey(long pk) {
120         setAddressId(pk);
121     }
122 
123     public long getAddressId() {
124         return _addressId;
125     }
126 
127     public void setAddressId(long addressId) {
128         _addressId = addressId;
129     }
130 
131     public long getCompanyId() {
132         return _companyId;
133     }
134 
135     public void setCompanyId(long companyId) {
136         _companyId = companyId;
137     }
138 
139     public long getUserId() {
140         return _userId;
141     }
142 
143     public void setUserId(long userId) {
144         _userId = userId;
145     }
146 
147     public String getUserName() {
148         return _userName;
149     }
150 
151     public void setUserName(String userName) {
152         _userName = userName;
153     }
154 
155     public Date getCreateDate() {
156         return _createDate;
157     }
158 
159     public void setCreateDate(Date createDate) {
160         _createDate = createDate;
161     }
162 
163     public Date getModifiedDate() {
164         return _modifiedDate;
165     }
166 
167     public void setModifiedDate(Date modifiedDate) {
168         _modifiedDate = modifiedDate;
169     }
170 
171     public long getClassNameId() {
172         return _classNameId;
173     }
174 
175     public void setClassNameId(long classNameId) {
176         _classNameId = classNameId;
177     }
178 
179     public long getClassPK() {
180         return _classPK;
181     }
182 
183     public void setClassPK(long classPK) {
184         _classPK = classPK;
185     }
186 
187     public String getStreet1() {
188         return _street1;
189     }
190 
191     public void setStreet1(String street1) {
192         _street1 = street1;
193     }
194 
195     public String getStreet2() {
196         return _street2;
197     }
198 
199     public void setStreet2(String street2) {
200         _street2 = street2;
201     }
202 
203     public String getStreet3() {
204         return _street3;
205     }
206 
207     public void setStreet3(String street3) {
208         _street3 = street3;
209     }
210 
211     public String getCity() {
212         return _city;
213     }
214 
215     public void setCity(String city) {
216         _city = city;
217     }
218 
219     public String getZip() {
220         return _zip;
221     }
222 
223     public void setZip(String zip) {
224         _zip = zip;
225     }
226 
227     public long getRegionId() {
228         return _regionId;
229     }
230 
231     public void setRegionId(long regionId) {
232         _regionId = regionId;
233     }
234 
235     public long getCountryId() {
236         return _countryId;
237     }
238 
239     public void setCountryId(long countryId) {
240         _countryId = countryId;
241     }
242 
243     public int getTypeId() {
244         return _typeId;
245     }
246 
247     public void setTypeId(int typeId) {
248         _typeId = typeId;
249     }
250 
251     public boolean getMailing() {
252         return _mailing;
253     }
254 
255     public boolean isMailing() {
256         return _mailing;
257     }
258 
259     public void setMailing(boolean mailing) {
260         _mailing = mailing;
261     }
262 
263     public boolean getPrimary() {
264         return _primary;
265     }
266 
267     public boolean isPrimary() {
268         return _primary;
269     }
270 
271     public void setPrimary(boolean primary) {
272         _primary = primary;
273     }
274 
275     private long _addressId;
276     private long _companyId;
277     private long _userId;
278     private String _userName;
279     private Date _createDate;
280     private Date _modifiedDate;
281     private long _classNameId;
282     private long _classPK;
283     private String _street1;
284     private String _street2;
285     private String _street3;
286     private String _city;
287     private String _zip;
288     private long _regionId;
289     private long _countryId;
290     private int _typeId;
291     private boolean _mailing;
292     private boolean _primary;
293 }