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