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 ShoppingCouponWrapper implements ShoppingCoupon,
034 ModelWrapper<ShoppingCoupon> {
035 public ShoppingCouponWrapper(ShoppingCoupon shoppingCoupon) {
036 _shoppingCoupon = shoppingCoupon;
037 }
038
039 public Class<?> getModelClass() {
040 return ShoppingCoupon.class;
041 }
042
043 public String getModelClassName() {
044 return ShoppingCoupon.class.getName();
045 }
046
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("couponId", getCouponId());
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("code", getCode());
058 attributes.put("name", getName());
059 attributes.put("description", getDescription());
060 attributes.put("startDate", getStartDate());
061 attributes.put("endDate", getEndDate());
062 attributes.put("active", getActive());
063 attributes.put("limitCategories", getLimitCategories());
064 attributes.put("limitSkus", getLimitSkus());
065 attributes.put("minOrder", getMinOrder());
066 attributes.put("discount", getDiscount());
067 attributes.put("discountType", getDiscountType());
068
069 return attributes;
070 }
071
072 public void setModelAttributes(Map<String, Object> attributes) {
073 Long couponId = (Long)attributes.get("couponId");
074
075 if (couponId != null) {
076 setCouponId(couponId);
077 }
078
079 Long groupId = (Long)attributes.get("groupId");
080
081 if (groupId != null) {
082 setGroupId(groupId);
083 }
084
085 Long companyId = (Long)attributes.get("companyId");
086
087 if (companyId != null) {
088 setCompanyId(companyId);
089 }
090
091 Long userId = (Long)attributes.get("userId");
092
093 if (userId != null) {
094 setUserId(userId);
095 }
096
097 String userName = (String)attributes.get("userName");
098
099 if (userName != null) {
100 setUserName(userName);
101 }
102
103 Date createDate = (Date)attributes.get("createDate");
104
105 if (createDate != null) {
106 setCreateDate(createDate);
107 }
108
109 Date modifiedDate = (Date)attributes.get("modifiedDate");
110
111 if (modifiedDate != null) {
112 setModifiedDate(modifiedDate);
113 }
114
115 String code = (String)attributes.get("code");
116
117 if (code != null) {
118 setCode(code);
119 }
120
121 String name = (String)attributes.get("name");
122
123 if (name != null) {
124 setName(name);
125 }
126
127 String description = (String)attributes.get("description");
128
129 if (description != null) {
130 setDescription(description);
131 }
132
133 Date startDate = (Date)attributes.get("startDate");
134
135 if (startDate != null) {
136 setStartDate(startDate);
137 }
138
139 Date endDate = (Date)attributes.get("endDate");
140
141 if (endDate != null) {
142 setEndDate(endDate);
143 }
144
145 Boolean active = (Boolean)attributes.get("active");
146
147 if (active != null) {
148 setActive(active);
149 }
150
151 String limitCategories = (String)attributes.get("limitCategories");
152
153 if (limitCategories != null) {
154 setLimitCategories(limitCategories);
155 }
156
157 String limitSkus = (String)attributes.get("limitSkus");
158
159 if (limitSkus != null) {
160 setLimitSkus(limitSkus);
161 }
162
163 Double minOrder = (Double)attributes.get("minOrder");
164
165 if (minOrder != null) {
166 setMinOrder(minOrder);
167 }
168
169 Double discount = (Double)attributes.get("discount");
170
171 if (discount != null) {
172 setDiscount(discount);
173 }
174
175 String discountType = (String)attributes.get("discountType");
176
177 if (discountType != null) {
178 setDiscountType(discountType);
179 }
180 }
181
182
187 public long getPrimaryKey() {
188 return _shoppingCoupon.getPrimaryKey();
189 }
190
191
196 public void setPrimaryKey(long primaryKey) {
197 _shoppingCoupon.setPrimaryKey(primaryKey);
198 }
199
200
205 public long getCouponId() {
206 return _shoppingCoupon.getCouponId();
207 }
208
209
214 public void setCouponId(long couponId) {
215 _shoppingCoupon.setCouponId(couponId);
216 }
217
218
223 public long getGroupId() {
224 return _shoppingCoupon.getGroupId();
225 }
226
227
232 public void setGroupId(long groupId) {
233 _shoppingCoupon.setGroupId(groupId);
234 }
235
236
241 public long getCompanyId() {
242 return _shoppingCoupon.getCompanyId();
243 }
244
245
250 public void setCompanyId(long companyId) {
251 _shoppingCoupon.setCompanyId(companyId);
252 }
253
254
259 public long getUserId() {
260 return _shoppingCoupon.getUserId();
261 }
262
263
268 public void setUserId(long userId) {
269 _shoppingCoupon.setUserId(userId);
270 }
271
272
278 public java.lang.String getUserUuid()
279 throws com.liferay.portal.kernel.exception.SystemException {
280 return _shoppingCoupon.getUserUuid();
281 }
282
283
288 public void setUserUuid(java.lang.String userUuid) {
289 _shoppingCoupon.setUserUuid(userUuid);
290 }
291
292
297 public java.lang.String getUserName() {
298 return _shoppingCoupon.getUserName();
299 }
300
301
306 public void setUserName(java.lang.String userName) {
307 _shoppingCoupon.setUserName(userName);
308 }
309
310
315 public java.util.Date getCreateDate() {
316 return _shoppingCoupon.getCreateDate();
317 }
318
319
324 public void setCreateDate(java.util.Date createDate) {
325 _shoppingCoupon.setCreateDate(createDate);
326 }
327
328
333 public java.util.Date getModifiedDate() {
334 return _shoppingCoupon.getModifiedDate();
335 }
336
337
342 public void setModifiedDate(java.util.Date modifiedDate) {
343 _shoppingCoupon.setModifiedDate(modifiedDate);
344 }
345
346
351 public java.lang.String getCode() {
352 return _shoppingCoupon.getCode();
353 }
354
355
360 public void setCode(java.lang.String code) {
361 _shoppingCoupon.setCode(code);
362 }
363
364
369 public java.lang.String getName() {
370 return _shoppingCoupon.getName();
371 }
372
373
378 public void setName(java.lang.String name) {
379 _shoppingCoupon.setName(name);
380 }
381
382
387 public java.lang.String getDescription() {
388 return _shoppingCoupon.getDescription();
389 }
390
391
396 public void setDescription(java.lang.String description) {
397 _shoppingCoupon.setDescription(description);
398 }
399
400
405 public java.util.Date getStartDate() {
406 return _shoppingCoupon.getStartDate();
407 }
408
409
414 public void setStartDate(java.util.Date startDate) {
415 _shoppingCoupon.setStartDate(startDate);
416 }
417
418
423 public java.util.Date getEndDate() {
424 return _shoppingCoupon.getEndDate();
425 }
426
427
432 public void setEndDate(java.util.Date endDate) {
433 _shoppingCoupon.setEndDate(endDate);
434 }
435
436
441 public boolean getActive() {
442 return _shoppingCoupon.getActive();
443 }
444
445
450 public boolean isActive() {
451 return _shoppingCoupon.isActive();
452 }
453
454
459 public void setActive(boolean active) {
460 _shoppingCoupon.setActive(active);
461 }
462
463
468 public java.lang.String getLimitCategories() {
469 return _shoppingCoupon.getLimitCategories();
470 }
471
472
477 public void setLimitCategories(java.lang.String limitCategories) {
478 _shoppingCoupon.setLimitCategories(limitCategories);
479 }
480
481
486 public java.lang.String getLimitSkus() {
487 return _shoppingCoupon.getLimitSkus();
488 }
489
490
495 public void setLimitSkus(java.lang.String limitSkus) {
496 _shoppingCoupon.setLimitSkus(limitSkus);
497 }
498
499
504 public double getMinOrder() {
505 return _shoppingCoupon.getMinOrder();
506 }
507
508
513 public void setMinOrder(double minOrder) {
514 _shoppingCoupon.setMinOrder(minOrder);
515 }
516
517
522 public double getDiscount() {
523 return _shoppingCoupon.getDiscount();
524 }
525
526
531 public void setDiscount(double discount) {
532 _shoppingCoupon.setDiscount(discount);
533 }
534
535
540 public java.lang.String getDiscountType() {
541 return _shoppingCoupon.getDiscountType();
542 }
543
544
549 public void setDiscountType(java.lang.String discountType) {
550 _shoppingCoupon.setDiscountType(discountType);
551 }
552
553 public boolean isNew() {
554 return _shoppingCoupon.isNew();
555 }
556
557 public void setNew(boolean n) {
558 _shoppingCoupon.setNew(n);
559 }
560
561 public boolean isCachedModel() {
562 return _shoppingCoupon.isCachedModel();
563 }
564
565 public void setCachedModel(boolean cachedModel) {
566 _shoppingCoupon.setCachedModel(cachedModel);
567 }
568
569 public boolean isEscapedModel() {
570 return _shoppingCoupon.isEscapedModel();
571 }
572
573 public java.io.Serializable getPrimaryKeyObj() {
574 return _shoppingCoupon.getPrimaryKeyObj();
575 }
576
577 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
578 _shoppingCoupon.setPrimaryKeyObj(primaryKeyObj);
579 }
580
581 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
582 return _shoppingCoupon.getExpandoBridge();
583 }
584
585 public void setExpandoBridgeAttributes(
586 com.liferay.portal.service.ServiceContext serviceContext) {
587 _shoppingCoupon.setExpandoBridgeAttributes(serviceContext);
588 }
589
590 @Override
591 public java.lang.Object clone() {
592 return new ShoppingCouponWrapper((ShoppingCoupon)_shoppingCoupon.clone());
593 }
594
595 public int compareTo(
596 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon) {
597 return _shoppingCoupon.compareTo(shoppingCoupon);
598 }
599
600 @Override
601 public int hashCode() {
602 return _shoppingCoupon.hashCode();
603 }
604
605 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingCoupon> toCacheModel() {
606 return _shoppingCoupon.toCacheModel();
607 }
608
609 public com.liferay.portlet.shopping.model.ShoppingCoupon toEscapedModel() {
610 return new ShoppingCouponWrapper(_shoppingCoupon.toEscapedModel());
611 }
612
613 public com.liferay.portlet.shopping.model.ShoppingCoupon toUnescapedModel() {
614 return new ShoppingCouponWrapper(_shoppingCoupon.toUnescapedModel());
615 }
616
617 @Override
618 public java.lang.String toString() {
619 return _shoppingCoupon.toString();
620 }
621
622 public java.lang.String toXmlString() {
623 return _shoppingCoupon.toXmlString();
624 }
625
626 public void persist()
627 throws com.liferay.portal.kernel.exception.SystemException {
628 _shoppingCoupon.persist();
629 }
630
631 public boolean hasValidDateRange() {
632 return _shoppingCoupon.hasValidDateRange();
633 }
634
635 public boolean hasValidEndDate() {
636 return _shoppingCoupon.hasValidEndDate();
637 }
638
639 public boolean hasValidStartDate() {
640 return _shoppingCoupon.hasValidStartDate();
641 }
642
643 @Override
644 public boolean equals(Object obj) {
645 if (this == obj) {
646 return true;
647 }
648
649 if (!(obj instanceof ShoppingCouponWrapper)) {
650 return false;
651 }
652
653 ShoppingCouponWrapper shoppingCouponWrapper = (ShoppingCouponWrapper)obj;
654
655 if (Validator.equals(_shoppingCoupon,
656 shoppingCouponWrapper._shoppingCoupon)) {
657 return true;
658 }
659
660 return false;
661 }
662
663
666 public ShoppingCoupon getWrappedShoppingCoupon() {
667 return _shoppingCoupon;
668 }
669
670 public ShoppingCoupon getWrappedModel() {
671 return _shoppingCoupon;
672 }
673
674 public void resetOriginalValues() {
675 _shoppingCoupon.resetOriginalValues();
676 }
677
678 private ShoppingCoupon _shoppingCoupon;
679 }