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