1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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="EmailAddressSoap.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This class is used by
41   * {@link com.liferay.portal.service.http.EmailAddressServiceSoap}.
42   * </p>
43   *
44   * @author    Brian Wing Shun Chan
45   * @see       com.liferay.portal.service.http.EmailAddressServiceSoap
46   * @generated
47   */
48  public class EmailAddressSoap implements Serializable {
49      public static EmailAddressSoap toSoapModel(EmailAddress model) {
50          EmailAddressSoap soapModel = new EmailAddressSoap();
51  
52          soapModel.setEmailAddressId(model.getEmailAddressId());
53          soapModel.setCompanyId(model.getCompanyId());
54          soapModel.setUserId(model.getUserId());
55          soapModel.setUserName(model.getUserName());
56          soapModel.setCreateDate(model.getCreateDate());
57          soapModel.setModifiedDate(model.getModifiedDate());
58          soapModel.setClassNameId(model.getClassNameId());
59          soapModel.setClassPK(model.getClassPK());
60          soapModel.setAddress(model.getAddress());
61          soapModel.setTypeId(model.getTypeId());
62          soapModel.setPrimary(model.getPrimary());
63  
64          return soapModel;
65      }
66  
67      public static EmailAddressSoap[] toSoapModels(EmailAddress[] models) {
68          EmailAddressSoap[] soapModels = new EmailAddressSoap[models.length];
69  
70          for (int i = 0; i < models.length; i++) {
71              soapModels[i] = toSoapModel(models[i]);
72          }
73  
74          return soapModels;
75      }
76  
77      public static EmailAddressSoap[][] toSoapModels(EmailAddress[][] models) {
78          EmailAddressSoap[][] soapModels = null;
79  
80          if (models.length > 0) {
81              soapModels = new EmailAddressSoap[models.length][models[0].length];
82          }
83          else {
84              soapModels = new EmailAddressSoap[0][0];
85          }
86  
87          for (int i = 0; i < models.length; i++) {
88              soapModels[i] = toSoapModels(models[i]);
89          }
90  
91          return soapModels;
92      }
93  
94      public static EmailAddressSoap[] toSoapModels(List<EmailAddress> models) {
95          List<EmailAddressSoap> soapModels = new ArrayList<EmailAddressSoap>(models.size());
96  
97          for (EmailAddress model : models) {
98              soapModels.add(toSoapModel(model));
99          }
100 
101         return soapModels.toArray(new EmailAddressSoap[soapModels.size()]);
102     }
103 
104     public EmailAddressSoap() {
105     }
106 
107     public long getPrimaryKey() {
108         return _emailAddressId;
109     }
110 
111     public void setPrimaryKey(long pk) {
112         setEmailAddressId(pk);
113     }
114 
115     public long getEmailAddressId() {
116         return _emailAddressId;
117     }
118 
119     public void setEmailAddressId(long emailAddressId) {
120         _emailAddressId = emailAddressId;
121     }
122 
123     public long getCompanyId() {
124         return _companyId;
125     }
126 
127     public void setCompanyId(long companyId) {
128         _companyId = companyId;
129     }
130 
131     public long getUserId() {
132         return _userId;
133     }
134 
135     public void setUserId(long userId) {
136         _userId = userId;
137     }
138 
139     public String getUserName() {
140         return _userName;
141     }
142 
143     public void setUserName(String userName) {
144         _userName = userName;
145     }
146 
147     public Date getCreateDate() {
148         return _createDate;
149     }
150 
151     public void setCreateDate(Date createDate) {
152         _createDate = createDate;
153     }
154 
155     public Date getModifiedDate() {
156         return _modifiedDate;
157     }
158 
159     public void setModifiedDate(Date modifiedDate) {
160         _modifiedDate = modifiedDate;
161     }
162 
163     public long getClassNameId() {
164         return _classNameId;
165     }
166 
167     public void setClassNameId(long classNameId) {
168         _classNameId = classNameId;
169     }
170 
171     public long getClassPK() {
172         return _classPK;
173     }
174 
175     public void setClassPK(long classPK) {
176         _classPK = classPK;
177     }
178 
179     public String getAddress() {
180         return _address;
181     }
182 
183     public void setAddress(String address) {
184         _address = address;
185     }
186 
187     public int getTypeId() {
188         return _typeId;
189     }
190 
191     public void setTypeId(int typeId) {
192         _typeId = typeId;
193     }
194 
195     public boolean getPrimary() {
196         return _primary;
197     }
198 
199     public boolean isPrimary() {
200         return _primary;
201     }
202 
203     public void setPrimary(boolean primary) {
204         _primary = primary;
205     }
206 
207     private long _emailAddressId;
208     private long _companyId;
209     private long _userId;
210     private String _userName;
211     private Date _createDate;
212     private Date _modifiedDate;
213     private long _classNameId;
214     private long _classPK;
215     private String _address;
216     private int _typeId;
217     private boolean _primary;
218 }