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.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.service.ServiceContext;
022    
023    import com.liferay.portlet.shopping.model.ShoppingCategory;
024    
025    import java.util.List;
026    
027    /**
028     * @author    Brian Wing Shun Chan
029     * @see       ShoppingCategoryPersistence
030     * @see       ShoppingCategoryPersistenceImpl
031     * @generated
032     */
033    public class ShoppingCategoryUtil {
034            /**
035             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
036             */
037            public static void clearCache() {
038                    getPersistence().clearCache();
039            }
040    
041            /**
042             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
043             */
044            public static void clearCache(ShoppingCategory shoppingCategory) {
045                    getPersistence().clearCache(shoppingCategory);
046            }
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
050             */
051            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
052                    throws SystemException {
053                    return getPersistence().countWithDynamicQuery(dynamicQuery);
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
058             */
059            public static List<ShoppingCategory> findWithDynamicQuery(
060                    DynamicQuery dynamicQuery) throws SystemException {
061                    return getPersistence().findWithDynamicQuery(dynamicQuery);
062            }
063    
064            /**
065             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
066             */
067            public static List<ShoppingCategory> findWithDynamicQuery(
068                    DynamicQuery dynamicQuery, int start, int end)
069                    throws SystemException {
070                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
071            }
072    
073            /**
074             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
075             */
076            public static List<ShoppingCategory> findWithDynamicQuery(
077                    DynamicQuery dynamicQuery, int start, int end,
078                    OrderByComparator orderByComparator) throws SystemException {
079                    return getPersistence()
080                                       .findWithDynamicQuery(dynamicQuery, start, end,
081                            orderByComparator);
082            }
083    
084            /**
085             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
086             */
087            public static ShoppingCategory remove(ShoppingCategory shoppingCategory)
088                    throws SystemException {
089                    return getPersistence().remove(shoppingCategory);
090            }
091    
092            /**
093             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
094             */
095            public static ShoppingCategory update(ShoppingCategory shoppingCategory,
096                    boolean merge) throws SystemException {
097                    return getPersistence().update(shoppingCategory, merge);
098            }
099    
100            /**
101             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
102             */
103            public static ShoppingCategory update(ShoppingCategory shoppingCategory,
104                    boolean merge, ServiceContext serviceContext) throws SystemException {
105                    return getPersistence().update(shoppingCategory, merge, serviceContext);
106            }
107    
108            public static void cacheResult(
109                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory) {
110                    getPersistence().cacheResult(shoppingCategory);
111            }
112    
113            public static void cacheResult(
114                    java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> shoppingCategories) {
115                    getPersistence().cacheResult(shoppingCategories);
116            }
117    
118            public static com.liferay.portlet.shopping.model.ShoppingCategory create(
119                    long categoryId) {
120                    return getPersistence().create(categoryId);
121            }
122    
123            public static com.liferay.portlet.shopping.model.ShoppingCategory remove(
124                    long categoryId)
125                    throws com.liferay.portal.kernel.exception.SystemException,
126                            com.liferay.portlet.shopping.NoSuchCategoryException {
127                    return getPersistence().remove(categoryId);
128            }
129    
130            public static com.liferay.portlet.shopping.model.ShoppingCategory updateImpl(
131                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
132                    boolean merge)
133                    throws com.liferay.portal.kernel.exception.SystemException {
134                    return getPersistence().updateImpl(shoppingCategory, merge);
135            }
136    
137            public static com.liferay.portlet.shopping.model.ShoppingCategory findByPrimaryKey(
138                    long categoryId)
139                    throws com.liferay.portal.kernel.exception.SystemException,
140                            com.liferay.portlet.shopping.NoSuchCategoryException {
141                    return getPersistence().findByPrimaryKey(categoryId);
142            }
143    
144            public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByPrimaryKey(
145                    long categoryId)
146                    throws com.liferay.portal.kernel.exception.SystemException {
147                    return getPersistence().fetchByPrimaryKey(categoryId);
148            }
149    
150            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
151                    long groupId)
152                    throws com.liferay.portal.kernel.exception.SystemException {
153                    return getPersistence().findByGroupId(groupId);
154            }
155    
156            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
157                    long groupId, int start, int end)
158                    throws com.liferay.portal.kernel.exception.SystemException {
159                    return getPersistence().findByGroupId(groupId, start, end);
160            }
161    
162            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
163                    long groupId, int start, int end,
164                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence()
167                                       .findByGroupId(groupId, start, end, orderByComparator);
168            }
169    
170            public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First(
171                    long groupId,
172                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173                    throws com.liferay.portal.kernel.exception.SystemException,
174                            com.liferay.portlet.shopping.NoSuchCategoryException {
175                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
176            }
177    
178            public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last(
179                    long groupId,
180                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181                    throws com.liferay.portal.kernel.exception.SystemException,
182                            com.liferay.portlet.shopping.NoSuchCategoryException {
183                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
184            }
185    
186            public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext(
187                    long categoryId, long groupId,
188                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
189                    throws com.liferay.portal.kernel.exception.SystemException,
190                            com.liferay.portlet.shopping.NoSuchCategoryException {
191                    return getPersistence()
192                                       .findByGroupId_PrevAndNext(categoryId, groupId,
193                            orderByComparator);
194            }
195    
196            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
197                    long groupId)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getPersistence().filterFindByGroupId(groupId);
200            }
201    
202            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
203                    long groupId, int start, int end)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return getPersistence().filterFindByGroupId(groupId, start, end);
206            }
207    
208            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
209                    long groupId, int start, int end,
210                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getPersistence()
213                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
214            }
215    
216            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
217                    long groupId, long parentCategoryId)
218                    throws com.liferay.portal.kernel.exception.SystemException {
219                    return getPersistence().findByG_P(groupId, parentCategoryId);
220            }
221    
222            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
223                    long groupId, long parentCategoryId, int start, int end)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
226            }
227    
228            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
229                    long groupId, long parentCategoryId, int start, int end,
230                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
231                    throws com.liferay.portal.kernel.exception.SystemException {
232                    return getPersistence()
233                                       .findByG_P(groupId, parentCategoryId, start, end,
234                            orderByComparator);
235            }
236    
237            public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First(
238                    long groupId, long parentCategoryId,
239                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
240                    throws com.liferay.portal.kernel.exception.SystemException,
241                            com.liferay.portlet.shopping.NoSuchCategoryException {
242                    return getPersistence()
243                                       .findByG_P_First(groupId, parentCategoryId, orderByComparator);
244            }
245    
246            public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_Last(
247                    long groupId, long parentCategoryId,
248                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
249                    throws com.liferay.portal.kernel.exception.SystemException,
250                            com.liferay.portlet.shopping.NoSuchCategoryException {
251                    return getPersistence()
252                                       .findByG_P_Last(groupId, parentCategoryId, orderByComparator);
253            }
254    
255            public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext(
256                    long categoryId, long groupId, long parentCategoryId,
257                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
258                    throws com.liferay.portal.kernel.exception.SystemException,
259                            com.liferay.portlet.shopping.NoSuchCategoryException {
260                    return getPersistence()
261                                       .findByG_P_PrevAndNext(categoryId, groupId,
262                            parentCategoryId, orderByComparator);
263            }
264    
265            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
266                    long groupId, long parentCategoryId)
267                    throws com.liferay.portal.kernel.exception.SystemException {
268                    return getPersistence().filterFindByG_P(groupId, parentCategoryId);
269            }
270    
271            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
272                    long groupId, long parentCategoryId, int start, int end)
273                    throws com.liferay.portal.kernel.exception.SystemException {
274                    return getPersistence()
275                                       .filterFindByG_P(groupId, parentCategoryId, start, end);
276            }
277    
278            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
279                    long groupId, long parentCategoryId, int start, int end,
280                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
281                    throws com.liferay.portal.kernel.exception.SystemException {
282                    return getPersistence()
283                                       .filterFindByG_P(groupId, parentCategoryId, start, end,
284                            orderByComparator);
285            }
286    
287            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
288                    throws com.liferay.portal.kernel.exception.SystemException {
289                    return getPersistence().findAll();
290            }
291    
292            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
293                    int start, int end)
294                    throws com.liferay.portal.kernel.exception.SystemException {
295                    return getPersistence().findAll(start, end);
296            }
297    
298            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
299                    int start, int end,
300                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
301                    throws com.liferay.portal.kernel.exception.SystemException {
302                    return getPersistence().findAll(start, end, orderByComparator);
303            }
304    
305            public static void removeByGroupId(long groupId)
306                    throws com.liferay.portal.kernel.exception.SystemException {
307                    getPersistence().removeByGroupId(groupId);
308            }
309    
310            public static void removeByG_P(long groupId, long parentCategoryId)
311                    throws com.liferay.portal.kernel.exception.SystemException {
312                    getPersistence().removeByG_P(groupId, parentCategoryId);
313            }
314    
315            public static void removeAll()
316                    throws com.liferay.portal.kernel.exception.SystemException {
317                    getPersistence().removeAll();
318            }
319    
320            public static int countByGroupId(long groupId)
321                    throws com.liferay.portal.kernel.exception.SystemException {
322                    return getPersistence().countByGroupId(groupId);
323            }
324    
325            public static int filterCountByGroupId(long groupId)
326                    throws com.liferay.portal.kernel.exception.SystemException {
327                    return getPersistence().filterCountByGroupId(groupId);
328            }
329    
330            public static int countByG_P(long groupId, long parentCategoryId)
331                    throws com.liferay.portal.kernel.exception.SystemException {
332                    return getPersistence().countByG_P(groupId, parentCategoryId);
333            }
334    
335            public static int filterCountByG_P(long groupId, long parentCategoryId)
336                    throws com.liferay.portal.kernel.exception.SystemException {
337                    return getPersistence().filterCountByG_P(groupId, parentCategoryId);
338            }
339    
340            public static int countAll()
341                    throws com.liferay.portal.kernel.exception.SystemException {
342                    return getPersistence().countAll();
343            }
344    
345            public static ShoppingCategoryPersistence getPersistence() {
346                    if (_persistence == null) {
347                            _persistence = (ShoppingCategoryPersistence)PortalBeanLocatorUtil.locate(ShoppingCategoryPersistence.class.getName());
348                    }
349    
350                    return _persistence;
351            }
352    
353            public void setPersistence(ShoppingCategoryPersistence persistence) {
354                    _persistence = persistence;
355            }
356    
357            private static ShoppingCategoryPersistence _persistence;
358    }