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.portlet.shopping.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="ShoppingCategorySoap.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.portlet.shopping.service.http.ShoppingCategoryServiceSoap}.
42   * </p>
43   *
44   * @author    Brian Wing Shun Chan
45   * @see       com.liferay.portlet.shopping.service.http.ShoppingCategoryServiceSoap
46   * @generated
47   */
48  public class ShoppingCategorySoap implements Serializable {
49      public static ShoppingCategorySoap toSoapModel(ShoppingCategory model) {
50          ShoppingCategorySoap soapModel = new ShoppingCategorySoap();
51  
52          soapModel.setCategoryId(model.getCategoryId());
53          soapModel.setGroupId(model.getGroupId());
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.setParentCategoryId(model.getParentCategoryId());
60          soapModel.setName(model.getName());
61          soapModel.setDescription(model.getDescription());
62  
63          return soapModel;
64      }
65  
66      public static ShoppingCategorySoap[] toSoapModels(ShoppingCategory[] models) {
67          ShoppingCategorySoap[] soapModels = new ShoppingCategorySoap[models.length];
68  
69          for (int i = 0; i < models.length; i++) {
70              soapModels[i] = toSoapModel(models[i]);
71          }
72  
73          return soapModels;
74      }
75  
76      public static ShoppingCategorySoap[][] toSoapModels(
77          ShoppingCategory[][] models) {
78          ShoppingCategorySoap[][] soapModels = null;
79  
80          if (models.length > 0) {
81              soapModels = new ShoppingCategorySoap[models.length][models[0].length];
82          }
83          else {
84              soapModels = new ShoppingCategorySoap[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 ShoppingCategorySoap[] toSoapModels(
95          List<ShoppingCategory> models) {
96          List<ShoppingCategorySoap> soapModels = new ArrayList<ShoppingCategorySoap>(models.size());
97  
98          for (ShoppingCategory model : models) {
99              soapModels.add(toSoapModel(model));
100         }
101 
102         return soapModels.toArray(new ShoppingCategorySoap[soapModels.size()]);
103     }
104 
105     public ShoppingCategorySoap() {
106     }
107 
108     public long getPrimaryKey() {
109         return _categoryId;
110     }
111 
112     public void setPrimaryKey(long pk) {
113         setCategoryId(pk);
114     }
115 
116     public long getCategoryId() {
117         return _categoryId;
118     }
119 
120     public void setCategoryId(long categoryId) {
121         _categoryId = categoryId;
122     }
123 
124     public long getGroupId() {
125         return _groupId;
126     }
127 
128     public void setGroupId(long groupId) {
129         _groupId = groupId;
130     }
131 
132     public long getCompanyId() {
133         return _companyId;
134     }
135 
136     public void setCompanyId(long companyId) {
137         _companyId = companyId;
138     }
139 
140     public long getUserId() {
141         return _userId;
142     }
143 
144     public void setUserId(long userId) {
145         _userId = userId;
146     }
147 
148     public String getUserName() {
149         return _userName;
150     }
151 
152     public void setUserName(String userName) {
153         _userName = userName;
154     }
155 
156     public Date getCreateDate() {
157         return _createDate;
158     }
159 
160     public void setCreateDate(Date createDate) {
161         _createDate = createDate;
162     }
163 
164     public Date getModifiedDate() {
165         return _modifiedDate;
166     }
167 
168     public void setModifiedDate(Date modifiedDate) {
169         _modifiedDate = modifiedDate;
170     }
171 
172     public long getParentCategoryId() {
173         return _parentCategoryId;
174     }
175 
176     public void setParentCategoryId(long parentCategoryId) {
177         _parentCategoryId = parentCategoryId;
178     }
179 
180     public String getName() {
181         return _name;
182     }
183 
184     public void setName(String name) {
185         _name = name;
186     }
187 
188     public String getDescription() {
189         return _description;
190     }
191 
192     public void setDescription(String description) {
193         _description = description;
194     }
195 
196     private long _categoryId;
197     private long _groupId;
198     private long _companyId;
199     private long _userId;
200     private String _userName;
201     private Date _createDate;
202     private Date _modifiedDate;
203     private long _parentCategoryId;
204     private String _name;
205     private String _description;
206 }