001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link ShoppingCategoryLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       ShoppingCategoryLocalService
030     * @generated
031     */
032    public class ShoppingCategoryLocalServiceUtil {
033            public static com.liferay.portlet.shopping.model.ShoppingCategory addShoppingCategory(
034                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addShoppingCategory(shoppingCategory);
037            }
038    
039            public static com.liferay.portlet.shopping.model.ShoppingCategory createShoppingCategory(
040                    long categoryId) {
041                    return getService().createShoppingCategory(categoryId);
042            }
043    
044            public static void deleteShoppingCategory(long categoryId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteShoppingCategory(categoryId);
048            }
049    
050            public static void deleteShoppingCategory(
051                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteShoppingCategory(shoppingCategory);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.shopping.model.ShoppingCategory getShoppingCategory(
087                    long categoryId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getShoppingCategory(categoryId);
091            }
092    
093            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getShoppingCategories(
094                    int start, int end)
095                    throws com.liferay.portal.kernel.exception.SystemException {
096                    return getService().getShoppingCategories(start, end);
097            }
098    
099            public static int getShoppingCategoriesCount()
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().getShoppingCategoriesCount();
102            }
103    
104            public static com.liferay.portlet.shopping.model.ShoppingCategory updateShoppingCategory(
105                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().updateShoppingCategory(shoppingCategory);
108            }
109    
110            public static com.liferay.portlet.shopping.model.ShoppingCategory updateShoppingCategory(
111                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
112                    boolean merge)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updateShoppingCategory(shoppingCategory, merge);
115            }
116    
117            public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
118                    long userId, long parentCategoryId, java.lang.String name,
119                    java.lang.String description,
120                    com.liferay.portal.service.ServiceContext serviceContext)
121                    throws com.liferay.portal.kernel.exception.PortalException,
122                            com.liferay.portal.kernel.exception.SystemException {
123                    return getService()
124                                       .addCategory(userId, parentCategoryId, name, description,
125                            serviceContext);
126            }
127    
128            public static void addCategoryResources(long categoryId,
129                    boolean addCommunityPermissions, boolean addGuestPermissions)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException {
132                    getService()
133                            .addCategoryResources(categoryId, addCommunityPermissions,
134                            addGuestPermissions);
135            }
136    
137            public static void addCategoryResources(long categoryId,
138                    java.lang.String[] communityPermissions,
139                    java.lang.String[] guestPermissions)
140                    throws com.liferay.portal.kernel.exception.PortalException,
141                            com.liferay.portal.kernel.exception.SystemException {
142                    getService()
143                            .addCategoryResources(categoryId, communityPermissions,
144                            guestPermissions);
145            }
146    
147            public static void addCategoryResources(
148                    com.liferay.portlet.shopping.model.ShoppingCategory category,
149                    boolean addCommunityPermissions, boolean addGuestPermissions)
150                    throws com.liferay.portal.kernel.exception.PortalException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    getService()
153                            .addCategoryResources(category, addCommunityPermissions,
154                            addGuestPermissions);
155            }
156    
157            public static void addCategoryResources(
158                    com.liferay.portlet.shopping.model.ShoppingCategory category,
159                    java.lang.String[] communityPermissions,
160                    java.lang.String[] guestPermissions)
161                    throws com.liferay.portal.kernel.exception.PortalException,
162                            com.liferay.portal.kernel.exception.SystemException {
163                    getService()
164                            .addCategoryResources(category, communityPermissions,
165                            guestPermissions);
166            }
167    
168            public static void deleteCategories(long groupId)
169                    throws com.liferay.portal.kernel.exception.PortalException,
170                            com.liferay.portal.kernel.exception.SystemException {
171                    getService().deleteCategories(groupId);
172            }
173    
174            public static void deleteCategory(long categoryId)
175                    throws com.liferay.portal.kernel.exception.PortalException,
176                            com.liferay.portal.kernel.exception.SystemException {
177                    getService().deleteCategory(categoryId);
178            }
179    
180            public static void deleteCategory(
181                    com.liferay.portlet.shopping.model.ShoppingCategory category)
182                    throws com.liferay.portal.kernel.exception.PortalException,
183                            com.liferay.portal.kernel.exception.SystemException {
184                    getService().deleteCategory(category);
185            }
186    
187            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
188                    long groupId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getService().getCategories(groupId);
191            }
192    
193            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
194                    long groupId, long parentCategoryId, int start, int end)
195                    throws com.liferay.portal.kernel.exception.SystemException {
196                    return getService().getCategories(groupId, parentCategoryId, start, end);
197            }
198    
199            public static int getCategoriesCount(long groupId, long parentCategoryId)
200                    throws com.liferay.portal.kernel.exception.SystemException {
201                    return getService().getCategoriesCount(groupId, parentCategoryId);
202            }
203    
204            public static com.liferay.portlet.shopping.model.ShoppingCategory getCategory(
205                    long categoryId)
206                    throws com.liferay.portal.kernel.exception.PortalException,
207                            com.liferay.portal.kernel.exception.SystemException {
208                    return getService().getCategory(categoryId);
209            }
210    
211            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getParentCategories(
212                    long categoryId)
213                    throws com.liferay.portal.kernel.exception.PortalException,
214                            com.liferay.portal.kernel.exception.SystemException {
215                    return getService().getParentCategories(categoryId);
216            }
217    
218            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getParentCategories(
219                    com.liferay.portlet.shopping.model.ShoppingCategory category)
220                    throws com.liferay.portal.kernel.exception.PortalException,
221                            com.liferay.portal.kernel.exception.SystemException {
222                    return getService().getParentCategories(category);
223            }
224    
225            public static com.liferay.portlet.shopping.model.ShoppingCategory getParentCategory(
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().getParentCategory(category);
230            }
231    
232            public static void getSubcategoryIds(
233                    java.util.List<java.lang.Long> categoryIds, long groupId,
234                    long categoryId)
235                    throws com.liferay.portal.kernel.exception.SystemException {
236                    getService().getSubcategoryIds(categoryIds, groupId, categoryId);
237            }
238    
239            public static com.liferay.portlet.shopping.model.ShoppingCategory updateCategory(
240                    long categoryId, long parentCategoryId, java.lang.String name,
241                    java.lang.String description, boolean mergeWithParentCategory,
242                    com.liferay.portal.service.ServiceContext serviceContext)
243                    throws com.liferay.portal.kernel.exception.PortalException,
244                            com.liferay.portal.kernel.exception.SystemException {
245                    return getService()
246                                       .updateCategory(categoryId, parentCategoryId, name,
247                            description, mergeWithParentCategory, serviceContext);
248            }
249    
250            public static ShoppingCategoryLocalService getService() {
251                    if (_service == null) {
252                            _service = (ShoppingCategoryLocalService)PortalBeanLocatorUtil.locate(ShoppingCategoryLocalService.class.getName());
253                    }
254    
255                    return _service;
256            }
257    
258            public void setService(ShoppingCategoryLocalService service) {
259                    _service = service;
260            }
261    
262            private static ShoppingCategoryLocalService _service;
263    }