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(
65          List<ShoppingCategory> models) {
66          List<ShoppingCategorySoap> soapModels = new ArrayList<ShoppingCategorySoap>(models.size());
67  
68          for (ShoppingCategory model : models) {
69              soapModels.add(toSoapModel(model));
70          }
71  
72          return soapModels.toArray(new ShoppingCategorySoap[soapModels.size()]);
73      }
74  
75      public ShoppingCategorySoap() {
76      }
77  
78      public long getPrimaryKey() {
79          return _categoryId;
80      }
81  
82      public void setPrimaryKey(long pk) {
83          setCategoryId(pk);
84      }
85  
86      public long getCategoryId() {
87          return _categoryId;
88      }
89  
90      public void setCategoryId(long categoryId) {
91          _categoryId = categoryId;
92      }
93  
94      public long getGroupId() {
95          return _groupId;
96      }
97  
98      public void setGroupId(long groupId) {
99          _groupId = groupId;
100     }
101 
102     public long getCompanyId() {
103         return _companyId;
104     }
105 
106     public void setCompanyId(long companyId) {
107         _companyId = companyId;
108     }
109 
110     public long getUserId() {
111         return _userId;
112     }
113 
114     public void setUserId(long userId) {
115         _userId = userId;
116     }
117 
118     public String getUserName() {
119         return _userName;
120     }
121 
122     public void setUserName(String userName) {
123         _userName = userName;
124     }
125 
126     public Date getCreateDate() {
127         return _createDate;
128     }
129 
130     public void setCreateDate(Date createDate) {
131         _createDate = createDate;
132     }
133 
134     public Date getModifiedDate() {
135         return _modifiedDate;
136     }
137 
138     public void setModifiedDate(Date modifiedDate) {
139         _modifiedDate = modifiedDate;
140     }
141 
142     public long getParentCategoryId() {
143         return _parentCategoryId;
144     }
145 
146     public void setParentCategoryId(long parentCategoryId) {
147         _parentCategoryId = parentCategoryId;
148     }
149 
150     public String getName() {
151         return _name;
152     }
153 
154     public void setName(String name) {
155         _name = name;
156     }
157 
158     public String getDescription() {
159         return _description;
160     }
161 
162     public void setDescription(String description) {
163         _description = description;
164     }
165 
166     private long _categoryId;
167     private long _groupId;
168     private long _companyId;
169     private long _userId;
170     private String _userName;
171     private Date _createDate;
172     private Date _modifiedDate;
173     private long _parentCategoryId;
174     private String _name;
175     private String _description;
176 }