1
22
23 package com.liferay.portlet.shopping.service;
24
25
26
53 public class ShoppingCartLocalServiceUtil {
54 public static com.liferay.portlet.shopping.model.ShoppingCart addShoppingCart(
55 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
56 throws com.liferay.portal.SystemException {
57 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
58
59 return shoppingCartLocalService.addShoppingCart(shoppingCart);
60 }
61
62 public static void deleteShoppingCart(long cartId)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException {
65 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
66
67 shoppingCartLocalService.deleteShoppingCart(cartId);
68 }
69
70 public static void deleteShoppingCart(
71 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
72 throws com.liferay.portal.SystemException {
73 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
74
75 shoppingCartLocalService.deleteShoppingCart(shoppingCart);
76 }
77
78 public static java.util.List<Object> dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
80 throws com.liferay.portal.SystemException {
81 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
82
83 return shoppingCartLocalService.dynamicQuery(dynamicQuery);
84 }
85
86 public static java.util.List<Object> dynamicQuery(
87 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
88 int end) throws com.liferay.portal.SystemException {
89 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
90
91 return shoppingCartLocalService.dynamicQuery(dynamicQuery, start, end);
92 }
93
94 public static com.liferay.portlet.shopping.model.ShoppingCart getShoppingCart(
95 long cartId)
96 throws com.liferay.portal.PortalException,
97 com.liferay.portal.SystemException {
98 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
99
100 return shoppingCartLocalService.getShoppingCart(cartId);
101 }
102
103 public static com.liferay.portlet.shopping.model.ShoppingCart updateShoppingCart(
104 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
105 throws com.liferay.portal.SystemException {
106 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
107
108 return shoppingCartLocalService.updateShoppingCart(shoppingCart);
109 }
110
111 public static void deleteGroupCarts(long groupId)
112 throws com.liferay.portal.SystemException {
113 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
114
115 shoppingCartLocalService.deleteGroupCarts(groupId);
116 }
117
118 public static void deleteUserCarts(long userId)
119 throws com.liferay.portal.SystemException {
120 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
121
122 shoppingCartLocalService.deleteUserCarts(userId);
123 }
124
125 public static com.liferay.portlet.shopping.model.ShoppingCart getCart(
126 long userId, long groupId)
127 throws com.liferay.portal.PortalException,
128 com.liferay.portal.SystemException {
129 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
130
131 return shoppingCartLocalService.getCart(userId, groupId);
132 }
133
134 public static java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem, Integer> getItems(
135 long groupId, java.lang.String itemIds)
136 throws com.liferay.portal.SystemException {
137 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
138
139 return shoppingCartLocalService.getItems(groupId, itemIds);
140 }
141
142 public static com.liferay.portlet.shopping.model.ShoppingCart updateCart(
143 long userId, long groupId, java.lang.String itemIds,
144 java.lang.String couponCodes, int altShipping, boolean insure)
145 throws com.liferay.portal.PortalException,
146 com.liferay.portal.SystemException {
147 ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
148
149 return shoppingCartLocalService.updateCart(userId, groupId, itemIds,
150 couponCodes, altShipping, insure);
151 }
152 }