001
014
015 package com.liferay.portlet.shopping.model;
016
017 import com.liferay.portal.model.ModelWrapper;
018
019 import java.util.Date;
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class ShoppingItemWrapper implements ShoppingItem,
033 ModelWrapper<ShoppingItem> {
034 public ShoppingItemWrapper(ShoppingItem shoppingItem) {
035 _shoppingItem = shoppingItem;
036 }
037
038 public Class<?> getModelClass() {
039 return ShoppingItem.class;
040 }
041
042 public String getModelClassName() {
043 return ShoppingItem.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("itemId", getItemId());
050 attributes.put("groupId", getGroupId());
051 attributes.put("companyId", getCompanyId());
052 attributes.put("userId", getUserId());
053 attributes.put("userName", getUserName());
054 attributes.put("createDate", getCreateDate());
055 attributes.put("modifiedDate", getModifiedDate());
056 attributes.put("categoryId", getCategoryId());
057 attributes.put("sku", getSku());
058 attributes.put("name", getName());
059 attributes.put("description", getDescription());
060 attributes.put("properties", getProperties());
061 attributes.put("fields", getFields());
062 attributes.put("fieldsQuantities", getFieldsQuantities());
063 attributes.put("minQuantity", getMinQuantity());
064 attributes.put("maxQuantity", getMaxQuantity());
065 attributes.put("price", getPrice());
066 attributes.put("discount", getDiscount());
067 attributes.put("taxable", getTaxable());
068 attributes.put("shipping", getShipping());
069 attributes.put("useShippingFormula", getUseShippingFormula());
070 attributes.put("requiresShipping", getRequiresShipping());
071 attributes.put("stockQuantity", getStockQuantity());
072 attributes.put("featured", getFeatured());
073 attributes.put("sale", getSale());
074 attributes.put("smallImage", getSmallImage());
075 attributes.put("smallImageId", getSmallImageId());
076 attributes.put("smallImageURL", getSmallImageURL());
077 attributes.put("mediumImage", getMediumImage());
078 attributes.put("mediumImageId", getMediumImageId());
079 attributes.put("mediumImageURL", getMediumImageURL());
080 attributes.put("largeImage", getLargeImage());
081 attributes.put("largeImageId", getLargeImageId());
082 attributes.put("largeImageURL", getLargeImageURL());
083
084 return attributes;
085 }
086
087 public void setModelAttributes(Map<String, Object> attributes) {
088 Long itemId = (Long)attributes.get("itemId");
089
090 if (itemId != null) {
091 setItemId(itemId);
092 }
093
094 Long groupId = (Long)attributes.get("groupId");
095
096 if (groupId != null) {
097 setGroupId(groupId);
098 }
099
100 Long companyId = (Long)attributes.get("companyId");
101
102 if (companyId != null) {
103 setCompanyId(companyId);
104 }
105
106 Long userId = (Long)attributes.get("userId");
107
108 if (userId != null) {
109 setUserId(userId);
110 }
111
112 String userName = (String)attributes.get("userName");
113
114 if (userName != null) {
115 setUserName(userName);
116 }
117
118 Date createDate = (Date)attributes.get("createDate");
119
120 if (createDate != null) {
121 setCreateDate(createDate);
122 }
123
124 Date modifiedDate = (Date)attributes.get("modifiedDate");
125
126 if (modifiedDate != null) {
127 setModifiedDate(modifiedDate);
128 }
129
130 Long categoryId = (Long)attributes.get("categoryId");
131
132 if (categoryId != null) {
133 setCategoryId(categoryId);
134 }
135
136 String sku = (String)attributes.get("sku");
137
138 if (sku != null) {
139 setSku(sku);
140 }
141
142 String name = (String)attributes.get("name");
143
144 if (name != null) {
145 setName(name);
146 }
147
148 String description = (String)attributes.get("description");
149
150 if (description != null) {
151 setDescription(description);
152 }
153
154 String properties = (String)attributes.get("properties");
155
156 if (properties != null) {
157 setProperties(properties);
158 }
159
160 Boolean fields = (Boolean)attributes.get("fields");
161
162 if (fields != null) {
163 setFields(fields);
164 }
165
166 String fieldsQuantities = (String)attributes.get("fieldsQuantities");
167
168 if (fieldsQuantities != null) {
169 setFieldsQuantities(fieldsQuantities);
170 }
171
172 Integer minQuantity = (Integer)attributes.get("minQuantity");
173
174 if (minQuantity != null) {
175 setMinQuantity(minQuantity);
176 }
177
178 Integer maxQuantity = (Integer)attributes.get("maxQuantity");
179
180 if (maxQuantity != null) {
181 setMaxQuantity(maxQuantity);
182 }
183
184 Double price = (Double)attributes.get("price");
185
186 if (price != null) {
187 setPrice(price);
188 }
189
190 Double discount = (Double)attributes.get("discount");
191
192 if (discount != null) {
193 setDiscount(discount);
194 }
195
196 Boolean taxable = (Boolean)attributes.get("taxable");
197
198 if (taxable != null) {
199 setTaxable(taxable);
200 }
201
202 Double shipping = (Double)attributes.get("shipping");
203
204 if (shipping != null) {
205 setShipping(shipping);
206 }
207
208 Boolean useShippingFormula = (Boolean)attributes.get(
209 "useShippingFormula");
210
211 if (useShippingFormula != null) {
212 setUseShippingFormula(useShippingFormula);
213 }
214
215 Boolean requiresShipping = (Boolean)attributes.get("requiresShipping");
216
217 if (requiresShipping != null) {
218 setRequiresShipping(requiresShipping);
219 }
220
221 Integer stockQuantity = (Integer)attributes.get("stockQuantity");
222
223 if (stockQuantity != null) {
224 setStockQuantity(stockQuantity);
225 }
226
227 Boolean featured = (Boolean)attributes.get("featured");
228
229 if (featured != null) {
230 setFeatured(featured);
231 }
232
233 Boolean sale = (Boolean)attributes.get("sale");
234
235 if (sale != null) {
236 setSale(sale);
237 }
238
239 Boolean smallImage = (Boolean)attributes.get("smallImage");
240
241 if (smallImage != null) {
242 setSmallImage(smallImage);
243 }
244
245 Long smallImageId = (Long)attributes.get("smallImageId");
246
247 if (smallImageId != null) {
248 setSmallImageId(smallImageId);
249 }
250
251 String smallImageURL = (String)attributes.get("smallImageURL");
252
253 if (smallImageURL != null) {
254 setSmallImageURL(smallImageURL);
255 }
256
257 Boolean mediumImage = (Boolean)attributes.get("mediumImage");
258
259 if (mediumImage != null) {
260 setMediumImage(mediumImage);
261 }
262
263 Long mediumImageId = (Long)attributes.get("mediumImageId");
264
265 if (mediumImageId != null) {
266 setMediumImageId(mediumImageId);
267 }
268
269 String mediumImageURL = (String)attributes.get("mediumImageURL");
270
271 if (mediumImageURL != null) {
272 setMediumImageURL(mediumImageURL);
273 }
274
275 Boolean largeImage = (Boolean)attributes.get("largeImage");
276
277 if (largeImage != null) {
278 setLargeImage(largeImage);
279 }
280
281 Long largeImageId = (Long)attributes.get("largeImageId");
282
283 if (largeImageId != null) {
284 setLargeImageId(largeImageId);
285 }
286
287 String largeImageURL = (String)attributes.get("largeImageURL");
288
289 if (largeImageURL != null) {
290 setLargeImageURL(largeImageURL);
291 }
292 }
293
294
299 public long getPrimaryKey() {
300 return _shoppingItem.getPrimaryKey();
301 }
302
303
308 public void setPrimaryKey(long primaryKey) {
309 _shoppingItem.setPrimaryKey(primaryKey);
310 }
311
312
317 public long getItemId() {
318 return _shoppingItem.getItemId();
319 }
320
321
326 public void setItemId(long itemId) {
327 _shoppingItem.setItemId(itemId);
328 }
329
330
335 public long getGroupId() {
336 return _shoppingItem.getGroupId();
337 }
338
339
344 public void setGroupId(long groupId) {
345 _shoppingItem.setGroupId(groupId);
346 }
347
348
353 public long getCompanyId() {
354 return _shoppingItem.getCompanyId();
355 }
356
357
362 public void setCompanyId(long companyId) {
363 _shoppingItem.setCompanyId(companyId);
364 }
365
366
371 public long getUserId() {
372 return _shoppingItem.getUserId();
373 }
374
375
380 public void setUserId(long userId) {
381 _shoppingItem.setUserId(userId);
382 }
383
384
390 public java.lang.String getUserUuid()
391 throws com.liferay.portal.kernel.exception.SystemException {
392 return _shoppingItem.getUserUuid();
393 }
394
395
400 public void setUserUuid(java.lang.String userUuid) {
401 _shoppingItem.setUserUuid(userUuid);
402 }
403
404
409 public java.lang.String getUserName() {
410 return _shoppingItem.getUserName();
411 }
412
413
418 public void setUserName(java.lang.String userName) {
419 _shoppingItem.setUserName(userName);
420 }
421
422
427 public java.util.Date getCreateDate() {
428 return _shoppingItem.getCreateDate();
429 }
430
431
436 public void setCreateDate(java.util.Date createDate) {
437 _shoppingItem.setCreateDate(createDate);
438 }
439
440
445 public java.util.Date getModifiedDate() {
446 return _shoppingItem.getModifiedDate();
447 }
448
449
454 public void setModifiedDate(java.util.Date modifiedDate) {
455 _shoppingItem.setModifiedDate(modifiedDate);
456 }
457
458
463 public long getCategoryId() {
464 return _shoppingItem.getCategoryId();
465 }
466
467
472 public void setCategoryId(long categoryId) {
473 _shoppingItem.setCategoryId(categoryId);
474 }
475
476
481 public java.lang.String getSku() {
482 return _shoppingItem.getSku();
483 }
484
485
490 public void setSku(java.lang.String sku) {
491 _shoppingItem.setSku(sku);
492 }
493
494
499 public java.lang.String getName() {
500 return _shoppingItem.getName();
501 }
502
503
508 public void setName(java.lang.String name) {
509 _shoppingItem.setName(name);
510 }
511
512
517 public java.lang.String getDescription() {
518 return _shoppingItem.getDescription();
519 }
520
521
526 public void setDescription(java.lang.String description) {
527 _shoppingItem.setDescription(description);
528 }
529
530
535 public java.lang.String getProperties() {
536 return _shoppingItem.getProperties();
537 }
538
539
544 public void setProperties(java.lang.String properties) {
545 _shoppingItem.setProperties(properties);
546 }
547
548
553 public boolean getFields() {
554 return _shoppingItem.getFields();
555 }
556
557
562 public boolean isFields() {
563 return _shoppingItem.isFields();
564 }
565
566
571 public void setFields(boolean fields) {
572 _shoppingItem.setFields(fields);
573 }
574
575
580 public java.lang.String getFieldsQuantities() {
581 return _shoppingItem.getFieldsQuantities();
582 }
583
584
589 public void setFieldsQuantities(java.lang.String fieldsQuantities) {
590 _shoppingItem.setFieldsQuantities(fieldsQuantities);
591 }
592
593
598 public int getMinQuantity() {
599 return _shoppingItem.getMinQuantity();
600 }
601
602
607 public void setMinQuantity(int minQuantity) {
608 _shoppingItem.setMinQuantity(minQuantity);
609 }
610
611
616 public int getMaxQuantity() {
617 return _shoppingItem.getMaxQuantity();
618 }
619
620
625 public void setMaxQuantity(int maxQuantity) {
626 _shoppingItem.setMaxQuantity(maxQuantity);
627 }
628
629
634 public double getPrice() {
635 return _shoppingItem.getPrice();
636 }
637
638
643 public void setPrice(double price) {
644 _shoppingItem.setPrice(price);
645 }
646
647
652 public double getDiscount() {
653 return _shoppingItem.getDiscount();
654 }
655
656
661 public void setDiscount(double discount) {
662 _shoppingItem.setDiscount(discount);
663 }
664
665
670 public boolean getTaxable() {
671 return _shoppingItem.getTaxable();
672 }
673
674
679 public boolean isTaxable() {
680 return _shoppingItem.isTaxable();
681 }
682
683
688 public void setTaxable(boolean taxable) {
689 _shoppingItem.setTaxable(taxable);
690 }
691
692
697 public double getShipping() {
698 return _shoppingItem.getShipping();
699 }
700
701
706 public void setShipping(double shipping) {
707 _shoppingItem.setShipping(shipping);
708 }
709
710
715 public boolean getUseShippingFormula() {
716 return _shoppingItem.getUseShippingFormula();
717 }
718
719
724 public boolean isUseShippingFormula() {
725 return _shoppingItem.isUseShippingFormula();
726 }
727
728
733 public void setUseShippingFormula(boolean useShippingFormula) {
734 _shoppingItem.setUseShippingFormula(useShippingFormula);
735 }
736
737
742 public boolean getRequiresShipping() {
743 return _shoppingItem.getRequiresShipping();
744 }
745
746
751 public boolean isRequiresShipping() {
752 return _shoppingItem.isRequiresShipping();
753 }
754
755
760 public void setRequiresShipping(boolean requiresShipping) {
761 _shoppingItem.setRequiresShipping(requiresShipping);
762 }
763
764
769 public int getStockQuantity() {
770 return _shoppingItem.getStockQuantity();
771 }
772
773
778 public void setStockQuantity(int stockQuantity) {
779 _shoppingItem.setStockQuantity(stockQuantity);
780 }
781
782
787 public boolean getFeatured() {
788 return _shoppingItem.getFeatured();
789 }
790
791
796 public boolean isFeatured() {
797 return _shoppingItem.isFeatured();
798 }
799
800
805 public void setFeatured(boolean featured) {
806 _shoppingItem.setFeatured(featured);
807 }
808
809
814 public boolean getSale() {
815 return _shoppingItem.getSale();
816 }
817
818
823 public boolean isSale() {
824 return _shoppingItem.isSale();
825 }
826
827
832 public void setSale(boolean sale) {
833 _shoppingItem.setSale(sale);
834 }
835
836
841 public boolean getSmallImage() {
842 return _shoppingItem.getSmallImage();
843 }
844
845
850 public boolean isSmallImage() {
851 return _shoppingItem.isSmallImage();
852 }
853
854
859 public void setSmallImage(boolean smallImage) {
860 _shoppingItem.setSmallImage(smallImage);
861 }
862
863
868 public long getSmallImageId() {
869 return _shoppingItem.getSmallImageId();
870 }
871
872
877 public void setSmallImageId(long smallImageId) {
878 _shoppingItem.setSmallImageId(smallImageId);
879 }
880
881
886 public java.lang.String getSmallImageURL() {
887 return _shoppingItem.getSmallImageURL();
888 }
889
890
895 public void setSmallImageURL(java.lang.String smallImageURL) {
896 _shoppingItem.setSmallImageURL(smallImageURL);
897 }
898
899
904 public boolean getMediumImage() {
905 return _shoppingItem.getMediumImage();
906 }
907
908
913 public boolean isMediumImage() {
914 return _shoppingItem.isMediumImage();
915 }
916
917
922 public void setMediumImage(boolean mediumImage) {
923 _shoppingItem.setMediumImage(mediumImage);
924 }
925
926
931 public long getMediumImageId() {
932 return _shoppingItem.getMediumImageId();
933 }
934
935
940 public void setMediumImageId(long mediumImageId) {
941 _shoppingItem.setMediumImageId(mediumImageId);
942 }
943
944
949 public java.lang.String getMediumImageURL() {
950 return _shoppingItem.getMediumImageURL();
951 }
952
953
958 public void setMediumImageURL(java.lang.String mediumImageURL) {
959 _shoppingItem.setMediumImageURL(mediumImageURL);
960 }
961
962
967 public boolean getLargeImage() {
968 return _shoppingItem.getLargeImage();
969 }
970
971
976 public boolean isLargeImage() {
977 return _shoppingItem.isLargeImage();
978 }
979
980
985 public void setLargeImage(boolean largeImage) {
986 _shoppingItem.setLargeImage(largeImage);
987 }
988
989
994 public long getLargeImageId() {
995 return _shoppingItem.getLargeImageId();
996 }
997
998
1003 public void setLargeImageId(long largeImageId) {
1004 _shoppingItem.setLargeImageId(largeImageId);
1005 }
1006
1007
1012 public java.lang.String getLargeImageURL() {
1013 return _shoppingItem.getLargeImageURL();
1014 }
1015
1016
1021 public void setLargeImageURL(java.lang.String largeImageURL) {
1022 _shoppingItem.setLargeImageURL(largeImageURL);
1023 }
1024
1025 public boolean isNew() {
1026 return _shoppingItem.isNew();
1027 }
1028
1029 public void setNew(boolean n) {
1030 _shoppingItem.setNew(n);
1031 }
1032
1033 public boolean isCachedModel() {
1034 return _shoppingItem.isCachedModel();
1035 }
1036
1037 public void setCachedModel(boolean cachedModel) {
1038 _shoppingItem.setCachedModel(cachedModel);
1039 }
1040
1041 public boolean isEscapedModel() {
1042 return _shoppingItem.isEscapedModel();
1043 }
1044
1045 public java.io.Serializable getPrimaryKeyObj() {
1046 return _shoppingItem.getPrimaryKeyObj();
1047 }
1048
1049 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
1050 _shoppingItem.setPrimaryKeyObj(primaryKeyObj);
1051 }
1052
1053 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
1054 return _shoppingItem.getExpandoBridge();
1055 }
1056
1057 public void setExpandoBridgeAttributes(
1058 com.liferay.portal.service.ServiceContext serviceContext) {
1059 _shoppingItem.setExpandoBridgeAttributes(serviceContext);
1060 }
1061
1062 @Override
1063 public java.lang.Object clone() {
1064 return new ShoppingItemWrapper((ShoppingItem)_shoppingItem.clone());
1065 }
1066
1067 public int compareTo(
1068 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) {
1069 return _shoppingItem.compareTo(shoppingItem);
1070 }
1071
1072 @Override
1073 public int hashCode() {
1074 return _shoppingItem.hashCode();
1075 }
1076
1077 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingItem> toCacheModel() {
1078 return _shoppingItem.toCacheModel();
1079 }
1080
1081 public com.liferay.portlet.shopping.model.ShoppingItem toEscapedModel() {
1082 return new ShoppingItemWrapper(_shoppingItem.toEscapedModel());
1083 }
1084
1085 @Override
1086 public java.lang.String toString() {
1087 return _shoppingItem.toString();
1088 }
1089
1090 public java.lang.String toXmlString() {
1091 return _shoppingItem.toXmlString();
1092 }
1093
1094 public void persist()
1095 throws com.liferay.portal.kernel.exception.SystemException {
1096 _shoppingItem.persist();
1097 }
1098
1099 public com.liferay.portlet.shopping.model.ShoppingCategory getCategory() {
1100 return _shoppingItem.getCategory();
1101 }
1102
1103 public java.lang.String[] getFieldsQuantitiesArray() {
1104 return _shoppingItem.getFieldsQuantitiesArray();
1105 }
1106
1107 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getItemPrices()
1108 throws com.liferay.portal.kernel.exception.PortalException,
1109 com.liferay.portal.kernel.exception.SystemException {
1110 return _shoppingItem.getItemPrices();
1111 }
1112
1113 public void setFieldsQuantitiesArray(
1114 java.lang.String[] fieldsQuantitiesArray) {
1115 _shoppingItem.setFieldsQuantitiesArray(fieldsQuantitiesArray);
1116 }
1117
1118
1121 public ShoppingItem getWrappedShoppingItem() {
1122 return _shoppingItem;
1123 }
1124
1125 public ShoppingItem getWrappedModel() {
1126 return _shoppingItem;
1127 }
1128
1129 public void resetOriginalValues() {
1130 _shoppingItem.resetOriginalValues();
1131 }
1132
1133 private ShoppingItem _shoppingItem;
1134 }