1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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="PhoneSoap.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   * <code>com.liferay.portal.service.http.PhoneServiceSoap</code>.
42   * </p>
43   *
44   * @author Brian Wing Shun Chan
45   *
46   * @see com.liferay.portal.service.http.PhoneServiceSoap
47   *
48   */
49  public class PhoneSoap implements Serializable {
50      public static PhoneSoap toSoapModel(Phone model) {
51          PhoneSoap soapModel = new PhoneSoap();
52  
53          soapModel.setPhoneId(model.getPhoneId());
54          soapModel.setCompanyId(model.getCompanyId());
55          soapModel.setUserId(model.getUserId());
56          soapModel.setUserName(model.getUserName());
57          soapModel.setCreateDate(model.getCreateDate());
58          soapModel.setModifiedDate(model.getModifiedDate());
59          soapModel.setClassNameId(model.getClassNameId());
60          soapModel.setClassPK(model.getClassPK());
61          soapModel.setNumber(model.getNumber());
62          soapModel.setExtension(model.getExtension());
63          soapModel.setTypeId(model.getTypeId());
64          soapModel.setPrimary(model.getPrimary());
65  
66          return soapModel;
67      }
68  
69      public static PhoneSoap[] toSoapModels(Phone[] models) {
70          PhoneSoap[] soapModels = new PhoneSoap[models.length];
71  
72          for (int i = 0; i < models.length; i++) {
73              soapModels[i] = toSoapModel(models[i]);
74          }
75  
76          return soapModels;
77      }
78  
79      public static PhoneSoap[][] toSoapModels(Phone[][] models) {
80          PhoneSoap[][] soapModels = null;
81  
82          if (models.length > 0) {
83              soapModels = new PhoneSoap[models.length][models[0].length];
84          }
85          else {
86              soapModels = new PhoneSoap[0][0];
87          }
88  
89          for (int i = 0; i < models.length; i++) {
90              soapModels[i] = toSoapModels(models[i]);
91          }
92  
93          return soapModels;
94      }
95  
96      public static PhoneSoap[] toSoapModels(List<Phone> models) {
97          List<PhoneSoap> soapModels = new ArrayList<PhoneSoap>(models.size());
98  
99          for (Phone model : models) {
100             soapModels.add(toSoapModel(model));
101         }
102 
103         return soapModels.toArray(new PhoneSoap[soapModels.size()]);
104     }
105 
106     public PhoneSoap() {
107     }
108 
109     public long getPrimaryKey() {
110         return _phoneId;
111     }
112 
113     public void setPrimaryKey(long pk) {
114         setPhoneId(pk);
115     }
116 
117     public long getPhoneId() {
118         return _phoneId;
119     }
120 
121     public void setPhoneId(long phoneId) {
122         _phoneId = phoneId;
123     }
124 
125     public long getCompanyId() {
126         return _companyId;
127     }
128 
129     public void setCompanyId(long companyId) {
130         _companyId = companyId;
131     }
132 
133     public long getUserId() {
134         return _userId;
135     }
136 
137     public void setUserId(long userId) {
138         _userId = userId;
139     }
140 
141     public String getUserName() {
142         return _userName;
143     }
144 
145     public void setUserName(String userName) {
146         _userName = userName;
147     }
148 
149     public Date getCreateDate() {
150         return _createDate;
151     }
152 
153     public void setCreateDate(Date createDate) {
154         _createDate = createDate;
155     }
156 
157     public Date getModifiedDate() {
158         return _modifiedDate;
159     }
160 
161     public void setModifiedDate(Date modifiedDate) {
162         _modifiedDate = modifiedDate;
163     }
164 
165     public long getClassNameId() {
166         return _classNameId;
167     }
168 
169     public void setClassNameId(long classNameId) {
170         _classNameId = classNameId;
171     }
172 
173     public long getClassPK() {
174         return _classPK;
175     }
176 
177     public void setClassPK(long classPK) {
178         _classPK = classPK;
179     }
180 
181     public String getNumber() {
182         return _number;
183     }
184 
185     public void setNumber(String number) {
186         _number = number;
187     }
188 
189     public String getExtension() {
190         return _extension;
191     }
192 
193     public void setExtension(String extension) {
194         _extension = extension;
195     }
196 
197     public int getTypeId() {
198         return _typeId;
199     }
200 
201     public void setTypeId(int typeId) {
202         _typeId = typeId;
203     }
204 
205     public boolean getPrimary() {
206         return _primary;
207     }
208 
209     public boolean isPrimary() {
210         return _primary;
211     }
212 
213     public void setPrimary(boolean primary) {
214         _primary = primary;
215     }
216 
217     private long _phoneId;
218     private long _companyId;
219     private long _userId;
220     private String _userName;
221     private Date _createDate;
222     private Date _modifiedDate;
223     private long _classNameId;
224     private long _classPK;
225     private String _number;
226     private String _extension;
227     private int _typeId;
228     private boolean _primary;
229 }