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="ShoppingCategoryLocalServiceUtil.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 ShoppingCategoryLocalService} 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       ShoppingCategoryLocalService
37   * @generated
38   */
39  public class ShoppingCategoryLocalServiceUtil {
40      public static com.liferay.portlet.shopping.model.ShoppingCategory addShoppingCategory(
41          com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addShoppingCategory(shoppingCategory);
44      }
45  
46      public static com.liferay.portlet.shopping.model.ShoppingCategory createShoppingCategory(
47          long categoryId) {
48          return getService().createShoppingCategory(categoryId);
49      }
50  
51      public static void deleteShoppingCategory(long categoryId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteShoppingCategory(categoryId);
55      }
56  
57      public static void deleteShoppingCategory(
58          com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteShoppingCategory(shoppingCategory);
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.ShoppingCategory getShoppingCategory(
94          long categoryId)
95          throws com.liferay.portal.kernel.exception.PortalException,
96              com.liferay.portal.kernel.exception.SystemException {
97          return getService().getShoppingCategory(categoryId);
98      }
99  
100     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getShoppingCategories(
101         int start, int end)
102         throws com.liferay.portal.kernel.exception.SystemException {
103         return getService().getShoppingCategories(start, end);
104     }
105 
106     public static int getShoppingCategoriesCount()
107         throws com.liferay.portal.kernel.exception.SystemException {
108         return getService().getShoppingCategoriesCount();
109     }
110 
111     public static com.liferay.portlet.shopping.model.ShoppingCategory updateShoppingCategory(
112         com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
113         throws com.liferay.portal.kernel.exception.SystemException {
114         return getService().updateShoppingCategory(shoppingCategory);
115     }
116 
117     public static com.liferay.portlet.shopping.model.ShoppingCategory updateShoppingCategory(
118         com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
119         boolean merge)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getService().updateShoppingCategory(shoppingCategory, merge);
122     }
123 
124     public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
125         long userId, long parentCategoryId, java.lang.String name,
126         java.lang.String description,
127         com.liferay.portal.service.ServiceContext serviceContext)
128         throws com.liferay.portal.kernel.exception.PortalException,
129             com.liferay.portal.kernel.exception.SystemException {
130         return getService()
131                    .addCategory(userId, parentCategoryId, name, description,
132             serviceContext);
133     }
134 
135     public static void addCategoryResources(long categoryId,
136         boolean addCommunityPermissions, boolean addGuestPermissions)
137         throws com.liferay.portal.kernel.exception.PortalException,
138             com.liferay.portal.kernel.exception.SystemException {
139         getService()
140             .addCategoryResources(categoryId, addCommunityPermissions,
141             addGuestPermissions);
142     }
143 
144     public static void addCategoryResources(long categoryId,
145         java.lang.String[] communityPermissions,
146         java.lang.String[] guestPermissions)
147         throws com.liferay.portal.kernel.exception.PortalException,
148             com.liferay.portal.kernel.exception.SystemException {
149         getService()
150             .addCategoryResources(categoryId, communityPermissions,
151             guestPermissions);
152     }
153 
154     public static void addCategoryResources(
155         com.liferay.portlet.shopping.model.ShoppingCategory category,
156         boolean addCommunityPermissions, boolean addGuestPermissions)
157         throws com.liferay.portal.kernel.exception.PortalException,
158             com.liferay.portal.kernel.exception.SystemException {
159         getService()
160             .addCategoryResources(category, addCommunityPermissions,
161             addGuestPermissions);
162     }
163 
164     public static void addCategoryResources(
165         com.liferay.portlet.shopping.model.ShoppingCategory category,
166         java.lang.String[] communityPermissions,
167         java.lang.String[] guestPermissions)
168         throws com.liferay.portal.kernel.exception.PortalException,
169             com.liferay.portal.kernel.exception.SystemException {
170         getService()
171             .addCategoryResources(category, communityPermissions,
172             guestPermissions);
173     }
174 
175     public static void deleteCategories(long groupId)
176         throws com.liferay.portal.kernel.exception.PortalException,
177             com.liferay.portal.kernel.exception.SystemException {
178         getService().deleteCategories(groupId);
179     }
180 
181     public static void deleteCategory(long categoryId)
182         throws com.liferay.portal.kernel.exception.PortalException,
183             com.liferay.portal.kernel.exception.SystemException {
184         getService().deleteCategory(categoryId);
185     }
186 
187     public static void deleteCategory(
188         com.liferay.portlet.shopping.model.ShoppingCategory category)
189         throws com.liferay.portal.kernel.exception.PortalException,
190             com.liferay.portal.kernel.exception.SystemException {
191         getService().deleteCategory(category);
192     }
193 
194     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
195         long groupId)
196         throws com.liferay.portal.kernel.exception.SystemException {
197         return getService().getCategories(groupId);
198     }
199 
200     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
201         long groupId, long parentCategoryId, int start, int end)
202         throws com.liferay.portal.kernel.exception.SystemException {
203         return getService().getCategories(groupId, parentCategoryId, start, end);
204     }
205 
206     public static int getCategoriesCount(long groupId, long parentCategoryId)
207         throws com.liferay.portal.kernel.exception.SystemException {
208         return getService().getCategoriesCount(groupId, parentCategoryId);
209     }
210 
211     public static com.liferay.portlet.shopping.model.ShoppingCategory getCategory(
212         long categoryId)
213         throws com.liferay.portal.kernel.exception.PortalException,
214             com.liferay.portal.kernel.exception.SystemException {
215         return getService().getCategory(categoryId);
216     }
217 
218     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getParentCategories(
219         long categoryId)
220         throws com.liferay.portal.kernel.exception.PortalException,
221             com.liferay.portal.kernel.exception.SystemException {
222         return getService().getParentCategories(categoryId);
223     }
224 
225     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getParentCategories(
226         com.liferay.portlet.shopping.model.ShoppingCategory category)
227         throws com.liferay.portal.kernel.exception.PortalException,
228             com.liferay.portal.kernel.exception.SystemException {
229         return getService().getParentCategories(category);
230     }
231 
232     public static com.liferay.portlet.shopping.model.ShoppingCategory getParentCategory(
233         com.liferay.portlet.shopping.model.ShoppingCategory category)
234         throws com.liferay.portal.kernel.exception.PortalException,
235             com.liferay.portal.kernel.exception.SystemException {
236         return getService().getParentCategory(category);
237     }
238 
239     public static void getSubcategoryIds(
240         java.util.List<java.lang.Long> categoryIds, long groupId,
241         long categoryId)
242         throws com.liferay.portal.kernel.exception.SystemException {
243         getService().getSubcategoryIds(categoryIds, groupId, categoryId);
244     }
245 
246     public static com.liferay.portlet.shopping.model.ShoppingCategory updateCategory(
247         long categoryId, long parentCategoryId, java.lang.String name,
248         java.lang.String description, boolean mergeWithParentCategory,
249         com.liferay.portal.service.ServiceContext serviceContext)
250         throws com.liferay.portal.kernel.exception.PortalException,
251             com.liferay.portal.kernel.exception.SystemException {
252         return getService()
253                    .updateCategory(categoryId, parentCategoryId, name,
254             description, mergeWithParentCategory, serviceContext);
255     }
256 
257     public static ShoppingCategoryLocalService getService() {
258         if (_service == null) {
259             _service = (ShoppingCategoryLocalService)PortalBeanLocatorUtil.locate(ShoppingCategoryLocalService.class.getName());
260         }
261 
262         return _service;
263     }
264 
265     public void setService(ShoppingCategoryLocalService service) {
266         _service = service;
267     }
268 
269     private static ShoppingCategoryLocalService _service;
270 }