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
194 @Override
195 public long getPrimaryKey() {
196 return _shoppingCoupon.getPrimaryKey();
197 }
198
199
204 @Override
205 public void setPrimaryKey(long primaryKey) {
206 _shoppingCoupon.setPrimaryKey(primaryKey);
207 }
208
209
214 @Override
215 public long getCouponId() {
216 return _shoppingCoupon.getCouponId();
217 }
218
219
224 @Override
225 public void setCouponId(long couponId) {
226 _shoppingCoupon.setCouponId(couponId);
227 }
228
229
234 @Override
235 public long getGroupId() {
236 return _shoppingCoupon.getGroupId();
237 }
238
239
244 @Override
245 public void setGroupId(long groupId) {
246 _shoppingCoupon.setGroupId(groupId);
247 }
248
249
254 @Override
255 public long getCompanyId() {
256 return _shoppingCoupon.getCompanyId();
257 }
258
259
264 @Override
265 public void setCompanyId(long companyId) {
266 _shoppingCoupon.setCompanyId(companyId);
267 }
268
269
274 @Override
275 public long getUserId() {
276 return _shoppingCoupon.getUserId();
277 }
278
279
284 @Override
285 public void setUserId(long userId) {
286 _shoppingCoupon.setUserId(userId);
287 }
288
289
295 @Override
296 public java.lang.String getUserUuid()
297 throws com.liferay.portal.kernel.exception.SystemException {
298 return _shoppingCoupon.getUserUuid();
299 }
300
301
306 @Override
307 public void setUserUuid(java.lang.String userUuid) {
308 _shoppingCoupon.setUserUuid(userUuid);
309 }
310
311
316 @Override
317 public java.lang.String getUserName() {
318 return _shoppingCoupon.getUserName();
319 }
320
321
326 @Override
327 public void setUserName(java.lang.String userName) {
328 _shoppingCoupon.setUserName(userName);
329 }
330
331
336 @Override
337 public java.util.Date getCreateDate() {
338 return _shoppingCoupon.getCreateDate();
339 }
340
341
346 @Override
347 public void setCreateDate(java.util.Date createDate) {
348 _shoppingCoupon.setCreateDate(createDate);
349 }
350
351
356 @Override
357 public java.util.Date getModifiedDate() {
358 return _shoppingCoupon.getModifiedDate();
359 }
360
361
366 @Override
367 public void setModifiedDate(java.util.Date modifiedDate) {
368 _shoppingCoupon.setModifiedDate(modifiedDate);
369 }
370
371
376 @Override
377 public java.lang.String getCode() {
378 return _shoppingCoupon.getCode();
379 }
380
381
386 @Override
387 public void setCode(java.lang.String code) {
388 _shoppingCoupon.setCode(code);
389 }
390
391
396 @Override
397 public java.lang.String getName() {
398 return _shoppingCoupon.getName();
399 }
400
401
406 @Override
407 public void setName(java.lang.String name) {
408 _shoppingCoupon.setName(name);
409 }
410
411
416 @Override
417 public java.lang.String getDescription() {
418 return _shoppingCoupon.getDescription();
419 }
420
421
426 @Override
427 public void setDescription(java.lang.String description) {
428 _shoppingCoupon.setDescription(description);
429 }
430
431
436 @Override
437 public java.util.Date getStartDate() {
438 return _shoppingCoupon.getStartDate();
439 }
440
441
446 @Override
447 public void setStartDate(java.util.Date startDate) {
448 _shoppingCoupon.setStartDate(startDate);
449 }
450
451
456 @Override
457 public java.util.Date getEndDate() {
458 return _shoppingCoupon.getEndDate();
459 }
460
461
466 @Override
467 public void setEndDate(java.util.Date endDate) {
468 _shoppingCoupon.setEndDate(endDate);
469 }
470
471
476 @Override
477 public boolean getActive() {
478 return _shoppingCoupon.getActive();
479 }
480
481
486 @Override
487 public boolean isActive() {
488 return _shoppingCoupon.isActive();
489 }
490
491
496 @Override
497 public void setActive(boolean active) {
498 _shoppingCoupon.setActive(active);
499 }
500
501
506 @Override
507 public java.lang.String getLimitCategories() {
508 return _shoppingCoupon.getLimitCategories();
509 }
510
511
516 @Override
517 public void setLimitCategories(java.lang.String limitCategories) {
518 _shoppingCoupon.setLimitCategories(limitCategories);
519 }
520
521
526 @Override
527 public java.lang.String getLimitSkus() {
528 return _shoppingCoupon.getLimitSkus();
529 }
530
531
536 @Override
537 public void setLimitSkus(java.lang.String limitSkus) {
538 _shoppingCoupon.setLimitSkus(limitSkus);
539 }
540
541
546 @Override
547 public double getMinOrder() {
548 return _shoppingCoupon.getMinOrder();
549 }
550
551
556 @Override
557 public void setMinOrder(double minOrder) {
558 _shoppingCoupon.setMinOrder(minOrder);
559 }
560
561
566 @Override
567 public double getDiscount() {
568 return _shoppingCoupon.getDiscount();
569 }
570
571
576 @Override
577 public void setDiscount(double discount) {
578 _shoppingCoupon.setDiscount(discount);
579 }
580
581
586 @Override
587 public java.lang.String getDiscountType() {
588 return _shoppingCoupon.getDiscountType();
589 }
590
591
596 @Override
597 public void setDiscountType(java.lang.String discountType) {
598 _shoppingCoupon.setDiscountType(discountType);
599 }
600
601 @Override
602 public boolean isNew() {
603 return _shoppingCoupon.isNew();
604 }
605
606 @Override
607 public void setNew(boolean n) {
608 _shoppingCoupon.setNew(n);
609 }
610
611 @Override
612 public boolean isCachedModel() {
613 return _shoppingCoupon.isCachedModel();
614 }
615
616 @Override
617 public void setCachedModel(boolean cachedModel) {
618 _shoppingCoupon.setCachedModel(cachedModel);
619 }
620
621 @Override
622 public boolean isEscapedModel() {
623 return _shoppingCoupon.isEscapedModel();
624 }
625
626 @Override
627 public java.io.Serializable getPrimaryKeyObj() {
628 return _shoppingCoupon.getPrimaryKeyObj();
629 }
630
631 @Override
632 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
633 _shoppingCoupon.setPrimaryKeyObj(primaryKeyObj);
634 }
635
636 @Override
637 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
638 return _shoppingCoupon.getExpandoBridge();
639 }
640
641 @Override
642 public void setExpandoBridgeAttributes(
643 com.liferay.portal.model.BaseModel<?> baseModel) {
644 _shoppingCoupon.setExpandoBridgeAttributes(baseModel);
645 }
646
647 @Override
648 public void setExpandoBridgeAttributes(
649 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
650 _shoppingCoupon.setExpandoBridgeAttributes(expandoBridge);
651 }
652
653 @Override
654 public void setExpandoBridgeAttributes(
655 com.liferay.portal.service.ServiceContext serviceContext) {
656 _shoppingCoupon.setExpandoBridgeAttributes(serviceContext);
657 }
658
659 @Override
660 public java.lang.Object clone() {
661 return new ShoppingCouponWrapper((ShoppingCoupon)_shoppingCoupon.clone());
662 }
663
664 @Override
665 public int compareTo(
666 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon) {
667 return _shoppingCoupon.compareTo(shoppingCoupon);
668 }
669
670 @Override
671 public int hashCode() {
672 return _shoppingCoupon.hashCode();
673 }
674
675 @Override
676 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingCoupon> toCacheModel() {
677 return _shoppingCoupon.toCacheModel();
678 }
679
680 @Override
681 public com.liferay.portlet.shopping.model.ShoppingCoupon toEscapedModel() {
682 return new ShoppingCouponWrapper(_shoppingCoupon.toEscapedModel());
683 }
684
685 @Override
686 public com.liferay.portlet.shopping.model.ShoppingCoupon toUnescapedModel() {
687 return new ShoppingCouponWrapper(_shoppingCoupon.toUnescapedModel());
688 }
689
690 @Override
691 public java.lang.String toString() {
692 return _shoppingCoupon.toString();
693 }
694
695 @Override
696 public java.lang.String toXmlString() {
697 return _shoppingCoupon.toXmlString();
698 }
699
700 @Override
701 public void persist()
702 throws com.liferay.portal.kernel.exception.SystemException {
703 _shoppingCoupon.persist();
704 }
705
706 @Override
707 public boolean hasValidDateRange() {
708 return _shoppingCoupon.hasValidDateRange();
709 }
710
711 @Override
712 public boolean hasValidEndDate() {
713 return _shoppingCoupon.hasValidEndDate();
714 }
715
716 @Override
717 public boolean hasValidStartDate() {
718 return _shoppingCoupon.hasValidStartDate();
719 }
720
721 @Override
722 public boolean equals(Object obj) {
723 if (this == obj) {
724 return true;
725 }
726
727 if (!(obj instanceof ShoppingCouponWrapper)) {
728 return false;
729 }
730
731 ShoppingCouponWrapper shoppingCouponWrapper = (ShoppingCouponWrapper)obj;
732
733 if (Validator.equals(_shoppingCoupon,
734 shoppingCouponWrapper._shoppingCoupon)) {
735 return true;
736 }
737
738 return false;
739 }
740
741
744 public ShoppingCoupon getWrappedShoppingCoupon() {
745 return _shoppingCoupon;
746 }
747
748 @Override
749 public ShoppingCoupon getWrappedModel() {
750 return _shoppingCoupon;
751 }
752
753 @Override
754 public void resetOriginalValues() {
755 _shoppingCoupon.resetOriginalValues();
756 }
757
758 private ShoppingCoupon _shoppingCoupon;
759 }