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