001
014
015 package com.liferay.portlet.shopping.service.base;
016
017 import com.liferay.counter.service.CounterLocalService;
018
019 import com.liferay.portal.kernel.annotation.BeanReference;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023 import com.liferay.portal.kernel.exception.PortalException;
024 import com.liferay.portal.kernel.exception.SystemException;
025 import com.liferay.portal.kernel.util.OrderByComparator;
026 import com.liferay.portal.service.ResourceLocalService;
027 import com.liferay.portal.service.ResourceService;
028 import com.liferay.portal.service.UserLocalService;
029 import com.liferay.portal.service.UserService;
030 import com.liferay.portal.service.persistence.ResourceFinder;
031 import com.liferay.portal.service.persistence.ResourcePersistence;
032 import com.liferay.portal.service.persistence.UserFinder;
033 import com.liferay.portal.service.persistence.UserPersistence;
034
035 import com.liferay.portlet.shopping.model.ShoppingItemPrice;
036 import com.liferay.portlet.shopping.service.ShoppingCartLocalService;
037 import com.liferay.portlet.shopping.service.ShoppingCategoryLocalService;
038 import com.liferay.portlet.shopping.service.ShoppingCategoryService;
039 import com.liferay.portlet.shopping.service.ShoppingCouponLocalService;
040 import com.liferay.portlet.shopping.service.ShoppingCouponService;
041 import com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService;
042 import com.liferay.portlet.shopping.service.ShoppingItemLocalService;
043 import com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService;
044 import com.liferay.portlet.shopping.service.ShoppingItemService;
045 import com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService;
046 import com.liferay.portlet.shopping.service.ShoppingOrderLocalService;
047 import com.liferay.portlet.shopping.service.ShoppingOrderService;
048 import com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence;
049 import com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence;
050 import com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder;
051 import com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence;
052 import com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence;
053 import com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder;
054 import com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence;
055 import com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence;
056 import com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder;
057 import com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence;
058 import com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence;
059
060 import java.util.List;
061
062 import javax.sql.DataSource;
063
064
080 public abstract class ShoppingItemPriceLocalServiceBaseImpl
081 implements ShoppingItemPriceLocalService {
082
089 public ShoppingItemPrice addShoppingItemPrice(
090 ShoppingItemPrice shoppingItemPrice) throws SystemException {
091 shoppingItemPrice.setNew(true);
092
093 return shoppingItemPricePersistence.update(shoppingItemPrice, false);
094 }
095
096
102 public ShoppingItemPrice createShoppingItemPrice(long itemPriceId) {
103 return shoppingItemPricePersistence.create(itemPriceId);
104 }
105
106
113 public void deleteShoppingItemPrice(long itemPriceId)
114 throws PortalException, SystemException {
115 shoppingItemPricePersistence.remove(itemPriceId);
116 }
117
118
124 public void deleteShoppingItemPrice(ShoppingItemPrice shoppingItemPrice)
125 throws SystemException {
126 shoppingItemPricePersistence.remove(shoppingItemPrice);
127 }
128
129
136 @SuppressWarnings("rawtypes")
137 public List dynamicQuery(DynamicQuery dynamicQuery)
138 throws SystemException {
139 return shoppingItemPricePersistence.findWithDynamicQuery(dynamicQuery);
140 }
141
142
155 @SuppressWarnings("rawtypes")
156 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
157 throws SystemException {
158 return shoppingItemPricePersistence.findWithDynamicQuery(dynamicQuery,
159 start, end);
160 }
161
162
176 @SuppressWarnings("rawtypes")
177 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
178 OrderByComparator orderByComparator) throws SystemException {
179 return shoppingItemPricePersistence.findWithDynamicQuery(dynamicQuery,
180 start, end, orderByComparator);
181 }
182
183
190 public long dynamicQueryCount(DynamicQuery dynamicQuery)
191 throws SystemException {
192 return shoppingItemPricePersistence.countWithDynamicQuery(dynamicQuery);
193 }
194
195
203 public ShoppingItemPrice getShoppingItemPrice(long itemPriceId)
204 throws PortalException, SystemException {
205 return shoppingItemPricePersistence.findByPrimaryKey(itemPriceId);
206 }
207
208
220 public List<ShoppingItemPrice> getShoppingItemPrices(int start, int end)
221 throws SystemException {
222 return shoppingItemPricePersistence.findAll(start, end);
223 }
224
225
231 public int getShoppingItemPricesCount() throws SystemException {
232 return shoppingItemPricePersistence.countAll();
233 }
234
235
242 public ShoppingItemPrice updateShoppingItemPrice(
243 ShoppingItemPrice shoppingItemPrice) throws SystemException {
244 shoppingItemPrice.setNew(false);
245
246 return shoppingItemPricePersistence.update(shoppingItemPrice, true);
247 }
248
249
257 public ShoppingItemPrice updateShoppingItemPrice(
258 ShoppingItemPrice shoppingItemPrice, boolean merge)
259 throws SystemException {
260 shoppingItemPrice.setNew(false);
261
262 return shoppingItemPricePersistence.update(shoppingItemPrice, merge);
263 }
264
265
270 public ShoppingCartLocalService getShoppingCartLocalService() {
271 return shoppingCartLocalService;
272 }
273
274
279 public void setShoppingCartLocalService(
280 ShoppingCartLocalService shoppingCartLocalService) {
281 this.shoppingCartLocalService = shoppingCartLocalService;
282 }
283
284
289 public ShoppingCartPersistence getShoppingCartPersistence() {
290 return shoppingCartPersistence;
291 }
292
293
298 public void setShoppingCartPersistence(
299 ShoppingCartPersistence shoppingCartPersistence) {
300 this.shoppingCartPersistence = shoppingCartPersistence;
301 }
302
303
308 public ShoppingCategoryLocalService getShoppingCategoryLocalService() {
309 return shoppingCategoryLocalService;
310 }
311
312
317 public void setShoppingCategoryLocalService(
318 ShoppingCategoryLocalService shoppingCategoryLocalService) {
319 this.shoppingCategoryLocalService = shoppingCategoryLocalService;
320 }
321
322
327 public ShoppingCategoryService getShoppingCategoryService() {
328 return shoppingCategoryService;
329 }
330
331
336 public void setShoppingCategoryService(
337 ShoppingCategoryService shoppingCategoryService) {
338 this.shoppingCategoryService = shoppingCategoryService;
339 }
340
341
346 public ShoppingCategoryPersistence getShoppingCategoryPersistence() {
347 return shoppingCategoryPersistence;
348 }
349
350
355 public void setShoppingCategoryPersistence(
356 ShoppingCategoryPersistence shoppingCategoryPersistence) {
357 this.shoppingCategoryPersistence = shoppingCategoryPersistence;
358 }
359
360
365 public ShoppingCouponLocalService getShoppingCouponLocalService() {
366 return shoppingCouponLocalService;
367 }
368
369
374 public void setShoppingCouponLocalService(
375 ShoppingCouponLocalService shoppingCouponLocalService) {
376 this.shoppingCouponLocalService = shoppingCouponLocalService;
377 }
378
379
384 public ShoppingCouponService getShoppingCouponService() {
385 return shoppingCouponService;
386 }
387
388
393 public void setShoppingCouponService(
394 ShoppingCouponService shoppingCouponService) {
395 this.shoppingCouponService = shoppingCouponService;
396 }
397
398
403 public ShoppingCouponPersistence getShoppingCouponPersistence() {
404 return shoppingCouponPersistence;
405 }
406
407
412 public void setShoppingCouponPersistence(
413 ShoppingCouponPersistence shoppingCouponPersistence) {
414 this.shoppingCouponPersistence = shoppingCouponPersistence;
415 }
416
417
422 public ShoppingCouponFinder getShoppingCouponFinder() {
423 return shoppingCouponFinder;
424 }
425
426
431 public void setShoppingCouponFinder(
432 ShoppingCouponFinder shoppingCouponFinder) {
433 this.shoppingCouponFinder = shoppingCouponFinder;
434 }
435
436
441 public ShoppingItemLocalService getShoppingItemLocalService() {
442 return shoppingItemLocalService;
443 }
444
445
450 public void setShoppingItemLocalService(
451 ShoppingItemLocalService shoppingItemLocalService) {
452 this.shoppingItemLocalService = shoppingItemLocalService;
453 }
454
455
460 public ShoppingItemService getShoppingItemService() {
461 return shoppingItemService;
462 }
463
464
469 public void setShoppingItemService(ShoppingItemService shoppingItemService) {
470 this.shoppingItemService = shoppingItemService;
471 }
472
473
478 public ShoppingItemPersistence getShoppingItemPersistence() {
479 return shoppingItemPersistence;
480 }
481
482
487 public void setShoppingItemPersistence(
488 ShoppingItemPersistence shoppingItemPersistence) {
489 this.shoppingItemPersistence = shoppingItemPersistence;
490 }
491
492
497 public ShoppingItemFinder getShoppingItemFinder() {
498 return shoppingItemFinder;
499 }
500
501
506 public void setShoppingItemFinder(ShoppingItemFinder shoppingItemFinder) {
507 this.shoppingItemFinder = shoppingItemFinder;
508 }
509
510
515 public ShoppingItemFieldLocalService getShoppingItemFieldLocalService() {
516 return shoppingItemFieldLocalService;
517 }
518
519
524 public void setShoppingItemFieldLocalService(
525 ShoppingItemFieldLocalService shoppingItemFieldLocalService) {
526 this.shoppingItemFieldLocalService = shoppingItemFieldLocalService;
527 }
528
529
534 public ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
535 return shoppingItemFieldPersistence;
536 }
537
538
543 public void setShoppingItemFieldPersistence(
544 ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
545 this.shoppingItemFieldPersistence = shoppingItemFieldPersistence;
546 }
547
548
553 public ShoppingItemPriceLocalService getShoppingItemPriceLocalService() {
554 return shoppingItemPriceLocalService;
555 }
556
557
562 public void setShoppingItemPriceLocalService(
563 ShoppingItemPriceLocalService shoppingItemPriceLocalService) {
564 this.shoppingItemPriceLocalService = shoppingItemPriceLocalService;
565 }
566
567
572 public ShoppingItemPricePersistence getShoppingItemPricePersistence() {
573 return shoppingItemPricePersistence;
574 }
575
576
581 public void setShoppingItemPricePersistence(
582 ShoppingItemPricePersistence shoppingItemPricePersistence) {
583 this.shoppingItemPricePersistence = shoppingItemPricePersistence;
584 }
585
586
591 public ShoppingOrderLocalService getShoppingOrderLocalService() {
592 return shoppingOrderLocalService;
593 }
594
595
600 public void setShoppingOrderLocalService(
601 ShoppingOrderLocalService shoppingOrderLocalService) {
602 this.shoppingOrderLocalService = shoppingOrderLocalService;
603 }
604
605
610 public ShoppingOrderService getShoppingOrderService() {
611 return shoppingOrderService;
612 }
613
614
619 public void setShoppingOrderService(
620 ShoppingOrderService shoppingOrderService) {
621 this.shoppingOrderService = shoppingOrderService;
622 }
623
624
629 public ShoppingOrderPersistence getShoppingOrderPersistence() {
630 return shoppingOrderPersistence;
631 }
632
633
638 public void setShoppingOrderPersistence(
639 ShoppingOrderPersistence shoppingOrderPersistence) {
640 this.shoppingOrderPersistence = shoppingOrderPersistence;
641 }
642
643
648 public ShoppingOrderFinder getShoppingOrderFinder() {
649 return shoppingOrderFinder;
650 }
651
652
657 public void setShoppingOrderFinder(ShoppingOrderFinder shoppingOrderFinder) {
658 this.shoppingOrderFinder = shoppingOrderFinder;
659 }
660
661
666 public ShoppingOrderItemLocalService getShoppingOrderItemLocalService() {
667 return shoppingOrderItemLocalService;
668 }
669
670
675 public void setShoppingOrderItemLocalService(
676 ShoppingOrderItemLocalService shoppingOrderItemLocalService) {
677 this.shoppingOrderItemLocalService = shoppingOrderItemLocalService;
678 }
679
680
685 public ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
686 return shoppingOrderItemPersistence;
687 }
688
689
694 public void setShoppingOrderItemPersistence(
695 ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
696 this.shoppingOrderItemPersistence = shoppingOrderItemPersistence;
697 }
698
699
704 public CounterLocalService getCounterLocalService() {
705 return counterLocalService;
706 }
707
708
713 public void setCounterLocalService(CounterLocalService counterLocalService) {
714 this.counterLocalService = counterLocalService;
715 }
716
717
722 public ResourceLocalService getResourceLocalService() {
723 return resourceLocalService;
724 }
725
726
731 public void setResourceLocalService(
732 ResourceLocalService resourceLocalService) {
733 this.resourceLocalService = resourceLocalService;
734 }
735
736
741 public ResourceService getResourceService() {
742 return resourceService;
743 }
744
745
750 public void setResourceService(ResourceService resourceService) {
751 this.resourceService = resourceService;
752 }
753
754
759 public ResourcePersistence getResourcePersistence() {
760 return resourcePersistence;
761 }
762
763
768 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
769 this.resourcePersistence = resourcePersistence;
770 }
771
772
777 public ResourceFinder getResourceFinder() {
778 return resourceFinder;
779 }
780
781
786 public void setResourceFinder(ResourceFinder resourceFinder) {
787 this.resourceFinder = resourceFinder;
788 }
789
790
795 public UserLocalService getUserLocalService() {
796 return userLocalService;
797 }
798
799
804 public void setUserLocalService(UserLocalService userLocalService) {
805 this.userLocalService = userLocalService;
806 }
807
808
813 public UserService getUserService() {
814 return userService;
815 }
816
817
822 public void setUserService(UserService userService) {
823 this.userService = userService;
824 }
825
826
831 public UserPersistence getUserPersistence() {
832 return userPersistence;
833 }
834
835
840 public void setUserPersistence(UserPersistence userPersistence) {
841 this.userPersistence = userPersistence;
842 }
843
844
849 public UserFinder getUserFinder() {
850 return userFinder;
851 }
852
853
858 public void setUserFinder(UserFinder userFinder) {
859 this.userFinder = userFinder;
860 }
861
862
867 protected void runSQL(String sql) throws SystemException {
868 try {
869 DataSource dataSource = shoppingItemPricePersistence.getDataSource();
870
871 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
872 sql, new int[0]);
873
874 sqlUpdate.update();
875 }
876 catch (Exception e) {
877 throw new SystemException(e);
878 }
879 }
880
881 @BeanReference(type = ShoppingCartLocalService.class)
882 protected ShoppingCartLocalService shoppingCartLocalService;
883 @BeanReference(type = ShoppingCartPersistence.class)
884 protected ShoppingCartPersistence shoppingCartPersistence;
885 @BeanReference(type = ShoppingCategoryLocalService.class)
886 protected ShoppingCategoryLocalService shoppingCategoryLocalService;
887 @BeanReference(type = ShoppingCategoryService.class)
888 protected ShoppingCategoryService shoppingCategoryService;
889 @BeanReference(type = ShoppingCategoryPersistence.class)
890 protected ShoppingCategoryPersistence shoppingCategoryPersistence;
891 @BeanReference(type = ShoppingCouponLocalService.class)
892 protected ShoppingCouponLocalService shoppingCouponLocalService;
893 @BeanReference(type = ShoppingCouponService.class)
894 protected ShoppingCouponService shoppingCouponService;
895 @BeanReference(type = ShoppingCouponPersistence.class)
896 protected ShoppingCouponPersistence shoppingCouponPersistence;
897 @BeanReference(type = ShoppingCouponFinder.class)
898 protected ShoppingCouponFinder shoppingCouponFinder;
899 @BeanReference(type = ShoppingItemLocalService.class)
900 protected ShoppingItemLocalService shoppingItemLocalService;
901 @BeanReference(type = ShoppingItemService.class)
902 protected ShoppingItemService shoppingItemService;
903 @BeanReference(type = ShoppingItemPersistence.class)
904 protected ShoppingItemPersistence shoppingItemPersistence;
905 @BeanReference(type = ShoppingItemFinder.class)
906 protected ShoppingItemFinder shoppingItemFinder;
907 @BeanReference(type = ShoppingItemFieldLocalService.class)
908 protected ShoppingItemFieldLocalService shoppingItemFieldLocalService;
909 @BeanReference(type = ShoppingItemFieldPersistence.class)
910 protected ShoppingItemFieldPersistence shoppingItemFieldPersistence;
911 @BeanReference(type = ShoppingItemPriceLocalService.class)
912 protected ShoppingItemPriceLocalService shoppingItemPriceLocalService;
913 @BeanReference(type = ShoppingItemPricePersistence.class)
914 protected ShoppingItemPricePersistence shoppingItemPricePersistence;
915 @BeanReference(type = ShoppingOrderLocalService.class)
916 protected ShoppingOrderLocalService shoppingOrderLocalService;
917 @BeanReference(type = ShoppingOrderService.class)
918 protected ShoppingOrderService shoppingOrderService;
919 @BeanReference(type = ShoppingOrderPersistence.class)
920 protected ShoppingOrderPersistence shoppingOrderPersistence;
921 @BeanReference(type = ShoppingOrderFinder.class)
922 protected ShoppingOrderFinder shoppingOrderFinder;
923 @BeanReference(type = ShoppingOrderItemLocalService.class)
924 protected ShoppingOrderItemLocalService shoppingOrderItemLocalService;
925 @BeanReference(type = ShoppingOrderItemPersistence.class)
926 protected ShoppingOrderItemPersistence shoppingOrderItemPersistence;
927 @BeanReference(type = CounterLocalService.class)
928 protected CounterLocalService counterLocalService;
929 @BeanReference(type = ResourceLocalService.class)
930 protected ResourceLocalService resourceLocalService;
931 @BeanReference(type = ResourceService.class)
932 protected ResourceService resourceService;
933 @BeanReference(type = ResourcePersistence.class)
934 protected ResourcePersistence resourcePersistence;
935 @BeanReference(type = ResourceFinder.class)
936 protected ResourceFinder resourceFinder;
937 @BeanReference(type = UserLocalService.class)
938 protected UserLocalService userLocalService;
939 @BeanReference(type = UserService.class)
940 protected UserService userService;
941 @BeanReference(type = UserPersistence.class)
942 protected UserPersistence userPersistence;
943 @BeanReference(type = UserFinder.class)
944 protected UserFinder userFinder;
945 }