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 ShoppingItemWrapper implements ShoppingItem,
037 ModelWrapper<ShoppingItem> {
038 public ShoppingItemWrapper(ShoppingItem shoppingItem) {
039 _shoppingItem = shoppingItem;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return ShoppingItem.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return ShoppingItem.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("itemId", getItemId());
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("categoryId", getCategoryId());
064 attributes.put("sku", getSku());
065 attributes.put("name", getName());
066 attributes.put("description", getDescription());
067 attributes.put("properties", getProperties());
068 attributes.put("fields", getFields());
069 attributes.put("fieldsQuantities", getFieldsQuantities());
070 attributes.put("minQuantity", getMinQuantity());
071 attributes.put("maxQuantity", getMaxQuantity());
072 attributes.put("price", getPrice());
073 attributes.put("discount", getDiscount());
074 attributes.put("taxable", getTaxable());
075 attributes.put("shipping", getShipping());
076 attributes.put("useShippingFormula", getUseShippingFormula());
077 attributes.put("requiresShipping", getRequiresShipping());
078 attributes.put("stockQuantity", getStockQuantity());
079 attributes.put("featured", getFeatured());
080 attributes.put("sale", getSale());
081 attributes.put("smallImage", getSmallImage());
082 attributes.put("smallImageId", getSmallImageId());
083 attributes.put("smallImageURL", getSmallImageURL());
084 attributes.put("mediumImage", getMediumImage());
085 attributes.put("mediumImageId", getMediumImageId());
086 attributes.put("mediumImageURL", getMediumImageURL());
087 attributes.put("largeImage", getLargeImage());
088 attributes.put("largeImageId", getLargeImageId());
089 attributes.put("largeImageURL", getLargeImageURL());
090
091 return attributes;
092 }
093
094 @Override
095 public void setModelAttributes(Map<String, Object> attributes) {
096 Long itemId = (Long)attributes.get("itemId");
097
098 if (itemId != null) {
099 setItemId(itemId);
100 }
101
102 Long groupId = (Long)attributes.get("groupId");
103
104 if (groupId != null) {
105 setGroupId(groupId);
106 }
107
108 Long companyId = (Long)attributes.get("companyId");
109
110 if (companyId != null) {
111 setCompanyId(companyId);
112 }
113
114 Long userId = (Long)attributes.get("userId");
115
116 if (userId != null) {
117 setUserId(userId);
118 }
119
120 String userName = (String)attributes.get("userName");
121
122 if (userName != null) {
123 setUserName(userName);
124 }
125
126 Date createDate = (Date)attributes.get("createDate");
127
128 if (createDate != null) {
129 setCreateDate(createDate);
130 }
131
132 Date modifiedDate = (Date)attributes.get("modifiedDate");
133
134 if (modifiedDate != null) {
135 setModifiedDate(modifiedDate);
136 }
137
138 Long categoryId = (Long)attributes.get("categoryId");
139
140 if (categoryId != null) {
141 setCategoryId(categoryId);
142 }
143
144 String sku = (String)attributes.get("sku");
145
146 if (sku != null) {
147 setSku(sku);
148 }
149
150 String name = (String)attributes.get("name");
151
152 if (name != null) {
153 setName(name);
154 }
155
156 String description = (String)attributes.get("description");
157
158 if (description != null) {
159 setDescription(description);
160 }
161
162 String properties = (String)attributes.get("properties");
163
164 if (properties != null) {
165 setProperties(properties);
166 }
167
168 Boolean fields = (Boolean)attributes.get("fields");
169
170 if (fields != null) {
171 setFields(fields);
172 }
173
174 String fieldsQuantities = (String)attributes.get("fieldsQuantities");
175
176 if (fieldsQuantities != null) {
177 setFieldsQuantities(fieldsQuantities);
178 }
179
180 Integer minQuantity = (Integer)attributes.get("minQuantity");
181
182 if (minQuantity != null) {
183 setMinQuantity(minQuantity);
184 }
185
186 Integer maxQuantity = (Integer)attributes.get("maxQuantity");
187
188 if (maxQuantity != null) {
189 setMaxQuantity(maxQuantity);
190 }
191
192 Double price = (Double)attributes.get("price");
193
194 if (price != null) {
195 setPrice(price);
196 }
197
198 Double discount = (Double)attributes.get("discount");
199
200 if (discount != null) {
201 setDiscount(discount);
202 }
203
204 Boolean taxable = (Boolean)attributes.get("taxable");
205
206 if (taxable != null) {
207 setTaxable(taxable);
208 }
209
210 Double shipping = (Double)attributes.get("shipping");
211
212 if (shipping != null) {
213 setShipping(shipping);
214 }
215
216 Boolean useShippingFormula = (Boolean)attributes.get(
217 "useShippingFormula");
218
219 if (useShippingFormula != null) {
220 setUseShippingFormula(useShippingFormula);
221 }
222
223 Boolean requiresShipping = (Boolean)attributes.get("requiresShipping");
224
225 if (requiresShipping != null) {
226 setRequiresShipping(requiresShipping);
227 }
228
229 Integer stockQuantity = (Integer)attributes.get("stockQuantity");
230
231 if (stockQuantity != null) {
232 setStockQuantity(stockQuantity);
233 }
234
235 Boolean featured = (Boolean)attributes.get("featured");
236
237 if (featured != null) {
238 setFeatured(featured);
239 }
240
241 Boolean sale = (Boolean)attributes.get("sale");
242
243 if (sale != null) {
244 setSale(sale);
245 }
246
247 Boolean smallImage = (Boolean)attributes.get("smallImage");
248
249 if (smallImage != null) {
250 setSmallImage(smallImage);
251 }
252
253 Long smallImageId = (Long)attributes.get("smallImageId");
254
255 if (smallImageId != null) {
256 setSmallImageId(smallImageId);
257 }
258
259 String smallImageURL = (String)attributes.get("smallImageURL");
260
261 if (smallImageURL != null) {
262 setSmallImageURL(smallImageURL);
263 }
264
265 Boolean mediumImage = (Boolean)attributes.get("mediumImage");
266
267 if (mediumImage != null) {
268 setMediumImage(mediumImage);
269 }
270
271 Long mediumImageId = (Long)attributes.get("mediumImageId");
272
273 if (mediumImageId != null) {
274 setMediumImageId(mediumImageId);
275 }
276
277 String mediumImageURL = (String)attributes.get("mediumImageURL");
278
279 if (mediumImageURL != null) {
280 setMediumImageURL(mediumImageURL);
281 }
282
283 Boolean largeImage = (Boolean)attributes.get("largeImage");
284
285 if (largeImage != null) {
286 setLargeImage(largeImage);
287 }
288
289 Long largeImageId = (Long)attributes.get("largeImageId");
290
291 if (largeImageId != null) {
292 setLargeImageId(largeImageId);
293 }
294
295 String largeImageURL = (String)attributes.get("largeImageURL");
296
297 if (largeImageURL != null) {
298 setLargeImageURL(largeImageURL);
299 }
300 }
301
302
307 @Override
308 public long getPrimaryKey() {
309 return _shoppingItem.getPrimaryKey();
310 }
311
312
317 @Override
318 public void setPrimaryKey(long primaryKey) {
319 _shoppingItem.setPrimaryKey(primaryKey);
320 }
321
322
327 @Override
328 public long getItemId() {
329 return _shoppingItem.getItemId();
330 }
331
332
337 @Override
338 public void setItemId(long itemId) {
339 _shoppingItem.setItemId(itemId);
340 }
341
342
347 @Override
348 public long getGroupId() {
349 return _shoppingItem.getGroupId();
350 }
351
352
357 @Override
358 public void setGroupId(long groupId) {
359 _shoppingItem.setGroupId(groupId);
360 }
361
362
367 @Override
368 public long getCompanyId() {
369 return _shoppingItem.getCompanyId();
370 }
371
372
377 @Override
378 public void setCompanyId(long companyId) {
379 _shoppingItem.setCompanyId(companyId);
380 }
381
382
387 @Override
388 public long getUserId() {
389 return _shoppingItem.getUserId();
390 }
391
392
397 @Override
398 public void setUserId(long userId) {
399 _shoppingItem.setUserId(userId);
400 }
401
402
408 @Override
409 public java.lang.String getUserUuid()
410 throws com.liferay.portal.kernel.exception.SystemException {
411 return _shoppingItem.getUserUuid();
412 }
413
414
419 @Override
420 public void setUserUuid(java.lang.String userUuid) {
421 _shoppingItem.setUserUuid(userUuid);
422 }
423
424
429 @Override
430 public java.lang.String getUserName() {
431 return _shoppingItem.getUserName();
432 }
433
434
439 @Override
440 public void setUserName(java.lang.String userName) {
441 _shoppingItem.setUserName(userName);
442 }
443
444
449 @Override
450 public java.util.Date getCreateDate() {
451 return _shoppingItem.getCreateDate();
452 }
453
454
459 @Override
460 public void setCreateDate(java.util.Date createDate) {
461 _shoppingItem.setCreateDate(createDate);
462 }
463
464
469 @Override
470 public java.util.Date getModifiedDate() {
471 return _shoppingItem.getModifiedDate();
472 }
473
474
479 @Override
480 public void setModifiedDate(java.util.Date modifiedDate) {
481 _shoppingItem.setModifiedDate(modifiedDate);
482 }
483
484
489 @Override
490 public long getCategoryId() {
491 return _shoppingItem.getCategoryId();
492 }
493
494
499 @Override
500 public void setCategoryId(long categoryId) {
501 _shoppingItem.setCategoryId(categoryId);
502 }
503
504
509 @Override
510 public java.lang.String getSku() {
511 return _shoppingItem.getSku();
512 }
513
514
519 @Override
520 public void setSku(java.lang.String sku) {
521 _shoppingItem.setSku(sku);
522 }
523
524
529 @Override
530 public java.lang.String getName() {
531 return _shoppingItem.getName();
532 }
533
534
539 @Override
540 public void setName(java.lang.String name) {
541 _shoppingItem.setName(name);
542 }
543
544
549 @Override
550 public java.lang.String getDescription() {
551 return _shoppingItem.getDescription();
552 }
553
554
559 @Override
560 public void setDescription(java.lang.String description) {
561 _shoppingItem.setDescription(description);
562 }
563
564
569 @Override
570 public java.lang.String getProperties() {
571 return _shoppingItem.getProperties();
572 }
573
574
579 @Override
580 public void setProperties(java.lang.String properties) {
581 _shoppingItem.setProperties(properties);
582 }
583
584
589 @Override
590 public boolean getFields() {
591 return _shoppingItem.getFields();
592 }
593
594
599 @Override
600 public boolean isFields() {
601 return _shoppingItem.isFields();
602 }
603
604
609 @Override
610 public void setFields(boolean fields) {
611 _shoppingItem.setFields(fields);
612 }
613
614
619 @Override
620 public java.lang.String getFieldsQuantities() {
621 return _shoppingItem.getFieldsQuantities();
622 }
623
624
629 @Override
630 public void setFieldsQuantities(java.lang.String fieldsQuantities) {
631 _shoppingItem.setFieldsQuantities(fieldsQuantities);
632 }
633
634
639 @Override
640 public int getMinQuantity() {
641 return _shoppingItem.getMinQuantity();
642 }
643
644
649 @Override
650 public void setMinQuantity(int minQuantity) {
651 _shoppingItem.setMinQuantity(minQuantity);
652 }
653
654
659 @Override
660 public int getMaxQuantity() {
661 return _shoppingItem.getMaxQuantity();
662 }
663
664
669 @Override
670 public void setMaxQuantity(int maxQuantity) {
671 _shoppingItem.setMaxQuantity(maxQuantity);
672 }
673
674
679 @Override
680 public double getPrice() {
681 return _shoppingItem.getPrice();
682 }
683
684
689 @Override
690 public void setPrice(double price) {
691 _shoppingItem.setPrice(price);
692 }
693
694
699 @Override
700 public double getDiscount() {
701 return _shoppingItem.getDiscount();
702 }
703
704
709 @Override
710 public void setDiscount(double discount) {
711 _shoppingItem.setDiscount(discount);
712 }
713
714
719 @Override
720 public boolean getTaxable() {
721 return _shoppingItem.getTaxable();
722 }
723
724
729 @Override
730 public boolean isTaxable() {
731 return _shoppingItem.isTaxable();
732 }
733
734
739 @Override
740 public void setTaxable(boolean taxable) {
741 _shoppingItem.setTaxable(taxable);
742 }
743
744
749 @Override
750 public double getShipping() {
751 return _shoppingItem.getShipping();
752 }
753
754
759 @Override
760 public void setShipping(double shipping) {
761 _shoppingItem.setShipping(shipping);
762 }
763
764
769 @Override
770 public boolean getUseShippingFormula() {
771 return _shoppingItem.getUseShippingFormula();
772 }
773
774
779 @Override
780 public boolean isUseShippingFormula() {
781 return _shoppingItem.isUseShippingFormula();
782 }
783
784
789 @Override
790 public void setUseShippingFormula(boolean useShippingFormula) {
791 _shoppingItem.setUseShippingFormula(useShippingFormula);
792 }
793
794
799 @Override
800 public boolean getRequiresShipping() {
801 return _shoppingItem.getRequiresShipping();
802 }
803
804
809 @Override
810 public boolean isRequiresShipping() {
811 return _shoppingItem.isRequiresShipping();
812 }
813
814
819 @Override
820 public void setRequiresShipping(boolean requiresShipping) {
821 _shoppingItem.setRequiresShipping(requiresShipping);
822 }
823
824
829 @Override
830 public int getStockQuantity() {
831 return _shoppingItem.getStockQuantity();
832 }
833
834
839 @Override
840 public void setStockQuantity(int stockQuantity) {
841 _shoppingItem.setStockQuantity(stockQuantity);
842 }
843
844
849 @Override
850 public boolean getFeatured() {
851 return _shoppingItem.getFeatured();
852 }
853
854
859 @Override
860 public boolean isFeatured() {
861 return _shoppingItem.isFeatured();
862 }
863
864
869 @Override
870 public void setFeatured(boolean featured) {
871 _shoppingItem.setFeatured(featured);
872 }
873
874
879 @Override
880 public boolean getSale() {
881 return _shoppingItem.getSale();
882 }
883
884
889 @Override
890 public boolean isSale() {
891 return _shoppingItem.isSale();
892 }
893
894
899 @Override
900 public void setSale(boolean sale) {
901 _shoppingItem.setSale(sale);
902 }
903
904
909 @Override
910 public boolean getSmallImage() {
911 return _shoppingItem.getSmallImage();
912 }
913
914
919 @Override
920 public boolean isSmallImage() {
921 return _shoppingItem.isSmallImage();
922 }
923
924
929 @Override
930 public void setSmallImage(boolean smallImage) {
931 _shoppingItem.setSmallImage(smallImage);
932 }
933
934
939 @Override
940 public long getSmallImageId() {
941 return _shoppingItem.getSmallImageId();
942 }
943
944
949 @Override
950 public void setSmallImageId(long smallImageId) {
951 _shoppingItem.setSmallImageId(smallImageId);
952 }
953
954
959 @Override
960 public java.lang.String getSmallImageURL() {
961 return _shoppingItem.getSmallImageURL();
962 }
963
964
969 @Override
970 public void setSmallImageURL(java.lang.String smallImageURL) {
971 _shoppingItem.setSmallImageURL(smallImageURL);
972 }
973
974
979 @Override
980 public boolean getMediumImage() {
981 return _shoppingItem.getMediumImage();
982 }
983
984
989 @Override
990 public boolean isMediumImage() {
991 return _shoppingItem.isMediumImage();
992 }
993
994
999 @Override
1000 public void setMediumImage(boolean mediumImage) {
1001 _shoppingItem.setMediumImage(mediumImage);
1002 }
1003
1004
1009 @Override
1010 public long getMediumImageId() {
1011 return _shoppingItem.getMediumImageId();
1012 }
1013
1014
1019 @Override
1020 public void setMediumImageId(long mediumImageId) {
1021 _shoppingItem.setMediumImageId(mediumImageId);
1022 }
1023
1024
1029 @Override
1030 public java.lang.String getMediumImageURL() {
1031 return _shoppingItem.getMediumImageURL();
1032 }
1033
1034
1039 @Override
1040 public void setMediumImageURL(java.lang.String mediumImageURL) {
1041 _shoppingItem.setMediumImageURL(mediumImageURL);
1042 }
1043
1044
1049 @Override
1050 public boolean getLargeImage() {
1051 return _shoppingItem.getLargeImage();
1052 }
1053
1054
1059 @Override
1060 public boolean isLargeImage() {
1061 return _shoppingItem.isLargeImage();
1062 }
1063
1064
1069 @Override
1070 public void setLargeImage(boolean largeImage) {
1071 _shoppingItem.setLargeImage(largeImage);
1072 }
1073
1074
1079 @Override
1080 public long getLargeImageId() {
1081 return _shoppingItem.getLargeImageId();
1082 }
1083
1084
1089 @Override
1090 public void setLargeImageId(long largeImageId) {
1091 _shoppingItem.setLargeImageId(largeImageId);
1092 }
1093
1094
1099 @Override
1100 public java.lang.String getLargeImageURL() {
1101 return _shoppingItem.getLargeImageURL();
1102 }
1103
1104
1109 @Override
1110 public void setLargeImageURL(java.lang.String largeImageURL) {
1111 _shoppingItem.setLargeImageURL(largeImageURL);
1112 }
1113
1114 @Override
1115 public boolean isNew() {
1116 return _shoppingItem.isNew();
1117 }
1118
1119 @Override
1120 public void setNew(boolean n) {
1121 _shoppingItem.setNew(n);
1122 }
1123
1124 @Override
1125 public boolean isCachedModel() {
1126 return _shoppingItem.isCachedModel();
1127 }
1128
1129 @Override
1130 public void setCachedModel(boolean cachedModel) {
1131 _shoppingItem.setCachedModel(cachedModel);
1132 }
1133
1134 @Override
1135 public boolean isEscapedModel() {
1136 return _shoppingItem.isEscapedModel();
1137 }
1138
1139 @Override
1140 public java.io.Serializable getPrimaryKeyObj() {
1141 return _shoppingItem.getPrimaryKeyObj();
1142 }
1143
1144 @Override
1145 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
1146 _shoppingItem.setPrimaryKeyObj(primaryKeyObj);
1147 }
1148
1149 @Override
1150 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
1151 return _shoppingItem.getExpandoBridge();
1152 }
1153
1154 @Override
1155 public void setExpandoBridgeAttributes(
1156 com.liferay.portal.model.BaseModel<?> baseModel) {
1157 _shoppingItem.setExpandoBridgeAttributes(baseModel);
1158 }
1159
1160 @Override
1161 public void setExpandoBridgeAttributes(
1162 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
1163 _shoppingItem.setExpandoBridgeAttributes(expandoBridge);
1164 }
1165
1166 @Override
1167 public void setExpandoBridgeAttributes(
1168 com.liferay.portal.service.ServiceContext serviceContext) {
1169 _shoppingItem.setExpandoBridgeAttributes(serviceContext);
1170 }
1171
1172 @Override
1173 public java.lang.Object clone() {
1174 return new ShoppingItemWrapper((ShoppingItem)_shoppingItem.clone());
1175 }
1176
1177 @Override
1178 public int compareTo(
1179 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) {
1180 return _shoppingItem.compareTo(shoppingItem);
1181 }
1182
1183 @Override
1184 public int hashCode() {
1185 return _shoppingItem.hashCode();
1186 }
1187
1188 @Override
1189 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingItem> toCacheModel() {
1190 return _shoppingItem.toCacheModel();
1191 }
1192
1193 @Override
1194 public com.liferay.portlet.shopping.model.ShoppingItem toEscapedModel() {
1195 return new ShoppingItemWrapper(_shoppingItem.toEscapedModel());
1196 }
1197
1198 @Override
1199 public com.liferay.portlet.shopping.model.ShoppingItem toUnescapedModel() {
1200 return new ShoppingItemWrapper(_shoppingItem.toUnescapedModel());
1201 }
1202
1203 @Override
1204 public java.lang.String toString() {
1205 return _shoppingItem.toString();
1206 }
1207
1208 @Override
1209 public java.lang.String toXmlString() {
1210 return _shoppingItem.toXmlString();
1211 }
1212
1213 @Override
1214 public void persist()
1215 throws com.liferay.portal.kernel.exception.SystemException {
1216 _shoppingItem.persist();
1217 }
1218
1219 @Override
1220 public com.liferay.portlet.shopping.model.ShoppingCategory getCategory() {
1221 return _shoppingItem.getCategory();
1222 }
1223
1224 @Override
1225 public java.lang.String[] getFieldsQuantitiesArray() {
1226 return _shoppingItem.getFieldsQuantitiesArray();
1227 }
1228
1229 @Override
1230 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getItemPrices()
1231 throws com.liferay.portal.kernel.exception.PortalException,
1232 com.liferay.portal.kernel.exception.SystemException {
1233 return _shoppingItem.getItemPrices();
1234 }
1235
1236 @Override
1237 public boolean isInfiniteStock() {
1238 return _shoppingItem.isInfiniteStock();
1239 }
1240
1241 @Override
1242 public void setFieldsQuantitiesArray(
1243 java.lang.String[] fieldsQuantitiesArray) {
1244 _shoppingItem.setFieldsQuantitiesArray(fieldsQuantitiesArray);
1245 }
1246
1247 @Override
1248 public boolean equals(Object obj) {
1249 if (this == obj) {
1250 return true;
1251 }
1252
1253 if (!(obj instanceof ShoppingItemWrapper)) {
1254 return false;
1255 }
1256
1257 ShoppingItemWrapper shoppingItemWrapper = (ShoppingItemWrapper)obj;
1258
1259 if (Validator.equals(_shoppingItem, shoppingItemWrapper._shoppingItem)) {
1260 return true;
1261 }
1262
1263 return false;
1264 }
1265
1266
1269 public ShoppingItem getWrappedShoppingItem() {
1270 return _shoppingItem;
1271 }
1272
1273 @Override
1274 public ShoppingItem getWrappedModel() {
1275 return _shoppingItem;
1276 }
1277
1278 @Override
1279 public void resetOriginalValues() {
1280 _shoppingItem.resetOriginalValues();
1281 }
1282
1283 private ShoppingItem _shoppingItem;
1284 }