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