001
014
015 package com.liferay.portlet.shopping.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class ShoppingCategoryWrapper implements ShoppingCategory,
034 ModelWrapper<ShoppingCategory> {
035 public ShoppingCategoryWrapper(ShoppingCategory shoppingCategory) {
036 _shoppingCategory = shoppingCategory;
037 }
038
039 public Class<?> getModelClass() {
040 return ShoppingCategory.class;
041 }
042
043 public String getModelClassName() {
044 return ShoppingCategory.class.getName();
045 }
046
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("categoryId", getCategoryId());
051 attributes.put("groupId", getGroupId());
052 attributes.put("companyId", getCompanyId());
053 attributes.put("userId", getUserId());
054 attributes.put("userName", getUserName());
055 attributes.put("createDate", getCreateDate());
056 attributes.put("modifiedDate", getModifiedDate());
057 attributes.put("parentCategoryId", getParentCategoryId());
058 attributes.put("name", getName());
059 attributes.put("description", getDescription());
060
061 return attributes;
062 }
063
064 public void setModelAttributes(Map<String, Object> attributes) {
065 Long categoryId = (Long)attributes.get("categoryId");
066
067 if (categoryId != null) {
068 setCategoryId(categoryId);
069 }
070
071 Long groupId = (Long)attributes.get("groupId");
072
073 if (groupId != null) {
074 setGroupId(groupId);
075 }
076
077 Long companyId = (Long)attributes.get("companyId");
078
079 if (companyId != null) {
080 setCompanyId(companyId);
081 }
082
083 Long userId = (Long)attributes.get("userId");
084
085 if (userId != null) {
086 setUserId(userId);
087 }
088
089 String userName = (String)attributes.get("userName");
090
091 if (userName != null) {
092 setUserName(userName);
093 }
094
095 Date createDate = (Date)attributes.get("createDate");
096
097 if (createDate != null) {
098 setCreateDate(createDate);
099 }
100
101 Date modifiedDate = (Date)attributes.get("modifiedDate");
102
103 if (modifiedDate != null) {
104 setModifiedDate(modifiedDate);
105 }
106
107 Long parentCategoryId = (Long)attributes.get("parentCategoryId");
108
109 if (parentCategoryId != null) {
110 setParentCategoryId(parentCategoryId);
111 }
112
113 String name = (String)attributes.get("name");
114
115 if (name != null) {
116 setName(name);
117 }
118
119 String description = (String)attributes.get("description");
120
121 if (description != null) {
122 setDescription(description);
123 }
124 }
125
126
131 public long getPrimaryKey() {
132 return _shoppingCategory.getPrimaryKey();
133 }
134
135
140 public void setPrimaryKey(long primaryKey) {
141 _shoppingCategory.setPrimaryKey(primaryKey);
142 }
143
144
149 public long getCategoryId() {
150 return _shoppingCategory.getCategoryId();
151 }
152
153
158 public void setCategoryId(long categoryId) {
159 _shoppingCategory.setCategoryId(categoryId);
160 }
161
162
167 public long getGroupId() {
168 return _shoppingCategory.getGroupId();
169 }
170
171
176 public void setGroupId(long groupId) {
177 _shoppingCategory.setGroupId(groupId);
178 }
179
180
185 public long getCompanyId() {
186 return _shoppingCategory.getCompanyId();
187 }
188
189
194 public void setCompanyId(long companyId) {
195 _shoppingCategory.setCompanyId(companyId);
196 }
197
198
203 public long getUserId() {
204 return _shoppingCategory.getUserId();
205 }
206
207
212 public void setUserId(long userId) {
213 _shoppingCategory.setUserId(userId);
214 }
215
216
222 public java.lang.String getUserUuid()
223 throws com.liferay.portal.kernel.exception.SystemException {
224 return _shoppingCategory.getUserUuid();
225 }
226
227
232 public void setUserUuid(java.lang.String userUuid) {
233 _shoppingCategory.setUserUuid(userUuid);
234 }
235
236
241 public java.lang.String getUserName() {
242 return _shoppingCategory.getUserName();
243 }
244
245
250 public void setUserName(java.lang.String userName) {
251 _shoppingCategory.setUserName(userName);
252 }
253
254
259 public java.util.Date getCreateDate() {
260 return _shoppingCategory.getCreateDate();
261 }
262
263
268 public void setCreateDate(java.util.Date createDate) {
269 _shoppingCategory.setCreateDate(createDate);
270 }
271
272
277 public java.util.Date getModifiedDate() {
278 return _shoppingCategory.getModifiedDate();
279 }
280
281
286 public void setModifiedDate(java.util.Date modifiedDate) {
287 _shoppingCategory.setModifiedDate(modifiedDate);
288 }
289
290
295 public long getParentCategoryId() {
296 return _shoppingCategory.getParentCategoryId();
297 }
298
299
304 public void setParentCategoryId(long parentCategoryId) {
305 _shoppingCategory.setParentCategoryId(parentCategoryId);
306 }
307
308
313 public java.lang.String getName() {
314 return _shoppingCategory.getName();
315 }
316
317
322 public void setName(java.lang.String name) {
323 _shoppingCategory.setName(name);
324 }
325
326
331 public java.lang.String getDescription() {
332 return _shoppingCategory.getDescription();
333 }
334
335
340 public void setDescription(java.lang.String description) {
341 _shoppingCategory.setDescription(description);
342 }
343
344 public boolean isNew() {
345 return _shoppingCategory.isNew();
346 }
347
348 public void setNew(boolean n) {
349 _shoppingCategory.setNew(n);
350 }
351
352 public boolean isCachedModel() {
353 return _shoppingCategory.isCachedModel();
354 }
355
356 public void setCachedModel(boolean cachedModel) {
357 _shoppingCategory.setCachedModel(cachedModel);
358 }
359
360 public boolean isEscapedModel() {
361 return _shoppingCategory.isEscapedModel();
362 }
363
364 public java.io.Serializable getPrimaryKeyObj() {
365 return _shoppingCategory.getPrimaryKeyObj();
366 }
367
368 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
369 _shoppingCategory.setPrimaryKeyObj(primaryKeyObj);
370 }
371
372 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
373 return _shoppingCategory.getExpandoBridge();
374 }
375
376 public void setExpandoBridgeAttributes(
377 com.liferay.portal.service.ServiceContext serviceContext) {
378 _shoppingCategory.setExpandoBridgeAttributes(serviceContext);
379 }
380
381 @Override
382 public java.lang.Object clone() {
383 return new ShoppingCategoryWrapper((ShoppingCategory)_shoppingCategory.clone());
384 }
385
386 public int compareTo(
387 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory) {
388 return _shoppingCategory.compareTo(shoppingCategory);
389 }
390
391 @Override
392 public int hashCode() {
393 return _shoppingCategory.hashCode();
394 }
395
396 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingCategory> toCacheModel() {
397 return _shoppingCategory.toCacheModel();
398 }
399
400 public com.liferay.portlet.shopping.model.ShoppingCategory toEscapedModel() {
401 return new ShoppingCategoryWrapper(_shoppingCategory.toEscapedModel());
402 }
403
404 public com.liferay.portlet.shopping.model.ShoppingCategory toUnescapedModel() {
405 return new ShoppingCategoryWrapper(_shoppingCategory.toUnescapedModel());
406 }
407
408 @Override
409 public java.lang.String toString() {
410 return _shoppingCategory.toString();
411 }
412
413 public java.lang.String toXmlString() {
414 return _shoppingCategory.toXmlString();
415 }
416
417 public void persist()
418 throws com.liferay.portal.kernel.exception.SystemException {
419 _shoppingCategory.persist();
420 }
421
422 public boolean isRoot() {
423 return _shoppingCategory.isRoot();
424 }
425
426 @Override
427 public boolean equals(Object obj) {
428 if (this == obj) {
429 return true;
430 }
431
432 if (!(obj instanceof ShoppingCategoryWrapper)) {
433 return false;
434 }
435
436 ShoppingCategoryWrapper shoppingCategoryWrapper = (ShoppingCategoryWrapper)obj;
437
438 if (Validator.equals(_shoppingCategory,
439 shoppingCategoryWrapper._shoppingCategory)) {
440 return true;
441 }
442
443 return false;
444 }
445
446
449 public ShoppingCategory getWrappedShoppingCategory() {
450 return _shoppingCategory;
451 }
452
453 public ShoppingCategory getWrappedModel() {
454 return _shoppingCategory;
455 }
456
457 public void resetOriginalValues() {
458 _shoppingCategory.resetOriginalValues();
459 }
460
461 private ShoppingCategory _shoppingCategory;
462 }