001
014
015 package com.liferay.portlet.shopping.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.Date;
023 import java.util.HashMap;
024 import java.util.Map;
025
026
035 @ProviderType
036 public class ShoppingCouponWrapper implements ShoppingCoupon,
037 ModelWrapper<ShoppingCoupon> {
038 public ShoppingCouponWrapper(ShoppingCoupon shoppingCoupon) {
039 _shoppingCoupon = shoppingCoupon;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return ShoppingCoupon.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return ShoppingCoupon.class.getName();
050 }
051
052 @Override
053 public Map<String, Object> getModelAttributes() {
054 Map<String, Object> attributes = new HashMap<String, Object>();
055
056 attributes.put("couponId", getCouponId());
057 attributes.put("groupId", getGroupId());
058 attributes.put("companyId", getCompanyId());
059 attributes.put("userId", getUserId());
060 attributes.put("userName", getUserName());
061 attributes.put("createDate", getCreateDate());
062 attributes.put("modifiedDate", getModifiedDate());
063 attributes.put("code", getCode());
064 attributes.put("name", getName());
065 attributes.put("description", getDescription());
066 attributes.put("startDate", getStartDate());
067 attributes.put("endDate", getEndDate());
068 attributes.put("active", getActive());
069 attributes.put("limitCategories", getLimitCategories());
070 attributes.put("limitSkus", getLimitSkus());
071 attributes.put("minOrder", getMinOrder());
072 attributes.put("discount", getDiscount());
073 attributes.put("discountType", getDiscountType());
074
075 return attributes;
076 }
077
078 @Override
079 public void setModelAttributes(Map<String, Object> attributes) {
080 Long couponId = (Long)attributes.get("couponId");
081
082 if (couponId != null) {
083 setCouponId(couponId);
084 }
085
086 Long groupId = (Long)attributes.get("groupId");
087
088 if (groupId != null) {
089 setGroupId(groupId);
090 }
091
092 Long companyId = (Long)attributes.get("companyId");
093
094 if (companyId != null) {
095 setCompanyId(companyId);
096 }
097
098 Long userId = (Long)attributes.get("userId");
099
100 if (userId != null) {
101 setUserId(userId);
102 }
103
104 String userName = (String)attributes.get("userName");
105
106 if (userName != null) {
107 setUserName(userName);
108 }
109
110 Date createDate = (Date)attributes.get("createDate");
111
112 if (createDate != null) {
113 setCreateDate(createDate);
114 }
115
116 Date modifiedDate = (Date)attributes.get("modifiedDate");
117
118 if (modifiedDate != null) {
119 setModifiedDate(modifiedDate);
120 }
121
122 String code = (String)attributes.get("code");
123
124 if (code != null) {
125 setCode(code);
126 }
127
128 String name = (String)attributes.get("name");
129
130 if (name != null) {
131 setName(name);
132 }
133
134 String description = (String)attributes.get("description");
135
136 if (description != null) {
137 setDescription(description);
138 }
139
140 Date startDate = (Date)attributes.get("startDate");
141
142 if (startDate != null) {
143 setStartDate(startDate);
144 }
145
146 Date endDate = (Date)attributes.get("endDate");
147
148 if (endDate != null) {
149 setEndDate(endDate);
150 }
151
152 Boolean active = (Boolean)attributes.get("active");
153
154 if (active != null) {
155 setActive(active);
156 }
157
158 String limitCategories = (String)attributes.get("limitCategories");
159
160 if (limitCategories != null) {
161 setLimitCategories(limitCategories);
162 }
163
164 String limitSkus = (String)attributes.get("limitSkus");
165
166 if (limitSkus != null) {
167 setLimitSkus(limitSkus);
168 }
169
170 Double minOrder = (Double)attributes.get("minOrder");
171
172 if (minOrder != null) {
173 setMinOrder(minOrder);
174 }
175
176 Double discount = (Double)attributes.get("discount");
177
178 if (discount != null) {
179 setDiscount(discount);
180 }
181
182 String discountType = (String)attributes.get("discountType");
183
184 if (discountType != null) {
185 setDiscountType(discountType);
186 }
187 }
188
189 @Override
190 public java.lang.Object clone() {
191 return new ShoppingCouponWrapper((ShoppingCoupon)_shoppingCoupon.clone());
192 }
193
194 @Override
195 public int compareTo(
196 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon) {
197 return _shoppingCoupon.compareTo(shoppingCoupon);
198 }
199
200
205 @Override
206 public boolean getActive() {
207 return _shoppingCoupon.getActive();
208 }
209
210
215 @Override
216 public java.lang.String getCode() {
217 return _shoppingCoupon.getCode();
218 }
219
220
225 @Override
226 public long getCompanyId() {
227 return _shoppingCoupon.getCompanyId();
228 }
229
230
235 @Override
236 public long getCouponId() {
237 return _shoppingCoupon.getCouponId();
238 }
239
240
245 @Override
246 public Date getCreateDate() {
247 return _shoppingCoupon.getCreateDate();
248 }
249
250
255 @Override
256 public java.lang.String getDescription() {
257 return _shoppingCoupon.getDescription();
258 }
259
260
265 @Override
266 public double getDiscount() {
267 return _shoppingCoupon.getDiscount();
268 }
269
270
275 @Override
276 public java.lang.String getDiscountType() {
277 return _shoppingCoupon.getDiscountType();
278 }
279
280
285 @Override
286 public Date getEndDate() {
287 return _shoppingCoupon.getEndDate();
288 }
289
290 @Override
291 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
292 return _shoppingCoupon.getExpandoBridge();
293 }
294
295
300 @Override
301 public long getGroupId() {
302 return _shoppingCoupon.getGroupId();
303 }
304
305
310 @Override
311 public java.lang.String getLimitCategories() {
312 return _shoppingCoupon.getLimitCategories();
313 }
314
315
320 @Override
321 public java.lang.String getLimitSkus() {
322 return _shoppingCoupon.getLimitSkus();
323 }
324
325
330 @Override
331 public double getMinOrder() {
332 return _shoppingCoupon.getMinOrder();
333 }
334
335
340 @Override
341 public Date getModifiedDate() {
342 return _shoppingCoupon.getModifiedDate();
343 }
344
345
350 @Override
351 public java.lang.String getName() {
352 return _shoppingCoupon.getName();
353 }
354
355
360 @Override
361 public long getPrimaryKey() {
362 return _shoppingCoupon.getPrimaryKey();
363 }
364
365 @Override
366 public java.io.Serializable getPrimaryKeyObj() {
367 return _shoppingCoupon.getPrimaryKeyObj();
368 }
369
370
375 @Override
376 public Date getStartDate() {
377 return _shoppingCoupon.getStartDate();
378 }
379
380
385 @Override
386 public long getUserId() {
387 return _shoppingCoupon.getUserId();
388 }
389
390
395 @Override
396 public java.lang.String getUserName() {
397 return _shoppingCoupon.getUserName();
398 }
399
400
405 @Override
406 public java.lang.String getUserUuid() {
407 return _shoppingCoupon.getUserUuid();
408 }
409
410 @Override
411 public boolean hasValidDateRange() {
412 return _shoppingCoupon.hasValidDateRange();
413 }
414
415 @Override
416 public boolean hasValidEndDate() {
417 return _shoppingCoupon.hasValidEndDate();
418 }
419
420 @Override
421 public boolean hasValidStartDate() {
422 return _shoppingCoupon.hasValidStartDate();
423 }
424
425 @Override
426 public int hashCode() {
427 return _shoppingCoupon.hashCode();
428 }
429
430
435 @Override
436 public boolean isActive() {
437 return _shoppingCoupon.isActive();
438 }
439
440 @Override
441 public boolean isCachedModel() {
442 return _shoppingCoupon.isCachedModel();
443 }
444
445 @Override
446 public boolean isEscapedModel() {
447 return _shoppingCoupon.isEscapedModel();
448 }
449
450 @Override
451 public boolean isNew() {
452 return _shoppingCoupon.isNew();
453 }
454
455 @Override
456 public void persist() {
457 _shoppingCoupon.persist();
458 }
459
460
465 @Override
466 public void setActive(boolean active) {
467 _shoppingCoupon.setActive(active);
468 }
469
470 @Override
471 public void setCachedModel(boolean cachedModel) {
472 _shoppingCoupon.setCachedModel(cachedModel);
473 }
474
475
480 @Override
481 public void setCode(java.lang.String code) {
482 _shoppingCoupon.setCode(code);
483 }
484
485
490 @Override
491 public void setCompanyId(long companyId) {
492 _shoppingCoupon.setCompanyId(companyId);
493 }
494
495
500 @Override
501 public void setCouponId(long couponId) {
502 _shoppingCoupon.setCouponId(couponId);
503 }
504
505
510 @Override
511 public void setCreateDate(Date createDate) {
512 _shoppingCoupon.setCreateDate(createDate);
513 }
514
515
520 @Override
521 public void setDescription(java.lang.String description) {
522 _shoppingCoupon.setDescription(description);
523 }
524
525
530 @Override
531 public void setDiscount(double discount) {
532 _shoppingCoupon.setDiscount(discount);
533 }
534
535
540 @Override
541 public void setDiscountType(java.lang.String discountType) {
542 _shoppingCoupon.setDiscountType(discountType);
543 }
544
545
550 @Override
551 public void setEndDate(Date endDate) {
552 _shoppingCoupon.setEndDate(endDate);
553 }
554
555 @Override
556 public void setExpandoBridgeAttributes(
557 com.liferay.portal.model.BaseModel<?> baseModel) {
558 _shoppingCoupon.setExpandoBridgeAttributes(baseModel);
559 }
560
561 @Override
562 public void setExpandoBridgeAttributes(
563 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
564 _shoppingCoupon.setExpandoBridgeAttributes(expandoBridge);
565 }
566
567 @Override
568 public void setExpandoBridgeAttributes(
569 com.liferay.portal.service.ServiceContext serviceContext) {
570 _shoppingCoupon.setExpandoBridgeAttributes(serviceContext);
571 }
572
573
578 @Override
579 public void setGroupId(long groupId) {
580 _shoppingCoupon.setGroupId(groupId);
581 }
582
583
588 @Override
589 public void setLimitCategories(java.lang.String limitCategories) {
590 _shoppingCoupon.setLimitCategories(limitCategories);
591 }
592
593
598 @Override
599 public void setLimitSkus(java.lang.String limitSkus) {
600 _shoppingCoupon.setLimitSkus(limitSkus);
601 }
602
603
608 @Override
609 public void setMinOrder(double minOrder) {
610 _shoppingCoupon.setMinOrder(minOrder);
611 }
612
613
618 @Override
619 public void setModifiedDate(Date modifiedDate) {
620 _shoppingCoupon.setModifiedDate(modifiedDate);
621 }
622
623
628 @Override
629 public void setName(java.lang.String name) {
630 _shoppingCoupon.setName(name);
631 }
632
633 @Override
634 public void setNew(boolean n) {
635 _shoppingCoupon.setNew(n);
636 }
637
638
643 @Override
644 public void setPrimaryKey(long primaryKey) {
645 _shoppingCoupon.setPrimaryKey(primaryKey);
646 }
647
648 @Override
649 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
650 _shoppingCoupon.setPrimaryKeyObj(primaryKeyObj);
651 }
652
653
658 @Override
659 public void setStartDate(Date startDate) {
660 _shoppingCoupon.setStartDate(startDate);
661 }
662
663
668 @Override
669 public void setUserId(long userId) {
670 _shoppingCoupon.setUserId(userId);
671 }
672
673
678 @Override
679 public void setUserName(java.lang.String userName) {
680 _shoppingCoupon.setUserName(userName);
681 }
682
683
688 @Override
689 public void setUserUuid(java.lang.String userUuid) {
690 _shoppingCoupon.setUserUuid(userUuid);
691 }
692
693 @Override
694 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingCoupon> toCacheModel() {
695 return _shoppingCoupon.toCacheModel();
696 }
697
698 @Override
699 public com.liferay.portlet.shopping.model.ShoppingCoupon toEscapedModel() {
700 return new ShoppingCouponWrapper(_shoppingCoupon.toEscapedModel());
701 }
702
703 @Override
704 public java.lang.String toString() {
705 return _shoppingCoupon.toString();
706 }
707
708 @Override
709 public com.liferay.portlet.shopping.model.ShoppingCoupon toUnescapedModel() {
710 return new ShoppingCouponWrapper(_shoppingCoupon.toUnescapedModel());
711 }
712
713 @Override
714 public java.lang.String toXmlString() {
715 return _shoppingCoupon.toXmlString();
716 }
717
718 @Override
719 public boolean equals(Object obj) {
720 if (this == obj) {
721 return true;
722 }
723
724 if (!(obj instanceof ShoppingCouponWrapper)) {
725 return false;
726 }
727
728 ShoppingCouponWrapper shoppingCouponWrapper = (ShoppingCouponWrapper)obj;
729
730 if (Validator.equals(_shoppingCoupon,
731 shoppingCouponWrapper._shoppingCoupon)) {
732 return true;
733 }
734
735 return false;
736 }
737
738
741 @Deprecated
742 public ShoppingCoupon getWrappedShoppingCoupon() {
743 return _shoppingCoupon;
744 }
745
746 @Override
747 public ShoppingCoupon getWrappedModel() {
748 return _shoppingCoupon;
749 }
750
751 @Override
752 public boolean isEntityCacheEnabled() {
753 return _shoppingCoupon.isEntityCacheEnabled();
754 }
755
756 @Override
757 public boolean isFinderCacheEnabled() {
758 return _shoppingCoupon.isFinderCacheEnabled();
759 }
760
761 @Override
762 public void resetOriginalValues() {
763 _shoppingCoupon.resetOriginalValues();
764 }
765
766 private final ShoppingCoupon _shoppingCoupon;
767 }