1
14
15 package com.liferay.portlet.shopping.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class ShoppingItemLocalServiceUtil {
40 public static com.liferay.portlet.shopping.model.ShoppingItem addShoppingItem(
41 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
42 throws com.liferay.portal.kernel.exception.SystemException {
43 return getService().addShoppingItem(shoppingItem);
44 }
45
46 public static com.liferay.portlet.shopping.model.ShoppingItem createShoppingItem(
47 long itemId) {
48 return getService().createShoppingItem(itemId);
49 }
50
51 public static void deleteShoppingItem(long itemId)
52 throws com.liferay.portal.kernel.exception.PortalException,
53 com.liferay.portal.kernel.exception.SystemException {
54 getService().deleteShoppingItem(itemId);
55 }
56
57 public static void deleteShoppingItem(
58 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
59 throws com.liferay.portal.kernel.exception.SystemException {
60 getService().deleteShoppingItem(shoppingItem);
61 }
62
63 public static java.util.List<Object> dynamicQuery(
64 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65 throws com.liferay.portal.kernel.exception.SystemException {
66 return getService().dynamicQuery(dynamicQuery);
67 }
68
69 public static java.util.List<Object> dynamicQuery(
70 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71 int end) throws com.liferay.portal.kernel.exception.SystemException {
72 return getService().dynamicQuery(dynamicQuery, start, end);
73 }
74
75 public static com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
76 long itemId)
77 throws com.liferay.portal.kernel.exception.PortalException,
78 com.liferay.portal.kernel.exception.SystemException {
79 return getService().getShoppingItem(itemId);
80 }
81
82 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getShoppingItems(
83 int start, int end)
84 throws com.liferay.portal.kernel.exception.SystemException {
85 return getService().getShoppingItems(start, end);
86 }
87
88 public static int getShoppingItemsCount()
89 throws com.liferay.portal.kernel.exception.SystemException {
90 return getService().getShoppingItemsCount();
91 }
92
93 public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
94 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
95 throws com.liferay.portal.kernel.exception.SystemException {
96 return getService().updateShoppingItem(shoppingItem);
97 }
98
99 public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
100 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
101 boolean merge)
102 throws com.liferay.portal.kernel.exception.SystemException {
103 return getService().updateShoppingItem(shoppingItem, merge);
104 }
105
106 public static void addBookItems(long userId, long groupId, long categoryId,
107 java.lang.String[] isbns)
108 throws com.liferay.portal.kernel.exception.PortalException,
109 com.liferay.portal.kernel.exception.SystemException {
110 getService().addBookItems(userId, groupId, categoryId, isbns);
111 }
112
113 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
114 long userId, long groupId, long categoryId, java.lang.String sku,
115 java.lang.String name, java.lang.String description,
116 java.lang.String properties, java.lang.String fieldsQuantities,
117 boolean requiresShipping, int stockQuantity, boolean featured,
118 java.lang.Boolean sale, boolean smallImage,
119 java.lang.String smallImageURL, java.io.File smallFile,
120 boolean mediumImage, java.lang.String mediumImageURL,
121 java.io.File mediumFile, boolean largeImage,
122 java.lang.String largeImageURL, java.io.File largeFile,
123 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
124 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
125 com.liferay.portal.service.ServiceContext serviceContext)
126 throws com.liferay.portal.kernel.exception.PortalException,
127 com.liferay.portal.kernel.exception.SystemException {
128 return getService()
129 .addItem(userId, groupId, categoryId, sku, name,
130 description, properties, fieldsQuantities, requiresShipping,
131 stockQuantity, featured, sale, smallImage, smallImageURL,
132 smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
133 largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
134 }
135
136 public static void addItemResources(long itemId,
137 boolean addCommunityPermissions, boolean addGuestPermissions)
138 throws com.liferay.portal.kernel.exception.PortalException,
139 com.liferay.portal.kernel.exception.SystemException {
140 getService()
141 .addItemResources(itemId, addCommunityPermissions,
142 addGuestPermissions);
143 }
144
145 public static void addItemResources(long itemId,
146 java.lang.String[] communityPermissions,
147 java.lang.String[] guestPermissions)
148 throws com.liferay.portal.kernel.exception.PortalException,
149 com.liferay.portal.kernel.exception.SystemException {
150 getService()
151 .addItemResources(itemId, communityPermissions, guestPermissions);
152 }
153
154 public static void addItemResources(
155 com.liferay.portlet.shopping.model.ShoppingItem item,
156 boolean addCommunityPermissions, boolean addGuestPermissions)
157 throws com.liferay.portal.kernel.exception.PortalException,
158 com.liferay.portal.kernel.exception.SystemException {
159 getService()
160 .addItemResources(item, addCommunityPermissions, addGuestPermissions);
161 }
162
163 public static void addItemResources(
164 com.liferay.portlet.shopping.model.ShoppingItem item,
165 java.lang.String[] communityPermissions,
166 java.lang.String[] guestPermissions)
167 throws com.liferay.portal.kernel.exception.PortalException,
168 com.liferay.portal.kernel.exception.SystemException {
169 getService()
170 .addItemResources(item, communityPermissions, guestPermissions);
171 }
172
173 public static void deleteItem(long itemId)
174 throws com.liferay.portal.kernel.exception.PortalException,
175 com.liferay.portal.kernel.exception.SystemException {
176 getService().deleteItem(itemId);
177 }
178
179 public static void deleteItem(
180 com.liferay.portlet.shopping.model.ShoppingItem item)
181 throws com.liferay.portal.kernel.exception.PortalException,
182 com.liferay.portal.kernel.exception.SystemException {
183 getService().deleteItem(item);
184 }
185
186 public static void deleteItems(long groupId, long categoryId)
187 throws com.liferay.portal.kernel.exception.PortalException,
188 com.liferay.portal.kernel.exception.SystemException {
189 getService().deleteItems(groupId, categoryId);
190 }
191
192 public static int getCategoriesItemsCount(long groupId,
193 java.util.List<Long> categoryIds)
194 throws com.liferay.portal.kernel.exception.SystemException {
195 return getService().getCategoriesItemsCount(groupId, categoryIds);
196 }
197
198 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
199 long groupId, long categoryId, int numOfItems)
200 throws com.liferay.portal.kernel.exception.SystemException {
201 return getService().getFeaturedItems(groupId, categoryId, numOfItems);
202 }
203
204 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
205 long itemId)
206 throws com.liferay.portal.kernel.exception.PortalException,
207 com.liferay.portal.kernel.exception.SystemException {
208 return getService().getItem(itemId);
209 }
210
211 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
212 long companyId, java.lang.String sku)
213 throws com.liferay.portal.kernel.exception.PortalException,
214 com.liferay.portal.kernel.exception.SystemException {
215 return getService().getItem(companyId, sku);
216 }
217
218 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
219 long largeImageId)
220 throws com.liferay.portal.kernel.exception.PortalException,
221 com.liferay.portal.kernel.exception.SystemException {
222 return getService().getItemByLargeImageId(largeImageId);
223 }
224
225 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
226 long mediumImageId)
227 throws com.liferay.portal.kernel.exception.PortalException,
228 com.liferay.portal.kernel.exception.SystemException {
229 return getService().getItemByMediumImageId(mediumImageId);
230 }
231
232 public static com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
233 long smallImageId)
234 throws com.liferay.portal.kernel.exception.PortalException,
235 com.liferay.portal.kernel.exception.SystemException {
236 return getService().getItemBySmallImageId(smallImageId);
237 }
238
239 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
240 long groupId, long categoryId)
241 throws com.liferay.portal.kernel.exception.SystemException {
242 return getService().getItems(groupId, categoryId);
243 }
244
245 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
246 long groupId, long categoryId, int start, int end,
247 com.liferay.portal.kernel.util.OrderByComparator obc)
248 throws com.liferay.portal.kernel.exception.SystemException {
249 return getService().getItems(groupId, categoryId, start, end, obc);
250 }
251
252 public static int getItemsCount(long groupId, long categoryId)
253 throws com.liferay.portal.kernel.exception.SystemException {
254 return getService().getItemsCount(groupId, categoryId);
255 }
256
257 public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
258 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
259 throws com.liferay.portal.kernel.exception.PortalException,
260 com.liferay.portal.kernel.exception.SystemException {
261 return getService().getItemsPrevAndNext(itemId, obc);
262 }
263
264 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
265 long groupId, long categoryId, int numOfItems)
266 throws com.liferay.portal.kernel.exception.SystemException {
267 return getService().getSaleItems(groupId, categoryId, numOfItems);
268 }
269
270 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
271 long groupId, long[] categoryIds, java.lang.String keywords, int start,
272 int end) throws com.liferay.portal.kernel.exception.SystemException {
273 return getService().search(groupId, categoryIds, keywords, start, end);
274 }
275
276 public static int searchCount(long groupId, long[] categoryIds,
277 java.lang.String keywords)
278 throws com.liferay.portal.kernel.exception.SystemException {
279 return getService().searchCount(groupId, categoryIds, keywords);
280 }
281
282 public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
283 long userId, long itemId, long groupId, long categoryId,
284 java.lang.String sku, java.lang.String name,
285 java.lang.String description, java.lang.String properties,
286 java.lang.String fieldsQuantities, boolean requiresShipping,
287 int stockQuantity, boolean featured, java.lang.Boolean sale,
288 boolean smallImage, java.lang.String smallImageURL,
289 java.io.File smallFile, boolean mediumImage,
290 java.lang.String mediumImageURL, java.io.File mediumFile,
291 boolean largeImage, java.lang.String largeImageURL,
292 java.io.File largeFile,
293 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
294 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
295 com.liferay.portal.service.ServiceContext serviceContext)
296 throws com.liferay.portal.kernel.exception.PortalException,
297 com.liferay.portal.kernel.exception.SystemException {
298 return getService()
299 .updateItem(userId, itemId, groupId, categoryId, sku, name,
300 description, properties, fieldsQuantities, requiresShipping,
301 stockQuantity, featured, sale, smallImage, smallImageURL,
302 smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
303 largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
304 }
305
306 public static ShoppingItemLocalService getService() {
307 if (_service == null) {
308 _service = (ShoppingItemLocalService)PortalBeanLocatorUtil.locate(ShoppingItemLocalService.class.getName());
309 }
310
311 return _service;
312 }
313
314 public void setService(ShoppingItemLocalService service) {
315 _service = service;
316 }
317
318 private static ShoppingItemLocalService _service;
319 }