1   /**
2    * Copyright (c) 2000-2008 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(List models) {
76          List soapModels = new ArrayList(models.size());
77  
78          for (int i = 0; i < models.size(); i++) {
79              Address model = (Address)models.get(i);
80  
81              soapModels.add(toSoapModel(model));
82          }
83  
84          return (AddressSoap[])soapModels.toArray(new AddressSoap[0]);
85      }
86  
87      public AddressSoap() {
88      }
89  
90      public long getPrimaryKey() {
91          return _addressId;
92      }
93  
94      public void setPrimaryKey(long pk) {
95          setAddressId(pk);
96      }
97  
98      public long getAddressId() {
99          return _addressId;
100     }
101 
102     public void setAddressId(long addressId) {
103         _addressId = addressId;
104     }
105 
106     public long getCompanyId() {
107         return _companyId;
108     }
109 
110     public void setCompanyId(long companyId) {
111         _companyId = companyId;
112     }
113 
114     public long getUserId() {
115         return _userId;
116     }
117 
118     public void setUserId(long userId) {
119         _userId = userId;
120     }
121 
122     public String getUserName() {
123         return _userName;
124     }
125 
126     public void setUserName(String userName) {
127         _userName = userName;
128     }
129 
130     public Date getCreateDate() {
131         return _createDate;
132     }
133 
134     public void setCreateDate(Date createDate) {
135         _createDate = createDate;
136     }
137 
138     public Date getModifiedDate() {
139         return _modifiedDate;
140     }
141 
142     public void setModifiedDate(Date modifiedDate) {
143         _modifiedDate = modifiedDate;
144     }
145 
146     public long getClassNameId() {
147         return _classNameId;
148     }
149 
150     public void setClassNameId(long classNameId) {
151         _classNameId = classNameId;
152     }
153 
154     public long getClassPK() {
155         return _classPK;
156     }
157 
158     public void setClassPK(long classPK) {
159         _classPK = classPK;
160     }
161 
162     public String getStreet1() {
163         return _street1;
164     }
165 
166     public void setStreet1(String street1) {
167         _street1 = street1;
168     }
169 
170     public String getStreet2() {
171         return _street2;
172     }
173 
174     public void setStreet2(String street2) {
175         _street2 = street2;
176     }
177 
178     public String getStreet3() {
179         return _street3;
180     }
181 
182     public void setStreet3(String street3) {
183         _street3 = street3;
184     }
185 
186     public String getCity() {
187         return _city;
188     }
189 
190     public void setCity(String city) {
191         _city = city;
192     }
193 
194     public String getZip() {
195         return _zip;
196     }
197 
198     public void setZip(String zip) {
199         _zip = zip;
200     }
201 
202     public long getRegionId() {
203         return _regionId;
204     }
205 
206     public void setRegionId(long regionId) {
207         _regionId = regionId;
208     }
209 
210     public long getCountryId() {
211         return _countryId;
212     }
213 
214     public void setCountryId(long countryId) {
215         _countryId = countryId;
216     }
217 
218     public int getTypeId() {
219         return _typeId;
220     }
221 
222     public void setTypeId(int typeId) {
223         _typeId = typeId;
224     }
225 
226     public boolean getMailing() {
227         return _mailing;
228     }
229 
230     public boolean isMailing() {
231         return _mailing;
232     }
233 
234     public void setMailing(boolean mailing) {
235         _mailing = mailing;
236     }
237 
238     public boolean getPrimary() {
239         return _primary;
240     }
241 
242     public boolean isPrimary() {
243         return _primary;
244     }
245 
246     public void setPrimary(boolean primary) {
247         _primary = primary;
248     }
249 
250     private long _addressId;
251     private long _companyId;
252     private long _userId;
253     private String _userName;
254     private Date _createDate;
255     private Date _modifiedDate;
256     private long _classNameId;
257     private long _classPK;
258     private String _street1;
259     private String _street2;
260     private String _street3;
261     private String _city;
262     private String _zip;
263     private long _regionId;
264     private long _countryId;
265     private int _typeId;
266     private boolean _mailing;
267     private boolean _primary;
268 }