1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
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.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.PortalException,
53              com.liferay.portal.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.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.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.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.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.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.PortalException,
93              com.liferay.portal.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) throws com.liferay.portal.SystemException {
99          return getService().getShoppingItems(start, end);
100     }
101 
102     public static int getShoppingItemsCount()
103         throws com.liferay.portal.SystemException {
104         return getService().getShoppingItemsCount();
105     }
106 
107     public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
108         com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
109         throws com.liferay.portal.SystemException {
110         return getService().updateShoppingItem(shoppingItem);
111     }
112 
113     public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
114         com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
115         boolean merge) throws com.liferay.portal.SystemException {
116         return getService().updateShoppingItem(shoppingItem, merge);
117     }
118 
119     public static void addBookItems(long userId, long categoryId,
120         java.lang.String[] isbns)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         getService().addBookItems(userId, categoryId, isbns);
124     }
125 
126     public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
127         long userId, long categoryId, java.lang.String sku,
128         java.lang.String name, java.lang.String description,
129         java.lang.String properties, java.lang.String fieldsQuantities,
130         boolean requiresShipping, int stockQuantity, boolean featured,
131         java.lang.Boolean sale, boolean smallImage,
132         java.lang.String smallImageURL, java.io.File smallFile,
133         boolean mediumImage, java.lang.String mediumImageURL,
134         java.io.File mediumFile, boolean largeImage,
135         java.lang.String largeImageURL, java.io.File largeFile,
136         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
137         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
138         com.liferay.portal.service.ServiceContext serviceContext)
139         throws com.liferay.portal.PortalException,
140             com.liferay.portal.SystemException {
141         return getService()
142                    .addItem(userId, categoryId, sku, name, description,
143             properties, fieldsQuantities, requiresShipping, stockQuantity,
144             featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
145             mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
146             itemFields, itemPrices, serviceContext);
147     }
148 
149     public static void addItemResources(long itemId,
150         boolean addCommunityPermissions, boolean addGuestPermissions)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException {
153         getService()
154             .addItemResources(itemId, addCommunityPermissions,
155             addGuestPermissions);
156     }
157 
158     public static void addItemResources(long itemId,
159         java.lang.String[] communityPermissions,
160         java.lang.String[] guestPermissions)
161         throws com.liferay.portal.PortalException,
162             com.liferay.portal.SystemException {
163         getService()
164             .addItemResources(itemId, communityPermissions, guestPermissions);
165     }
166 
167     public static void addItemResources(
168         com.liferay.portlet.shopping.model.ShoppingCategory category,
169         com.liferay.portlet.shopping.model.ShoppingItem item,
170         boolean addCommunityPermissions, boolean addGuestPermissions)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException {
173         getService()
174             .addItemResources(category, item, addCommunityPermissions,
175             addGuestPermissions);
176     }
177 
178     public static void addItemResources(
179         com.liferay.portlet.shopping.model.ShoppingCategory category,
180         com.liferay.portlet.shopping.model.ShoppingItem item,
181         java.lang.String[] communityPermissions,
182         java.lang.String[] guestPermissions)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException {
185         getService()
186             .addItemResources(category, item, communityPermissions,
187             guestPermissions);
188     }
189 
190     public static void deleteItem(long itemId)
191         throws com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException {
193         getService().deleteItem(itemId);
194     }
195 
196     public static void deleteItem(
197         com.liferay.portlet.shopping.model.ShoppingItem item)
198         throws com.liferay.portal.PortalException,
199             com.liferay.portal.SystemException {
200         getService().deleteItem(item);
201     }
202 
203     public static void deleteItems(long categoryId)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         getService().deleteItems(categoryId);
207     }
208 
209     public static int getCategoriesItemsCount(java.util.List<Long> categoryIds)
210         throws com.liferay.portal.SystemException {
211         return getService().getCategoriesItemsCount(categoryIds);
212     }
213 
214     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
215         long groupId, long categoryId, int numOfItems)
216         throws com.liferay.portal.SystemException {
217         return getService().getFeaturedItems(groupId, categoryId, numOfItems);
218     }
219 
220     public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
221         long itemId)
222         throws com.liferay.portal.PortalException,
223             com.liferay.portal.SystemException {
224         return getService().getItem(itemId);
225     }
226 
227     public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
228         long companyId, java.lang.String sku)
229         throws com.liferay.portal.PortalException,
230             com.liferay.portal.SystemException {
231         return getService().getItem(companyId, sku);
232     }
233 
234     public static com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
235         long largeImageId)
236         throws com.liferay.portal.PortalException,
237             com.liferay.portal.SystemException {
238         return getService().getItemByLargeImageId(largeImageId);
239     }
240 
241     public static com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
242         long mediumImageId)
243         throws com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException {
245         return getService().getItemByMediumImageId(mediumImageId);
246     }
247 
248     public static com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
249         long smallImageId)
250         throws com.liferay.portal.PortalException,
251             com.liferay.portal.SystemException {
252         return getService().getItemBySmallImageId(smallImageId);
253     }
254 
255     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
256         long categoryId) throws com.liferay.portal.SystemException {
257         return getService().getItems(categoryId);
258     }
259 
260     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
261         long categoryId, int start, int end,
262         com.liferay.portal.kernel.util.OrderByComparator obc)
263         throws com.liferay.portal.SystemException {
264         return getService().getItems(categoryId, start, end, obc);
265     }
266 
267     public static int getItemsCount(long categoryId)
268         throws com.liferay.portal.SystemException {
269         return getService().getItemsCount(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.PortalException,
275             com.liferay.portal.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.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.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) throws com.liferay.portal.SystemException {
293         return getService().searchCount(groupId, categoryIds, keywords);
294     }
295 
296     public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
297         long userId, long itemId, long categoryId, java.lang.String sku,
298         java.lang.String name, java.lang.String description,
299         java.lang.String properties, java.lang.String fieldsQuantities,
300         boolean requiresShipping, int stockQuantity, boolean featured,
301         java.lang.Boolean sale, boolean smallImage,
302         java.lang.String smallImageURL, java.io.File smallFile,
303         boolean mediumImage, java.lang.String mediumImageURL,
304         java.io.File mediumFile, boolean largeImage,
305         java.lang.String largeImageURL, java.io.File largeFile,
306         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
307         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
308         com.liferay.portal.service.ServiceContext serviceContext)
309         throws com.liferay.portal.PortalException,
310             com.liferay.portal.SystemException {
311         return getService()
312                    .updateItem(userId, itemId, categoryId, sku, name,
313             description, properties, fieldsQuantities, requiresShipping,
314             stockQuantity, featured, sale, smallImage, smallImageURL,
315             smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
316             largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
317     }
318 
319     public static ShoppingItemLocalService getService() {
320         if (_service == null) {
321             _service = (ShoppingItemLocalService)PortalBeanLocatorUtil.locate(ShoppingItemLocalService.class.getName());
322         }
323 
324         return _service;
325     }
326 
327     public void setService(ShoppingItemLocalService service) {
328         _service = service;
329     }
330 
331     private static ShoppingItemLocalService _service;
332 }