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