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