001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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     * This class is used by SOAP remote services, specifically {@link com.liferay.portal.service.http.EmailAddressServiceSoap}.
025     *
026     * @author    Brian Wing Shun Chan
027     * @see       com.liferay.portal.service.http.EmailAddressServiceSoap
028     * @generated
029     */
030    public class EmailAddressSoap implements Serializable {
031            public static EmailAddressSoap toSoapModel(EmailAddress model) {
032                    EmailAddressSoap soapModel = new EmailAddressSoap();
033    
034                    soapModel.setEmailAddressId(model.getEmailAddressId());
035                    soapModel.setCompanyId(model.getCompanyId());
036                    soapModel.setUserId(model.getUserId());
037                    soapModel.setUserName(model.getUserName());
038                    soapModel.setCreateDate(model.getCreateDate());
039                    soapModel.setModifiedDate(model.getModifiedDate());
040                    soapModel.setClassNameId(model.getClassNameId());
041                    soapModel.setClassPK(model.getClassPK());
042                    soapModel.setAddress(model.getAddress());
043                    soapModel.setTypeId(model.getTypeId());
044                    soapModel.setPrimary(model.getPrimary());
045    
046                    return soapModel;
047            }
048    
049            public static EmailAddressSoap[] toSoapModels(EmailAddress[] models) {
050                    EmailAddressSoap[] soapModels = new EmailAddressSoap[models.length];
051    
052                    for (int i = 0; i < models.length; i++) {
053                            soapModels[i] = toSoapModel(models[i]);
054                    }
055    
056                    return soapModels;
057            }
058    
059            public static EmailAddressSoap[][] toSoapModels(EmailAddress[][] models) {
060                    EmailAddressSoap[][] soapModels = null;
061    
062                    if (models.length > 0) {
063                            soapModels = new EmailAddressSoap[models.length][models[0].length];
064                    }
065                    else {
066                            soapModels = new EmailAddressSoap[0][0];
067                    }
068    
069                    for (int i = 0; i < models.length; i++) {
070                            soapModels[i] = toSoapModels(models[i]);
071                    }
072    
073                    return soapModels;
074            }
075    
076            public static EmailAddressSoap[] toSoapModels(List<EmailAddress> models) {
077                    List<EmailAddressSoap> soapModels = new ArrayList<EmailAddressSoap>(models.size());
078    
079                    for (EmailAddress model : models) {
080                            soapModels.add(toSoapModel(model));
081                    }
082    
083                    return soapModels.toArray(new EmailAddressSoap[soapModels.size()]);
084            }
085    
086            public EmailAddressSoap() {
087            }
088    
089            public long getPrimaryKey() {
090                    return _emailAddressId;
091            }
092    
093            public void setPrimaryKey(long pk) {
094                    setEmailAddressId(pk);
095            }
096    
097            public long getEmailAddressId() {
098                    return _emailAddressId;
099            }
100    
101            public void setEmailAddressId(long emailAddressId) {
102                    _emailAddressId = emailAddressId;
103            }
104    
105            public long getCompanyId() {
106                    return _companyId;
107            }
108    
109            public void setCompanyId(long companyId) {
110                    _companyId = companyId;
111            }
112    
113            public long getUserId() {
114                    return _userId;
115            }
116    
117            public void setUserId(long userId) {
118                    _userId = userId;
119            }
120    
121            public String getUserName() {
122                    return _userName;
123            }
124    
125            public void setUserName(String userName) {
126                    _userName = userName;
127            }
128    
129            public Date getCreateDate() {
130                    return _createDate;
131            }
132    
133            public void setCreateDate(Date createDate) {
134                    _createDate = createDate;
135            }
136    
137            public Date getModifiedDate() {
138                    return _modifiedDate;
139            }
140    
141            public void setModifiedDate(Date modifiedDate) {
142                    _modifiedDate = modifiedDate;
143            }
144    
145            public long getClassNameId() {
146                    return _classNameId;
147            }
148    
149            public void setClassNameId(long classNameId) {
150                    _classNameId = classNameId;
151            }
152    
153            public long getClassPK() {
154                    return _classPK;
155            }
156    
157            public void setClassPK(long classPK) {
158                    _classPK = classPK;
159            }
160    
161            public String getAddress() {
162                    return _address;
163            }
164    
165            public void setAddress(String address) {
166                    _address = address;
167            }
168    
169            public int getTypeId() {
170                    return _typeId;
171            }
172    
173            public void setTypeId(int typeId) {
174                    _typeId = typeId;
175            }
176    
177            public boolean getPrimary() {
178                    return _primary;
179            }
180    
181            public boolean isPrimary() {
182                    return _primary;
183            }
184    
185            public void setPrimary(boolean primary) {
186                    _primary = primary;
187            }
188    
189            private long _emailAddressId;
190            private long _companyId;
191            private long _userId;
192            private String _userName;
193            private Date _createDate;
194            private Date _modifiedDate;
195            private long _classNameId;
196            private long _classPK;
197            private String _address;
198            private int _typeId;
199            private boolean _primary;
200    }