001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.model;
016    
017    import java.io.Serializable;
018    
019    import java.util.ArrayList;
020    import java.util.Date;
021    import java.util.List;
022    
023    /**
024     * <p>
025     * This class is used by
026     * {@link com.liferay.portal.service.http.AddressServiceSoap}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       com.liferay.portal.service.http.AddressServiceSoap
031     * @generated
032     */
033    public class AddressSoap implements Serializable {
034            public static AddressSoap toSoapModel(Address model) {
035                    AddressSoap soapModel = new AddressSoap();
036    
037                    soapModel.setAddressId(model.getAddressId());
038                    soapModel.setCompanyId(model.getCompanyId());
039                    soapModel.setUserId(model.getUserId());
040                    soapModel.setUserName(model.getUserName());
041                    soapModel.setCreateDate(model.getCreateDate());
042                    soapModel.setModifiedDate(model.getModifiedDate());
043                    soapModel.setClassNameId(model.getClassNameId());
044                    soapModel.setClassPK(model.getClassPK());
045                    soapModel.setStreet1(model.getStreet1());
046                    soapModel.setStreet2(model.getStreet2());
047                    soapModel.setStreet3(model.getStreet3());
048                    soapModel.setCity(model.getCity());
049                    soapModel.setZip(model.getZip());
050                    soapModel.setRegionId(model.getRegionId());
051                    soapModel.setCountryId(model.getCountryId());
052                    soapModel.setTypeId(model.getTypeId());
053                    soapModel.setMailing(model.getMailing());
054                    soapModel.setPrimary(model.getPrimary());
055    
056                    return soapModel;
057            }
058    
059            public static AddressSoap[] toSoapModels(Address[] models) {
060                    AddressSoap[] soapModels = new AddressSoap[models.length];
061    
062                    for (int i = 0; i < models.length; i++) {
063                            soapModels[i] = toSoapModel(models[i]);
064                    }
065    
066                    return soapModels;
067            }
068    
069            public static AddressSoap[][] toSoapModels(Address[][] models) {
070                    AddressSoap[][] soapModels = null;
071    
072                    if (models.length > 0) {
073                            soapModels = new AddressSoap[models.length][models[0].length];
074                    }
075                    else {
076                            soapModels = new AddressSoap[0][0];
077                    }
078    
079                    for (int i = 0; i < models.length; i++) {
080                            soapModels[i] = toSoapModels(models[i]);
081                    }
082    
083                    return soapModels;
084            }
085    
086            public static AddressSoap[] toSoapModels(List<Address> models) {
087                    List<AddressSoap> soapModels = new ArrayList<AddressSoap>(models.size());
088    
089                    for (Address model : models) {
090                            soapModels.add(toSoapModel(model));
091                    }
092    
093                    return soapModels.toArray(new AddressSoap[soapModels.size()]);
094            }
095    
096            public AddressSoap() {
097            }
098    
099            public long getPrimaryKey() {
100                    return _addressId;
101            }
102    
103            public void setPrimaryKey(long pk) {
104                    setAddressId(pk);
105            }
106    
107            public long getAddressId() {
108                    return _addressId;
109            }
110    
111            public void setAddressId(long addressId) {
112                    _addressId = addressId;
113            }
114    
115            public long getCompanyId() {
116                    return _companyId;
117            }
118    
119            public void setCompanyId(long companyId) {
120                    _companyId = companyId;
121            }
122    
123            public long getUserId() {
124                    return _userId;
125            }
126    
127            public void setUserId(long userId) {
128                    _userId = userId;
129            }
130    
131            public String getUserName() {
132                    return _userName;
133            }
134    
135            public void setUserName(String userName) {
136                    _userName = userName;
137            }
138    
139            public Date getCreateDate() {
140                    return _createDate;
141            }
142    
143            public void setCreateDate(Date createDate) {
144                    _createDate = createDate;
145            }
146    
147            public Date getModifiedDate() {
148                    return _modifiedDate;
149            }
150    
151            public void setModifiedDate(Date modifiedDate) {
152                    _modifiedDate = modifiedDate;
153            }
154    
155            public long getClassNameId() {
156                    return _classNameId;
157            }
158    
159            public void setClassNameId(long classNameId) {
160                    _classNameId = classNameId;
161            }
162    
163            public long getClassPK() {
164                    return _classPK;
165            }
166    
167            public void setClassPK(long classPK) {
168                    _classPK = classPK;
169            }
170    
171            public String getStreet1() {
172                    return _street1;
173            }
174    
175            public void setStreet1(String street1) {
176                    _street1 = street1;
177            }
178    
179            public String getStreet2() {
180                    return _street2;
181            }
182    
183            public void setStreet2(String street2) {
184                    _street2 = street2;
185            }
186    
187            public String getStreet3() {
188                    return _street3;
189            }
190    
191            public void setStreet3(String street3) {
192                    _street3 = street3;
193            }
194    
195            public String getCity() {
196                    return _city;
197            }
198    
199            public void setCity(String city) {
200                    _city = city;
201            }
202    
203            public String getZip() {
204                    return _zip;
205            }
206    
207            public void setZip(String zip) {
208                    _zip = zip;
209            }
210    
211            public long getRegionId() {
212                    return _regionId;
213            }
214    
215            public void setRegionId(long regionId) {
216                    _regionId = regionId;
217            }
218    
219            public long getCountryId() {
220                    return _countryId;
221            }
222    
223            public void setCountryId(long countryId) {
224                    _countryId = countryId;
225            }
226    
227            public int getTypeId() {
228                    return _typeId;
229            }
230    
231            public void setTypeId(int typeId) {
232                    _typeId = typeId;
233            }
234    
235            public boolean getMailing() {
236                    return _mailing;
237            }
238    
239            public boolean isMailing() {
240                    return _mailing;
241            }
242    
243            public void setMailing(boolean mailing) {
244                    _mailing = mailing;
245            }
246    
247            public boolean getPrimary() {
248                    return _primary;
249            }
250    
251            public boolean isPrimary() {
252                    return _primary;
253            }
254    
255            public void setPrimary(boolean primary) {
256                    _primary = primary;
257            }
258    
259            private long _addressId;
260            private long _companyId;
261            private long _userId;
262            private String _userName;
263            private Date _createDate;
264            private Date _modifiedDate;
265            private long _classNameId;
266            private long _classPK;
267            private String _street1;
268            private String _street2;
269            private String _street3;
270            private String _city;
271            private String _zip;
272            private long _regionId;
273            private long _countryId;
274            private int _typeId;
275            private boolean _mailing;
276            private boolean _primary;
277    }