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