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