001
014
015 package com.liferay.portlet.shopping.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class ShoppingItemLocalServiceUtil {
035
040
041
048 public static com.liferay.portlet.shopping.model.ShoppingItem addShoppingItem(
049 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addShoppingItem(shoppingItem);
052 }
053
054
060 public static com.liferay.portlet.shopping.model.ShoppingItem createShoppingItem(
061 long itemId) {
062 return getService().createShoppingItem(itemId);
063 }
064
065
072 public static void deleteShoppingItem(long itemId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().deleteShoppingItem(itemId);
076 }
077
078
084 public static void deleteShoppingItem(
085 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
086 throws com.liferay.portal.kernel.exception.SystemException {
087 getService().deleteShoppingItem(shoppingItem);
088 }
089
090
097 @SuppressWarnings("rawtypes")
098 public static java.util.List dynamicQuery(
099 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().dynamicQuery(dynamicQuery);
102 }
103
104
117 @SuppressWarnings("rawtypes")
118 public static java.util.List dynamicQuery(
119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120 int end) throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().dynamicQuery(dynamicQuery, start, end);
122 }
123
124
138 @SuppressWarnings("rawtypes")
139 public static java.util.List dynamicQuery(
140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141 int end,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getService()
145 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146 }
147
148
155 public static long dynamicQueryCount(
156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getService().dynamicQueryCount(dynamicQuery);
159 }
160
161
169 public static com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
170 long itemId)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getService().getShoppingItem(itemId);
174 }
175
176 public static com.liferay.portal.model.PersistedModel getPersistedModel(
177 java.io.Serializable primaryKeyObj)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException {
180 return getService().getPersistedModel(primaryKeyObj);
181 }
182
183
195 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getShoppingItems(
196 int start, int end)
197 throws com.liferay.portal.kernel.exception.SystemException {
198 return getService().getShoppingItems(start, end);
199 }
200
201
207 public static int getShoppingItemsCount()
208 throws com.liferay.portal.kernel.exception.SystemException {
209 return getService().getShoppingItemsCount();
210 }
211
212
219 public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
220 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
221 throws com.liferay.portal.kernel.exception.SystemException {
222 return getService().updateShoppingItem(shoppingItem);
223 }
224
225
233 public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
234 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
235 boolean merge)
236 throws com.liferay.portal.kernel.exception.SystemException {
237 return getService().updateShoppingItem(shoppingItem, merge);
238 }
239
240
245 public static java.lang.String getBeanIdentifier() {
246 return getService().getBeanIdentifier();
247 }
248
249
254 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
255 getService().setBeanIdentifier(beanIdentifier);
256 }
257
258 public static void addBookItems(long userId, long groupId, long categoryId,
259 java.lang.String[] isbns)
260 throws com.liferay.portal.kernel.exception.PortalException,
261 com.liferay.portal.kernel.exception.SystemException {
262 getService().addBookItems(userId, groupId, categoryId, isbns);
263 }
264
265 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
266 long userId, long groupId, long categoryId, java.lang.String sku,
267 java.lang.String name, java.lang.String description,
268 java.lang.String properties, java.lang.String fieldsQuantities,
269 boolean requiresShipping, int stockQuantity, boolean featured,
270 java.lang.Boolean sale, boolean smallImage,
271 java.lang.String smallImageURL, java.io.File smallFile,
272 boolean mediumImage, java.lang.String mediumImageURL,
273 java.io.File mediumFile, boolean largeImage,
274 java.lang.String largeImageURL, java.io.File largeFile,
275 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
276 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
277 com.liferay.portal.service.ServiceContext serviceContext)
278 throws com.liferay.portal.kernel.exception.PortalException,
279 com.liferay.portal.kernel.exception.SystemException {
280 return getService()
281 .addItem(userId, groupId, categoryId, sku, name,
282 description, properties, fieldsQuantities, requiresShipping,
283 stockQuantity, featured, sale, smallImage, smallImageURL,
284 smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
285 largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
286 }
287
288 public static void addItemResources(long itemId,
289 boolean addCommunityPermissions, boolean addGuestPermissions)
290 throws com.liferay.portal.kernel.exception.PortalException,
291 com.liferay.portal.kernel.exception.SystemException {
292 getService()
293 .addItemResources(itemId, addCommunityPermissions,
294 addGuestPermissions);
295 }
296
297 public static void addItemResources(long itemId,
298 java.lang.String[] communityPermissions,
299 java.lang.String[] guestPermissions)
300 throws com.liferay.portal.kernel.exception.PortalException,
301 com.liferay.portal.kernel.exception.SystemException {
302 getService()
303 .addItemResources(itemId, communityPermissions, guestPermissions);
304 }
305
306 public static void addItemResources(
307 com.liferay.portlet.shopping.model.ShoppingItem item,
308 boolean addCommunityPermissions, boolean addGuestPermissions)
309 throws com.liferay.portal.kernel.exception.PortalException,
310 com.liferay.portal.kernel.exception.SystemException {
311 getService()
312 .addItemResources(item, addCommunityPermissions, addGuestPermissions);
313 }
314
315 public static void addItemResources(
316 com.liferay.portlet.shopping.model.ShoppingItem item,
317 java.lang.String[] communityPermissions,
318 java.lang.String[] guestPermissions)
319 throws com.liferay.portal.kernel.exception.PortalException,
320 com.liferay.portal.kernel.exception.SystemException {
321 getService()
322 .addItemResources(item, communityPermissions, guestPermissions);
323 }
324
325 public static void deleteItem(long itemId)
326 throws com.liferay.portal.kernel.exception.PortalException,
327 com.liferay.portal.kernel.exception.SystemException {
328 getService().deleteItem(itemId);
329 }
330
331 public static void deleteItem(
332 com.liferay.portlet.shopping.model.ShoppingItem item)
333 throws com.liferay.portal.kernel.exception.PortalException,
334 com.liferay.portal.kernel.exception.SystemException {
335 getService().deleteItem(item);
336 }
337
338 public static void deleteItems(long groupId, long categoryId)
339 throws com.liferay.portal.kernel.exception.PortalException,
340 com.liferay.portal.kernel.exception.SystemException {
341 getService().deleteItems(groupId, categoryId);
342 }
343
344 public static int getCategoriesItemsCount(long groupId,
345 java.util.List<java.lang.Long> categoryIds)
346 throws com.liferay.portal.kernel.exception.SystemException {
347 return getService().getCategoriesItemsCount(groupId, categoryIds);
348 }
349
350 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
351 long groupId, long categoryId, int numOfItems)
352 throws com.liferay.portal.kernel.exception.SystemException {
353 return getService().getFeaturedItems(groupId, categoryId, numOfItems);
354 }
355
356 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
357 long itemId)
358 throws com.liferay.portal.kernel.exception.PortalException,
359 com.liferay.portal.kernel.exception.SystemException {
360 return getService().getItem(itemId);
361 }
362
363 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
364 long companyId, java.lang.String sku)
365 throws com.liferay.portal.kernel.exception.PortalException,
366 com.liferay.portal.kernel.exception.SystemException {
367 return getService().getItem(companyId, sku);
368 }
369
370 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
371 long largeImageId)
372 throws com.liferay.portal.kernel.exception.PortalException,
373 com.liferay.portal.kernel.exception.SystemException {
374 return getService().getItemByLargeImageId(largeImageId);
375 }
376
377 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
378 long mediumImageId)
379 throws com.liferay.portal.kernel.exception.PortalException,
380 com.liferay.portal.kernel.exception.SystemException {
381 return getService().getItemByMediumImageId(mediumImageId);
382 }
383
384 public static com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
385 long smallImageId)
386 throws com.liferay.portal.kernel.exception.PortalException,
387 com.liferay.portal.kernel.exception.SystemException {
388 return getService().getItemBySmallImageId(smallImageId);
389 }
390
391 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
392 long groupId, long categoryId)
393 throws com.liferay.portal.kernel.exception.SystemException {
394 return getService().getItems(groupId, categoryId);
395 }
396
397 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
398 long groupId, long categoryId, int start, int end,
399 com.liferay.portal.kernel.util.OrderByComparator obc)
400 throws com.liferay.portal.kernel.exception.SystemException {
401 return getService().getItems(groupId, categoryId, start, end, obc);
402 }
403
404 public static int getItemsCount(long groupId, long categoryId)
405 throws com.liferay.portal.kernel.exception.SystemException {
406 return getService().getItemsCount(groupId, categoryId);
407 }
408
409 public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
410 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
411 throws com.liferay.portal.kernel.exception.PortalException,
412 com.liferay.portal.kernel.exception.SystemException {
413 return getService().getItemsPrevAndNext(itemId, obc);
414 }
415
416 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
417 long groupId, long categoryId, int numOfItems)
418 throws com.liferay.portal.kernel.exception.SystemException {
419 return getService().getSaleItems(groupId, categoryId, numOfItems);
420 }
421
422 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
423 long groupId, long[] categoryIds, java.lang.String keywords, int start,
424 int end) throws com.liferay.portal.kernel.exception.SystemException {
425 return getService().search(groupId, categoryIds, keywords, start, end);
426 }
427
428 public static int searchCount(long groupId, long[] categoryIds,
429 java.lang.String keywords)
430 throws com.liferay.portal.kernel.exception.SystemException {
431 return getService().searchCount(groupId, categoryIds, keywords);
432 }
433
434 public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
435 long userId, long itemId, long groupId, long categoryId,
436 java.lang.String sku, java.lang.String name,
437 java.lang.String description, java.lang.String properties,
438 java.lang.String fieldsQuantities, boolean requiresShipping,
439 int stockQuantity, boolean featured, java.lang.Boolean sale,
440 boolean smallImage, java.lang.String smallImageURL,
441 java.io.File smallFile, boolean mediumImage,
442 java.lang.String mediumImageURL, java.io.File mediumFile,
443 boolean largeImage, java.lang.String largeImageURL,
444 java.io.File largeFile,
445 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
446 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
447 com.liferay.portal.service.ServiceContext serviceContext)
448 throws com.liferay.portal.kernel.exception.PortalException,
449 com.liferay.portal.kernel.exception.SystemException {
450 return getService()
451 .updateItem(userId, itemId, groupId, categoryId, sku, name,
452 description, properties, fieldsQuantities, requiresShipping,
453 stockQuantity, featured, sale, smallImage, smallImageURL,
454 smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
455 largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
456 }
457
458 public static ShoppingItemLocalService getService() {
459 if (_service == null) {
460 _service = (ShoppingItemLocalService)PortalBeanLocatorUtil.locate(ShoppingItemLocalService.class.getName());
461
462 ReferenceRegistry.registerReference(ShoppingItemLocalServiceUtil.class,
463 "_service");
464 MethodCache.remove(ShoppingItemLocalService.class);
465 }
466
467 return _service;
468 }
469
470 public void setService(ShoppingItemLocalService service) {
471 MethodCache.remove(ShoppingItemLocalService.class);
472
473 _service = service;
474
475 ReferenceRegistry.registerReference(ShoppingItemLocalServiceUtil.class,
476 "_service");
477 MethodCache.remove(ShoppingItemLocalService.class);
478 }
479
480 private static ShoppingItemLocalService _service;
481 }