1   /**
2    * Copyright (c) 2000-2008 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(List models) {
70          List soapModels = new ArrayList(models.size());
71  
72          for (int i = 0; i < models.size(); i++) {
73              Phone model = (Phone)models.get(i);
74  
75              soapModels.add(toSoapModel(model));
76          }
77  
78          return (PhoneSoap[])soapModels.toArray(new PhoneSoap[0]);
79      }
80  
81      public PhoneSoap() {
82      }
83  
84      public long getPrimaryKey() {
85          return _phoneId;
86      }
87  
88      public void setPrimaryKey(long pk) {
89          setPhoneId(pk);
90      }
91  
92      public long getPhoneId() {
93          return _phoneId;
94      }
95  
96      public void setPhoneId(long phoneId) {
97          _phoneId = phoneId;
98      }
99  
100     public long getCompanyId() {
101         return _companyId;
102     }
103 
104     public void setCompanyId(long companyId) {
105         _companyId = companyId;
106     }
107 
108     public long getUserId() {
109         return _userId;
110     }
111 
112     public void setUserId(long userId) {
113         _userId = userId;
114     }
115 
116     public String getUserName() {
117         return _userName;
118     }
119 
120     public void setUserName(String userName) {
121         _userName = userName;
122     }
123 
124     public Date getCreateDate() {
125         return _createDate;
126     }
127 
128     public void setCreateDate(Date createDate) {
129         _createDate = createDate;
130     }
131 
132     public Date getModifiedDate() {
133         return _modifiedDate;
134     }
135 
136     public void setModifiedDate(Date modifiedDate) {
137         _modifiedDate = modifiedDate;
138     }
139 
140     public long getClassNameId() {
141         return _classNameId;
142     }
143 
144     public void setClassNameId(long classNameId) {
145         _classNameId = classNameId;
146     }
147 
148     public long getClassPK() {
149         return _classPK;
150     }
151 
152     public void setClassPK(long classPK) {
153         _classPK = classPK;
154     }
155 
156     public String getNumber() {
157         return _number;
158     }
159 
160     public void setNumber(String number) {
161         _number = number;
162     }
163 
164     public String getExtension() {
165         return _extension;
166     }
167 
168     public void setExtension(String extension) {
169         _extension = extension;
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 _phoneId;
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 _number;
201     private String _extension;
202     private int _typeId;
203     private boolean _primary;
204 }