1
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
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 }