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