1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.shopping.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="ShoppingItemLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link ShoppingItemLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       ShoppingItemLocalService
37   * @generated
38   */
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      @SuppressWarnings("unchecked")
64      public static java.util.List dynamicQuery(
65          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66          throws com.liferay.portal.kernel.exception.SystemException {
67          return getService().dynamicQuery(dynamicQuery);
68      }
69  
70      @SuppressWarnings("unchecked")
71      public static java.util.List dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73          int end) throws com.liferay.portal.kernel.exception.SystemException {
74          return getService().dynamicQuery(dynamicQuery, start, end);
75      }
76  
77      @SuppressWarnings("unchecked")
78      public static java.util.List dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80          int end,
81          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82          throws com.liferay.portal.kernel.exception.SystemException {
83          return getService()
84                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85      }
86  
87      public static long dynamicQueryCount(
88          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().dynamicQueryCount(dynamicQuery);
91      }
92  
93      public static com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
94          long itemId)
95          throws com.liferay.portal.kernel.exception.PortalException,
96              com.liferay.portal.kernel.exception.SystemException {
97          return getService().getShoppingItem(itemId);
98      }
99  
100     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getShoppingItems(
101         int start, int end)
102         throws com.liferay.portal.kernel.exception.SystemException {
103         return getService().getShoppingItems(start, end);
104     }
105 
106     public static int getShoppingItemsCount()
107         throws com.liferay.portal.kernel.exception.SystemException {
108         return getService().getShoppingItemsCount();
109     }
110 
111     public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
112         com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
113         throws com.liferay.portal.kernel.exception.SystemException {
114         return getService().updateShoppingItem(shoppingItem);
115     }
116 
117     public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
118         com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
119         boolean merge)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getService().updateShoppingItem(shoppingItem, merge);
122     }
123 
124     public static void addBookItems(long userId, long groupId, long categoryId,
125         java.lang.String[] isbns)
126         throws com.liferay.portal.kernel.exception.PortalException,
127             com.liferay.portal.kernel.exception.SystemException {
128         getService().addBookItems(userId, groupId, categoryId, isbns);
129     }
130 
131     public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
132         long userId, long groupId, long categoryId, java.lang.String sku,
133         java.lang.String name, java.lang.String description,
134         java.lang.String properties, java.lang.String fieldsQuantities,
135         boolean requiresShipping, int stockQuantity, boolean featured,
136         java.lang.Boolean sale, boolean smallImage,
137         java.lang.String smallImageURL, java.io.File smallFile,
138         boolean mediumImage, java.lang.String mediumImageURL,
139         java.io.File mediumFile, boolean largeImage,
140         java.lang.String largeImageURL, java.io.File largeFile,
141         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
142         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
143         com.liferay.portal.service.ServiceContext serviceContext)
144         throws com.liferay.portal.kernel.exception.PortalException,
145             com.liferay.portal.kernel.exception.SystemException {
146         return getService()
147                    .addItem(userId, groupId, categoryId, sku, name,
148             description, properties, fieldsQuantities, requiresShipping,
149             stockQuantity, featured, sale, smallImage, smallImageURL,
150             smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
151             largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
152     }
153 
154     public static void addItemResources(long itemId,
155         boolean addCommunityPermissions, boolean addGuestPermissions)
156         throws com.liferay.portal.kernel.exception.PortalException,
157             com.liferay.portal.kernel.exception.SystemException {
158         getService()
159             .addItemResources(itemId, addCommunityPermissions,
160             addGuestPermissions);
161     }
162 
163     public static void addItemResources(long itemId,
164         java.lang.String[] communityPermissions,
165         java.lang.String[] guestPermissions)
166         throws com.liferay.portal.kernel.exception.PortalException,
167             com.liferay.portal.kernel.exception.SystemException {
168         getService()
169             .addItemResources(itemId, communityPermissions, guestPermissions);
170     }
171 
172     public static void addItemResources(
173         com.liferay.portlet.shopping.model.ShoppingItem item,
174         boolean addCommunityPermissions, boolean addGuestPermissions)
175         throws com.liferay.portal.kernel.exception.PortalException,
176             com.liferay.portal.kernel.exception.SystemException {
177         getService()
178             .addItemResources(item, addCommunityPermissions, addGuestPermissions);
179     }
180 
181     public static void addItemResources(
182         com.liferay.portlet.shopping.model.ShoppingItem item,
183         java.lang.String[] communityPermissions,
184         java.lang.String[] guestPermissions)
185         throws com.liferay.portal.kernel.exception.PortalException,
186             com.liferay.portal.kernel.exception.SystemException {
187         getService()
188             .addItemResources(item, communityPermissions, guestPermissions);
189     }
190 
191     public static void deleteItem(long itemId)
192         throws com.liferay.portal.kernel.exception.PortalException,
193             com.liferay.portal.kernel.exception.SystemException {
194         getService().deleteItem(itemId);
195     }
196 
197     public static void deleteItem(
198         com.liferay.portlet.shopping.model.ShoppingItem item)
199         throws com.liferay.portal.kernel.exception.PortalException,
200             com.liferay.portal.kernel.exception.SystemException {
201         getService().deleteItem(item);
202     }
203 
204     public static void deleteItems(long groupId, long categoryId)
205         throws com.liferay.portal.kernel.exception.PortalException,
206             com.liferay.portal.kernel.exception.SystemException {
207         getService().deleteItems(groupId, categoryId);
208     }
209 
210     public static int getCategoriesItemsCount(long groupId,
211         java.util.List<java.lang.Long> categoryIds)
212         throws com.liferay.portal.kernel.exception.SystemException {
213         return getService().getCategoriesItemsCount(groupId, categoryIds);
214     }
215 
216     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
217         long groupId, long categoryId, int numOfItems)
218         throws com.liferay.portal.kernel.exception.SystemException {
219         return getService().getFeaturedItems(groupId, categoryId, numOfItems);
220     }
221 
222     public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
223         long itemId)
224         throws com.liferay.portal.kernel.exception.PortalException,
225             com.liferay.portal.kernel.exception.SystemException {
226         return getService().getItem(itemId);
227     }
228 
229     public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
230         long companyId, java.lang.String sku)
231         throws com.liferay.portal.kernel.exception.PortalException,
232             com.liferay.portal.kernel.exception.SystemException {
233         return getService().getItem(companyId, sku);
234     }
235 
236     public static com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
237         long largeImageId)
238         throws com.liferay.portal.kernel.exception.PortalException,
239             com.liferay.portal.kernel.exception.SystemException {
240         return getService().getItemByLargeImageId(largeImageId);
241     }
242 
243     public static com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
244         long mediumImageId)
245         throws com.liferay.portal.kernel.exception.PortalException,
246             com.liferay.portal.kernel.exception.SystemException {
247         return getService().getItemByMediumImageId(mediumImageId);
248     }
249 
250     public static com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
251         long smallImageId)
252         throws com.liferay.portal.kernel.exception.PortalException,
253             com.liferay.portal.kernel.exception.SystemException {
254         return getService().getItemBySmallImageId(smallImageId);
255     }
256 
257     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
258         long groupId, long categoryId)
259         throws com.liferay.portal.kernel.exception.SystemException {
260         return getService().getItems(groupId, categoryId);
261     }
262 
263     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
264         long groupId, long categoryId, int start, int end,
265         com.liferay.portal.kernel.util.OrderByComparator obc)
266         throws com.liferay.portal.kernel.exception.SystemException {
267         return getService().getItems(groupId, categoryId, start, end, obc);
268     }
269 
270     public static int getItemsCount(long groupId, long categoryId)
271         throws com.liferay.portal.kernel.exception.SystemException {
272         return getService().getItemsCount(groupId, categoryId);
273     }
274 
275     public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
276         long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
277         throws com.liferay.portal.kernel.exception.PortalException,
278             com.liferay.portal.kernel.exception.SystemException {
279         return getService().getItemsPrevAndNext(itemId, obc);
280     }
281 
282     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
283         long groupId, long categoryId, int numOfItems)
284         throws com.liferay.portal.kernel.exception.SystemException {
285         return getService().getSaleItems(groupId, categoryId, numOfItems);
286     }
287 
288     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
289         long groupId, long[] categoryIds, java.lang.String keywords, int start,
290         int end) throws com.liferay.portal.kernel.exception.SystemException {
291         return getService().search(groupId, categoryIds, keywords, start, end);
292     }
293 
294     public static int searchCount(long groupId, long[] categoryIds,
295         java.lang.String keywords)
296         throws com.liferay.portal.kernel.exception.SystemException {
297         return getService().searchCount(groupId, categoryIds, keywords);
298     }
299 
300     public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
301         long userId, long itemId, long groupId, long categoryId,
302         java.lang.String sku, java.lang.String name,
303         java.lang.String description, java.lang.String properties,
304         java.lang.String fieldsQuantities, boolean requiresShipping,
305         int stockQuantity, boolean featured, java.lang.Boolean sale,
306         boolean smallImage, java.lang.String smallImageURL,
307         java.io.File smallFile, boolean mediumImage,
308         java.lang.String mediumImageURL, java.io.File mediumFile,
309         boolean largeImage, java.lang.String largeImageURL,
310         java.io.File largeFile,
311         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
312         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
313         com.liferay.portal.service.ServiceContext serviceContext)
314         throws com.liferay.portal.kernel.exception.PortalException,
315             com.liferay.portal.kernel.exception.SystemException {
316         return getService()
317                    .updateItem(userId, itemId, groupId, categoryId, sku, name,
318             description, properties, fieldsQuantities, requiresShipping,
319             stockQuantity, featured, sale, smallImage, smallImageURL,
320             smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
321             largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
322     }
323 
324     public static ShoppingItemLocalService getService() {
325         if (_service == null) {
326             _service = (ShoppingItemLocalService)PortalBeanLocatorUtil.locate(ShoppingItemLocalService.class.getName());
327         }
328 
329         return _service;
330     }
331 
332     public void setService(ShoppingItemLocalService service) {
333         _service = service;
334     }
335 
336     private static ShoppingItemLocalService _service;
337 }