1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.shopping.service;
21  
22  
23  /**
24   * <a href="ShoppingItemLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.shopping.service.ShoppingItemLocalService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.shopping.service.ShoppingItemLocalService
42   *
43   */
44  public class ShoppingItemLocalServiceUtil {
45      public static com.liferay.portlet.shopping.model.ShoppingItem addShoppingItem(
46          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
47          throws com.liferay.portal.SystemException {
48          return getService().addShoppingItem(shoppingItem);
49      }
50  
51      public static com.liferay.portlet.shopping.model.ShoppingItem createShoppingItem(
52          long itemId) {
53          return getService().createShoppingItem(itemId);
54      }
55  
56      public static void deleteShoppingItem(long itemId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService().deleteShoppingItem(itemId);
60      }
61  
62      public static void deleteShoppingItem(
63          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
64          throws com.liferay.portal.SystemException {
65          getService().deleteShoppingItem(shoppingItem);
66      }
67  
68      public static java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
70          throws com.liferay.portal.SystemException {
71          return getService().dynamicQuery(dynamicQuery);
72      }
73  
74      public static java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      public static com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
81          long itemId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getShoppingItem(itemId);
85      }
86  
87      public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getShoppingItems(
88          int start, int end) throws com.liferay.portal.SystemException {
89          return getService().getShoppingItems(start, end);
90      }
91  
92      public static int getShoppingItemsCount()
93          throws com.liferay.portal.SystemException {
94          return getService().getShoppingItemsCount();
95      }
96  
97      public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
98          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
99          throws com.liferay.portal.SystemException {
100         return getService().updateShoppingItem(shoppingItem);
101     }
102 
103     public static void addBookItems(long userId, long categoryId,
104         java.lang.String[] isbns)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException {
107         getService().addBookItems(userId, categoryId, isbns);
108     }
109 
110     public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
111         long userId, long categoryId, java.lang.String sku,
112         java.lang.String name, java.lang.String description,
113         java.lang.String properties, java.lang.String fieldsQuantities,
114         boolean requiresShipping, int stockQuantity, boolean featured,
115         java.lang.Boolean sale, boolean smallImage,
116         java.lang.String smallImageURL, java.io.File smallFile,
117         boolean mediumImage, java.lang.String mediumImageURL,
118         java.io.File mediumFile, boolean largeImage,
119         java.lang.String largeImageURL, java.io.File largeFile,
120         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
121         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
122         boolean addCommunityPermissions, boolean addGuestPermissions)
123         throws com.liferay.portal.PortalException,
124             com.liferay.portal.SystemException {
125         return getService()
126                    .addItem(userId, categoryId, sku, name, description,
127             properties, fieldsQuantities, requiresShipping, stockQuantity,
128             featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
129             mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
130             itemFields, itemPrices, addCommunityPermissions, addGuestPermissions);
131     }
132 
133     public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
134         long userId, long categoryId, java.lang.String sku,
135         java.lang.String name, java.lang.String description,
136         java.lang.String properties, java.lang.String fieldsQuantities,
137         boolean requiresShipping, int stockQuantity, boolean featured,
138         java.lang.Boolean sale, boolean smallImage,
139         java.lang.String smallImageURL, java.io.File smallFile,
140         boolean mediumImage, java.lang.String mediumImageURL,
141         java.io.File mediumFile, boolean largeImage,
142         java.lang.String largeImageURL, java.io.File largeFile,
143         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
144         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
145         java.lang.String[] communityPermissions,
146         java.lang.String[] guestPermissions)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException {
149         return getService()
150                    .addItem(userId, categoryId, sku, name, description,
151             properties, fieldsQuantities, requiresShipping, stockQuantity,
152             featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
153             mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
154             itemFields, itemPrices, communityPermissions, guestPermissions);
155     }
156 
157     public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
158         long userId, long categoryId, java.lang.String sku,
159         java.lang.String name, java.lang.String description,
160         java.lang.String properties, java.lang.String fieldsQuantities,
161         boolean requiresShipping, int stockQuantity, boolean featured,
162         java.lang.Boolean sale, boolean smallImage,
163         java.lang.String smallImageURL, java.io.File smallFile,
164         boolean mediumImage, java.lang.String mediumImageURL,
165         java.io.File mediumFile, boolean largeImage,
166         java.lang.String largeImageURL, java.io.File largeFile,
167         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
168         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
169         java.lang.Boolean addCommunityPermissions,
170         java.lang.Boolean addGuestPermissions,
171         java.lang.String[] communityPermissions,
172         java.lang.String[] guestPermissions)
173         throws com.liferay.portal.PortalException,
174             com.liferay.portal.SystemException {
175         return getService()
176                    .addItem(userId, categoryId, sku, name, description,
177             properties, fieldsQuantities, requiresShipping, stockQuantity,
178             featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
179             mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
180             itemFields, itemPrices, addCommunityPermissions,
181             addGuestPermissions, communityPermissions, guestPermissions);
182     }
183 
184     public static void addItemResources(long itemId,
185         boolean addCommunityPermissions, boolean addGuestPermissions)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException {
188         getService()
189             .addItemResources(itemId, addCommunityPermissions,
190             addGuestPermissions);
191     }
192 
193     public static void addItemResources(
194         com.liferay.portlet.shopping.model.ShoppingCategory category,
195         com.liferay.portlet.shopping.model.ShoppingItem item,
196         boolean addCommunityPermissions, boolean addGuestPermissions)
197         throws com.liferay.portal.PortalException,
198             com.liferay.portal.SystemException {
199         getService()
200             .addItemResources(category, item, addCommunityPermissions,
201             addGuestPermissions);
202     }
203 
204     public static void addItemResources(long itemId,
205         java.lang.String[] communityPermissions,
206         java.lang.String[] guestPermissions)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException {
209         getService()
210             .addItemResources(itemId, communityPermissions, guestPermissions);
211     }
212 
213     public static void addItemResources(
214         com.liferay.portlet.shopping.model.ShoppingCategory category,
215         com.liferay.portlet.shopping.model.ShoppingItem item,
216         java.lang.String[] communityPermissions,
217         java.lang.String[] guestPermissions)
218         throws com.liferay.portal.PortalException,
219             com.liferay.portal.SystemException {
220         getService()
221             .addItemResources(category, item, communityPermissions,
222             guestPermissions);
223     }
224 
225     public static void deleteItem(long itemId)
226         throws com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException {
228         getService().deleteItem(itemId);
229     }
230 
231     public static void deleteItem(
232         com.liferay.portlet.shopping.model.ShoppingItem item)
233         throws com.liferay.portal.PortalException,
234             com.liferay.portal.SystemException {
235         getService().deleteItem(item);
236     }
237 
238     public static void deleteItems(long categoryId)
239         throws com.liferay.portal.PortalException,
240             com.liferay.portal.SystemException {
241         getService().deleteItems(categoryId);
242     }
243 
244     public static int getCategoriesItemsCount(java.util.List<Long> categoryIds)
245         throws com.liferay.portal.SystemException {
246         return getService().getCategoriesItemsCount(categoryIds);
247     }
248 
249     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
250         long groupId, long categoryId, int numOfItems)
251         throws com.liferay.portal.SystemException {
252         return getService().getFeaturedItems(groupId, categoryId, numOfItems);
253     }
254 
255     public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
256         long itemId)
257         throws com.liferay.portal.PortalException,
258             com.liferay.portal.SystemException {
259         return getService().getItem(itemId);
260     }
261 
262     public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
263         long companyId, java.lang.String sku)
264         throws com.liferay.portal.PortalException,
265             com.liferay.portal.SystemException {
266         return getService().getItem(companyId, sku);
267     }
268 
269     public static com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
270         long largeImageId)
271         throws com.liferay.portal.PortalException,
272             com.liferay.portal.SystemException {
273         return getService().getItemByLargeImageId(largeImageId);
274     }
275 
276     public static com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
277         long mediumImageId)
278         throws com.liferay.portal.PortalException,
279             com.liferay.portal.SystemException {
280         return getService().getItemByMediumImageId(mediumImageId);
281     }
282 
283     public static com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
284         long smallImageId)
285         throws com.liferay.portal.PortalException,
286             com.liferay.portal.SystemException {
287         return getService().getItemBySmallImageId(smallImageId);
288     }
289 
290     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
291         long categoryId) throws com.liferay.portal.SystemException {
292         return getService().getItems(categoryId);
293     }
294 
295     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
296         long categoryId, int start, int end,
297         com.liferay.portal.kernel.util.OrderByComparator obc)
298         throws com.liferay.portal.SystemException {
299         return getService().getItems(categoryId, start, end, obc);
300     }
301 
302     public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
303         long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
304         throws com.liferay.portal.PortalException,
305             com.liferay.portal.SystemException {
306         return getService().getItemsPrevAndNext(itemId, obc);
307     }
308 
309     public static int getItemsCount(long categoryId)
310         throws com.liferay.portal.SystemException {
311         return getService().getItemsCount(categoryId);
312     }
313 
314     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
315         long groupId, long categoryId, int numOfItems)
316         throws com.liferay.portal.SystemException {
317         return getService().getSaleItems(groupId, categoryId, numOfItems);
318     }
319 
320     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
321         long groupId, long[] categoryIds, java.lang.String keywords, int start,
322         int end) throws com.liferay.portal.SystemException {
323         return getService().search(groupId, categoryIds, keywords, start, end);
324     }
325 
326     public static int searchCount(long groupId, long[] categoryIds,
327         java.lang.String keywords) throws com.liferay.portal.SystemException {
328         return getService().searchCount(groupId, categoryIds, keywords);
329     }
330 
331     public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
332         long userId, long itemId, long categoryId, java.lang.String sku,
333         java.lang.String name, java.lang.String description,
334         java.lang.String properties, java.lang.String fieldsQuantities,
335         boolean requiresShipping, int stockQuantity, boolean featured,
336         java.lang.Boolean sale, boolean smallImage,
337         java.lang.String smallImageURL, java.io.File smallFile,
338         boolean mediumImage, java.lang.String mediumImageURL,
339         java.io.File mediumFile, boolean largeImage,
340         java.lang.String largeImageURL, java.io.File largeFile,
341         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
342         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices)
343         throws com.liferay.portal.PortalException,
344             com.liferay.portal.SystemException {
345         return getService()
346                    .updateItem(userId, itemId, categoryId, sku, name,
347             description, properties, fieldsQuantities, requiresShipping,
348             stockQuantity, featured, sale, smallImage, smallImageURL,
349             smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
350             largeImageURL, largeFile, itemFields, itemPrices);
351     }
352 
353     public static ShoppingItemLocalService getService() {
354         if (_service == null) {
355             throw new RuntimeException("ShoppingItemLocalService is not set");
356         }
357 
358         return _service;
359     }
360 
361     public void setService(ShoppingItemLocalService service) {
362         _service = service;
363     }
364 
365     private static ShoppingItemLocalService _service;
366 }