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 smallImageFile,
272 boolean mediumImage, java.lang.String mediumImageURL,
273 java.io.File mediumImageFile, boolean largeImage,
274 java.lang.String largeImageURL, java.io.File largeImageFile,
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 smallImageFile, mediumImage, mediumImageURL, mediumImageFile,
285 largeImage, largeImageURL, largeImageFile, itemFields, itemPrices,
286 serviceContext);
287 }
288
289 public static void addItemResources(long itemId,
290 boolean addGroupPermissions, boolean addGuestPermissions)
291 throws com.liferay.portal.kernel.exception.PortalException,
292 com.liferay.portal.kernel.exception.SystemException {
293 getService()
294 .addItemResources(itemId, addGroupPermissions, addGuestPermissions);
295 }
296
297 public static void addItemResources(long itemId,
298 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
299 throws com.liferay.portal.kernel.exception.PortalException,
300 com.liferay.portal.kernel.exception.SystemException {
301 getService().addItemResources(itemId, groupPermissions, guestPermissions);
302 }
303
304 public static void addItemResources(
305 com.liferay.portlet.shopping.model.ShoppingItem item,
306 boolean addGroupPermissions, boolean addGuestPermissions)
307 throws com.liferay.portal.kernel.exception.PortalException,
308 com.liferay.portal.kernel.exception.SystemException {
309 getService()
310 .addItemResources(item, addGroupPermissions, addGuestPermissions);
311 }
312
313 public static void addItemResources(
314 com.liferay.portlet.shopping.model.ShoppingItem item,
315 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
316 throws com.liferay.portal.kernel.exception.PortalException,
317 com.liferay.portal.kernel.exception.SystemException {
318 getService().addItemResources(item, groupPermissions, guestPermissions);
319 }
320
321 public static void deleteItem(long itemId)
322 throws com.liferay.portal.kernel.exception.PortalException,
323 com.liferay.portal.kernel.exception.SystemException {
324 getService().deleteItem(itemId);
325 }
326
327 public static void deleteItem(
328 com.liferay.portlet.shopping.model.ShoppingItem item)
329 throws com.liferay.portal.kernel.exception.PortalException,
330 com.liferay.portal.kernel.exception.SystemException {
331 getService().deleteItem(item);
332 }
333
334 public static void deleteItems(long groupId, long categoryId)
335 throws com.liferay.portal.kernel.exception.PortalException,
336 com.liferay.portal.kernel.exception.SystemException {
337 getService().deleteItems(groupId, categoryId);
338 }
339
340 public static int getCategoriesItemsCount(long groupId,
341 java.util.List<java.lang.Long> categoryIds)
342 throws com.liferay.portal.kernel.exception.SystemException {
343 return getService().getCategoriesItemsCount(groupId, categoryIds);
344 }
345
346 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
347 long groupId, long categoryId, int numOfItems)
348 throws com.liferay.portal.kernel.exception.SystemException {
349 return getService().getFeaturedItems(groupId, categoryId, numOfItems);
350 }
351
352 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
353 long itemId)
354 throws com.liferay.portal.kernel.exception.PortalException,
355 com.liferay.portal.kernel.exception.SystemException {
356 return getService().getItem(itemId);
357 }
358
359 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
360 long companyId, java.lang.String sku)
361 throws com.liferay.portal.kernel.exception.PortalException,
362 com.liferay.portal.kernel.exception.SystemException {
363 return getService().getItem(companyId, sku);
364 }
365
366 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
367 long largeImageId)
368 throws com.liferay.portal.kernel.exception.PortalException,
369 com.liferay.portal.kernel.exception.SystemException {
370 return getService().getItemByLargeImageId(largeImageId);
371 }
372
373 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
374 long mediumImageId)
375 throws com.liferay.portal.kernel.exception.PortalException,
376 com.liferay.portal.kernel.exception.SystemException {
377 return getService().getItemByMediumImageId(mediumImageId);
378 }
379
380 public static com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
381 long smallImageId)
382 throws com.liferay.portal.kernel.exception.PortalException,
383 com.liferay.portal.kernel.exception.SystemException {
384 return getService().getItemBySmallImageId(smallImageId);
385 }
386
387 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
388 long groupId, long categoryId)
389 throws com.liferay.portal.kernel.exception.SystemException {
390 return getService().getItems(groupId, categoryId);
391 }
392
393 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
394 long groupId, long categoryId, int start, int end,
395 com.liferay.portal.kernel.util.OrderByComparator obc)
396 throws com.liferay.portal.kernel.exception.SystemException {
397 return getService().getItems(groupId, categoryId, start, end, obc);
398 }
399
400 public static int getItemsCount(long groupId, long categoryId)
401 throws com.liferay.portal.kernel.exception.SystemException {
402 return getService().getItemsCount(groupId, categoryId);
403 }
404
405 public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
406 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
407 throws com.liferay.portal.kernel.exception.PortalException,
408 com.liferay.portal.kernel.exception.SystemException {
409 return getService().getItemsPrevAndNext(itemId, obc);
410 }
411
412 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
413 long groupId, long categoryId, int numOfItems)
414 throws com.liferay.portal.kernel.exception.SystemException {
415 return getService().getSaleItems(groupId, categoryId, numOfItems);
416 }
417
418 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
419 long groupId, long[] categoryIds, java.lang.String keywords, int start,
420 int end) throws com.liferay.portal.kernel.exception.SystemException {
421 return getService().search(groupId, categoryIds, keywords, start, end);
422 }
423
424 public static int searchCount(long groupId, long[] categoryIds,
425 java.lang.String keywords)
426 throws com.liferay.portal.kernel.exception.SystemException {
427 return getService().searchCount(groupId, categoryIds, keywords);
428 }
429
430 public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
431 long userId, long itemId, long groupId, long categoryId,
432 java.lang.String sku, java.lang.String name,
433 java.lang.String description, java.lang.String properties,
434 java.lang.String fieldsQuantities, boolean requiresShipping,
435 int stockQuantity, boolean featured, java.lang.Boolean sale,
436 boolean smallImage, java.lang.String smallImageURL,
437 java.io.File smallImageFile, boolean mediumImage,
438 java.lang.String mediumImageURL, java.io.File mediumImageFile,
439 boolean largeImage, java.lang.String largeImageURL,
440 java.io.File largeImageFile,
441 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
442 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
443 com.liferay.portal.service.ServiceContext serviceContext)
444 throws com.liferay.portal.kernel.exception.PortalException,
445 com.liferay.portal.kernel.exception.SystemException {
446 return getService()
447 .updateItem(userId, itemId, groupId, categoryId, sku, name,
448 description, properties, fieldsQuantities, requiresShipping,
449 stockQuantity, featured, sale, smallImage, smallImageURL,
450 smallImageFile, mediumImage, mediumImageURL, mediumImageFile,
451 largeImage, largeImageURL, largeImageFile, itemFields, itemPrices,
452 serviceContext);
453 }
454
455 public static ShoppingItemLocalService getService() {
456 if (_service == null) {
457 _service = (ShoppingItemLocalService)PortalBeanLocatorUtil.locate(ShoppingItemLocalService.class.getName());
458
459 ReferenceRegistry.registerReference(ShoppingItemLocalServiceUtil.class,
460 "_service");
461 MethodCache.remove(ShoppingItemLocalService.class);
462 }
463
464 return _service;
465 }
466
467 public void setService(ShoppingItemLocalService service) {
468 MethodCache.remove(ShoppingItemLocalService.class);
469
470 _service = service;
471
472 ReferenceRegistry.registerReference(ShoppingItemLocalServiceUtil.class,
473 "_service");
474 MethodCache.remove(ShoppingItemLocalService.class);
475 }
476
477 private static ShoppingItemLocalService _service;
478 }