1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.shopping.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.Date;
21  import java.util.List;
22  
23  /**
24   * <a href="ShoppingCategorySoap.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class is used by
33   * {@link com.liferay.portlet.shopping.service.http.ShoppingCategoryServiceSoap}.
34   * </p>
35   *
36   * @author    Brian Wing Shun Chan
37   * @see       com.liferay.portlet.shopping.service.http.ShoppingCategoryServiceSoap
38   * @generated
39   */
40  public class ShoppingCategorySoap implements Serializable {
41      public static ShoppingCategorySoap toSoapModel(ShoppingCategory model) {
42          ShoppingCategorySoap soapModel = new ShoppingCategorySoap();
43  
44          soapModel.setCategoryId(model.getCategoryId());
45          soapModel.setGroupId(model.getGroupId());
46          soapModel.setCompanyId(model.getCompanyId());
47          soapModel.setUserId(model.getUserId());
48          soapModel.setUserName(model.getUserName());
49          soapModel.setCreateDate(model.getCreateDate());
50          soapModel.setModifiedDate(model.getModifiedDate());
51          soapModel.setParentCategoryId(model.getParentCategoryId());
52          soapModel.setName(model.getName());
53          soapModel.setDescription(model.getDescription());
54  
55          return soapModel;
56      }
57  
58      public static ShoppingCategorySoap[] toSoapModels(ShoppingCategory[] models) {
59          ShoppingCategorySoap[] soapModels = new ShoppingCategorySoap[models.length];
60  
61          for (int i = 0; i < models.length; i++) {
62              soapModels[i] = toSoapModel(models[i]);
63          }
64  
65          return soapModels;
66      }
67  
68      public static ShoppingCategorySoap[][] toSoapModels(
69          ShoppingCategory[][] models) {
70          ShoppingCategorySoap[][] soapModels = null;
71  
72          if (models.length > 0) {
73              soapModels = new ShoppingCategorySoap[models.length][models[0].length];
74          }
75          else {
76              soapModels = new ShoppingCategorySoap[0][0];
77          }
78  
79          for (int i = 0; i < models.length; i++) {
80              soapModels[i] = toSoapModels(models[i]);
81          }
82  
83          return soapModels;
84      }
85  
86      public static ShoppingCategorySoap[] toSoapModels(
87          List<ShoppingCategory> models) {
88          List<ShoppingCategorySoap> soapModels = new ArrayList<ShoppingCategorySoap>(models.size());
89  
90          for (ShoppingCategory model : models) {
91              soapModels.add(toSoapModel(model));
92          }
93  
94          return soapModels.toArray(new ShoppingCategorySoap[soapModels.size()]);
95      }
96  
97      public ShoppingCategorySoap() {
98      }
99  
100     public long getPrimaryKey() {
101         return _categoryId;
102     }
103 
104     public void setPrimaryKey(long pk) {
105         setCategoryId(pk);
106     }
107 
108     public long getCategoryId() {
109         return _categoryId;
110     }
111 
112     public void setCategoryId(long categoryId) {
113         _categoryId = categoryId;
114     }
115 
116     public long getGroupId() {
117         return _groupId;
118     }
119 
120     public void setGroupId(long groupId) {
121         _groupId = groupId;
122     }
123 
124     public long getCompanyId() {
125         return _companyId;
126     }
127 
128     public void setCompanyId(long companyId) {
129         _companyId = companyId;
130     }
131 
132     public long getUserId() {
133         return _userId;
134     }
135 
136     public void setUserId(long userId) {
137         _userId = userId;
138     }
139 
140     public String getUserName() {
141         return _userName;
142     }
143 
144     public void setUserName(String userName) {
145         _userName = userName;
146     }
147 
148     public Date getCreateDate() {
149         return _createDate;
150     }
151 
152     public void setCreateDate(Date createDate) {
153         _createDate = createDate;
154     }
155 
156     public Date getModifiedDate() {
157         return _modifiedDate;
158     }
159 
160     public void setModifiedDate(Date modifiedDate) {
161         _modifiedDate = modifiedDate;
162     }
163 
164     public long getParentCategoryId() {
165         return _parentCategoryId;
166     }
167 
168     public void setParentCategoryId(long parentCategoryId) {
169         _parentCategoryId = parentCategoryId;
170     }
171 
172     public String getName() {
173         return _name;
174     }
175 
176     public void setName(String name) {
177         _name = name;
178     }
179 
180     public String getDescription() {
181         return _description;
182     }
183 
184     public void setDescription(String description) {
185         _description = description;
186     }
187 
188     private long _categoryId;
189     private long _groupId;
190     private long _companyId;
191     private long _userId;
192     private String _userName;
193     private Date _createDate;
194     private Date _modifiedDate;
195     private long _parentCategoryId;
196     private String _name;
197     private String _description;
198 }