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