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.EmailAddressServiceSoap}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       com.liferay.portal.service.http.EmailAddressServiceSoap
031     * @generated
032     */
033    public class EmailAddressSoap implements Serializable {
034            public static EmailAddressSoap toSoapModel(EmailAddress model) {
035                    EmailAddressSoap soapModel = new EmailAddressSoap();
036    
037                    soapModel.setEmailAddressId(model.getEmailAddressId());
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.setAddress(model.getAddress());
046                    soapModel.setTypeId(model.getTypeId());
047                    soapModel.setPrimary(model.getPrimary());
048    
049                    return soapModel;
050            }
051    
052            public static EmailAddressSoap[] toSoapModels(EmailAddress[] models) {
053                    EmailAddressSoap[] soapModels = new EmailAddressSoap[models.length];
054    
055                    for (int i = 0; i < models.length; i++) {
056                            soapModels[i] = toSoapModel(models[i]);
057                    }
058    
059                    return soapModels;
060            }
061    
062            public static EmailAddressSoap[][] toSoapModels(EmailAddress[][] models) {
063                    EmailAddressSoap[][] soapModels = null;
064    
065                    if (models.length > 0) {
066                            soapModels = new EmailAddressSoap[models.length][models[0].length];
067                    }
068                    else {
069                            soapModels = new EmailAddressSoap[0][0];
070                    }
071    
072                    for (int i = 0; i < models.length; i++) {
073                            soapModels[i] = toSoapModels(models[i]);
074                    }
075    
076                    return soapModels;
077            }
078    
079            public static EmailAddressSoap[] toSoapModels(List<EmailAddress> models) {
080                    List<EmailAddressSoap> soapModels = new ArrayList<EmailAddressSoap>(models.size());
081    
082                    for (EmailAddress model : models) {
083                            soapModels.add(toSoapModel(model));
084                    }
085    
086                    return soapModels.toArray(new EmailAddressSoap[soapModels.size()]);
087            }
088    
089            public EmailAddressSoap() {
090            }
091    
092            public long getPrimaryKey() {
093                    return _emailAddressId;
094            }
095    
096            public void setPrimaryKey(long pk) {
097                    setEmailAddressId(pk);
098            }
099    
100            public long getEmailAddressId() {
101                    return _emailAddressId;
102            }
103    
104            public void setEmailAddressId(long emailAddressId) {
105                    _emailAddressId = emailAddressId;
106            }
107    
108            public long getCompanyId() {
109                    return _companyId;
110            }
111    
112            public void setCompanyId(long companyId) {
113                    _companyId = companyId;
114            }
115    
116            public long getUserId() {
117                    return _userId;
118            }
119    
120            public void setUserId(long userId) {
121                    _userId = userId;
122            }
123    
124            public String getUserName() {
125                    return _userName;
126            }
127    
128            public void setUserName(String userName) {
129                    _userName = userName;
130            }
131    
132            public Date getCreateDate() {
133                    return _createDate;
134            }
135    
136            public void setCreateDate(Date createDate) {
137                    _createDate = createDate;
138            }
139    
140            public Date getModifiedDate() {
141                    return _modifiedDate;
142            }
143    
144            public void setModifiedDate(Date modifiedDate) {
145                    _modifiedDate = modifiedDate;
146            }
147    
148            public long getClassNameId() {
149                    return _classNameId;
150            }
151    
152            public void setClassNameId(long classNameId) {
153                    _classNameId = classNameId;
154            }
155    
156            public long getClassPK() {
157                    return _classPK;
158            }
159    
160            public void setClassPK(long classPK) {
161                    _classPK = classPK;
162            }
163    
164            public String getAddress() {
165                    return _address;
166            }
167    
168            public void setAddress(String address) {
169                    _address = address;
170            }
171    
172            public int getTypeId() {
173                    return _typeId;
174            }
175    
176            public void setTypeId(int typeId) {
177                    _typeId = typeId;
178            }
179    
180            public boolean getPrimary() {
181                    return _primary;
182            }
183    
184            public boolean isPrimary() {
185                    return _primary;
186            }
187    
188            public void setPrimary(boolean primary) {
189                    _primary = primary;
190            }
191    
192            private long _emailAddressId;
193            private long _companyId;
194            private long _userId;
195            private String _userName;
196            private Date _createDate;
197            private Date _modifiedDate;
198            private long _classNameId;
199            private long _classPK;
200            private String _address;
201            private int _typeId;
202            private boolean _primary;
203    }