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