1
14
15 package com.liferay.portlet.shopping.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class ShoppingCartLocalServiceUtil {
42 public static com.liferay.portlet.shopping.model.ShoppingCart addShoppingCart(
43 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
44 throws com.liferay.portal.SystemException {
45 return getService().addShoppingCart(shoppingCart);
46 }
47
48 public static com.liferay.portlet.shopping.model.ShoppingCart createShoppingCart(
49 long cartId) {
50 return getService().createShoppingCart(cartId);
51 }
52
53 public static void deleteShoppingCart(long cartId)
54 throws com.liferay.portal.PortalException,
55 com.liferay.portal.SystemException {
56 getService().deleteShoppingCart(cartId);
57 }
58
59 public static void deleteShoppingCart(
60 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
61 throws com.liferay.portal.SystemException {
62 getService().deleteShoppingCart(shoppingCart);
63 }
64
65 @SuppressWarnings("rawtypes")
66 public static java.util.List dynamicQuery(
67 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68 throws com.liferay.portal.SystemException {
69 return getService().dynamicQuery(dynamicQuery);
70 }
71
72 @SuppressWarnings("rawtypes")
73 public static java.util.List dynamicQuery(
74 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75 int end) throws com.liferay.portal.SystemException {
76 return getService().dynamicQuery(dynamicQuery, start, end);
77 }
78
79 @SuppressWarnings("rawtypes")
80 public static java.util.List dynamicQuery(
81 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82 int end,
83 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84 throws com.liferay.portal.SystemException {
85 return getService()
86 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87 }
88
89 public static int dynamicQueryCount(
90 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91 throws com.liferay.portal.SystemException {
92 return getService().dynamicQueryCount(dynamicQuery);
93 }
94
95 public static com.liferay.portlet.shopping.model.ShoppingCart getShoppingCart(
96 long cartId)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 return getService().getShoppingCart(cartId);
100 }
101
102 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> getShoppingCarts(
103 int start, int end) throws com.liferay.portal.SystemException {
104 return getService().getShoppingCarts(start, end);
105 }
106
107 public static int getShoppingCartsCount()
108 throws com.liferay.portal.SystemException {
109 return getService().getShoppingCartsCount();
110 }
111
112 public static com.liferay.portlet.shopping.model.ShoppingCart updateShoppingCart(
113 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
114 throws com.liferay.portal.SystemException {
115 return getService().updateShoppingCart(shoppingCart);
116 }
117
118 public static com.liferay.portlet.shopping.model.ShoppingCart updateShoppingCart(
119 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart,
120 boolean merge) throws com.liferay.portal.SystemException {
121 return getService().updateShoppingCart(shoppingCart, merge);
122 }
123
124 public static void deleteGroupCarts(long groupId)
125 throws com.liferay.portal.SystemException {
126 getService().deleteGroupCarts(groupId);
127 }
128
129 public static void deleteUserCarts(long userId)
130 throws com.liferay.portal.SystemException {
131 getService().deleteUserCarts(userId);
132 }
133
134 public static com.liferay.portlet.shopping.model.ShoppingCart getCart(
135 long userId, long groupId)
136 throws com.liferay.portal.PortalException,
137 com.liferay.portal.SystemException {
138 return getService().getCart(userId, groupId);
139 }
140
141 public static java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem, java.lang.Integer> getItems(
142 long groupId, java.lang.String itemIds)
143 throws com.liferay.portal.SystemException {
144 return getService().getItems(groupId, itemIds);
145 }
146
147 public static com.liferay.portlet.shopping.model.ShoppingCart updateCart(
148 long userId, long groupId, java.lang.String itemIds,
149 java.lang.String couponCodes, int altShipping, boolean insure)
150 throws com.liferay.portal.PortalException,
151 com.liferay.portal.SystemException {
152 return getService()
153 .updateCart(userId, groupId, itemIds, couponCodes,
154 altShipping, insure);
155 }
156
157 public static ShoppingCartLocalService getService() {
158 if (_service == null) {
159 _service = (ShoppingCartLocalService)PortalBeanLocatorUtil.locate(ShoppingCartLocalService.class.getName());
160
161 ReferenceRegistry.registerReference(ShoppingCartLocalServiceUtil.class,
162 "_service");
163 MethodCache.remove(ShoppingCartLocalService.class);
164 }
165
166 return _service;
167 }
168
169 public void setService(ShoppingCartLocalService service) {
170 MethodCache.remove(ShoppingCartLocalService.class);
171
172 _service = service;
173
174 ReferenceRegistry.registerReference(ShoppingCartLocalServiceUtil.class,
175 "_service");
176 MethodCache.remove(ShoppingCartLocalService.class);
177 }
178
179 private static ShoppingCartLocalService _service;
180 }