001    /**
002     * Copyright (c) 2000-2012 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.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.shopping.model.ShoppingCategory;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the shopping category service. This utility wraps {@link ShoppingCategoryPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see ShoppingCategoryPersistence
037     * @see ShoppingCategoryPersistenceImpl
038     * @generated
039     */
040    public class ShoppingCategoryUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(ShoppingCategory shoppingCategory) {
058                    getPersistence().clearCache(shoppingCategory);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<ShoppingCategory> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<ShoppingCategory> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<ShoppingCategory> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
099             */
100            public static ShoppingCategory update(ShoppingCategory shoppingCategory,
101                    boolean merge) throws SystemException {
102                    return getPersistence().update(shoppingCategory, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static ShoppingCategory update(ShoppingCategory shoppingCategory,
109                    boolean merge, ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(shoppingCategory, merge, serviceContext);
111            }
112    
113            /**
114            * Caches the shopping category in the entity cache if it is enabled.
115            *
116            * @param shoppingCategory the shopping category
117            */
118            public static void cacheResult(
119                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory) {
120                    getPersistence().cacheResult(shoppingCategory);
121            }
122    
123            /**
124            * Caches the shopping categories in the entity cache if it is enabled.
125            *
126            * @param shoppingCategories the shopping categories
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> shoppingCategories) {
130                    getPersistence().cacheResult(shoppingCategories);
131            }
132    
133            /**
134            * Creates a new shopping category with the primary key. Does not add the shopping category to the database.
135            *
136            * @param categoryId the primary key for the new shopping category
137            * @return the new shopping category
138            */
139            public static com.liferay.portlet.shopping.model.ShoppingCategory create(
140                    long categoryId) {
141                    return getPersistence().create(categoryId);
142            }
143    
144            /**
145            * Removes the shopping category with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param categoryId the primary key of the shopping category
148            * @return the shopping category that was removed
149            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portlet.shopping.model.ShoppingCategory remove(
153                    long categoryId)
154                    throws com.liferay.portal.kernel.exception.SystemException,
155                            com.liferay.portlet.shopping.NoSuchCategoryException {
156                    return getPersistence().remove(categoryId);
157            }
158    
159            public static com.liferay.portlet.shopping.model.ShoppingCategory updateImpl(
160                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
161                    boolean merge)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().updateImpl(shoppingCategory, merge);
164            }
165    
166            /**
167            * Returns the shopping category with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchCategoryException} if it could not be found.
168            *
169            * @param categoryId the primary key of the shopping category
170            * @return the shopping category
171            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
172            * @throws SystemException if a system exception occurred
173            */
174            public static com.liferay.portlet.shopping.model.ShoppingCategory findByPrimaryKey(
175                    long categoryId)
176                    throws com.liferay.portal.kernel.exception.SystemException,
177                            com.liferay.portlet.shopping.NoSuchCategoryException {
178                    return getPersistence().findByPrimaryKey(categoryId);
179            }
180    
181            /**
182            * Returns the shopping category with the primary key or returns <code>null</code> if it could not be found.
183            *
184            * @param categoryId the primary key of the shopping category
185            * @return the shopping category, or <code>null</code> if a shopping category with the primary key could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByPrimaryKey(
189                    long categoryId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence().fetchByPrimaryKey(categoryId);
192            }
193    
194            /**
195            * Returns all the shopping categories where groupId = &#63;.
196            *
197            * @param groupId the group ID
198            * @return the matching shopping categories
199            * @throws SystemException if a system exception occurred
200            */
201            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
202                    long groupId)
203                    throws com.liferay.portal.kernel.exception.SystemException {
204                    return getPersistence().findByGroupId(groupId);
205            }
206    
207            /**
208            * Returns a range of all the shopping categories where groupId = &#63;.
209            *
210            * <p>
211            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
212            * </p>
213            *
214            * @param groupId the group ID
215            * @param start the lower bound of the range of shopping categories
216            * @param end the upper bound of the range of shopping categories (not inclusive)
217            * @return the range of matching shopping categories
218            * @throws SystemException if a system exception occurred
219            */
220            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
221                    long groupId, int start, int end)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getPersistence().findByGroupId(groupId, start, end);
224            }
225    
226            /**
227            * Returns an ordered range of all the shopping categories where groupId = &#63;.
228            *
229            * <p>
230            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
231            * </p>
232            *
233            * @param groupId the group ID
234            * @param start the lower bound of the range of shopping categories
235            * @param end the upper bound of the range of shopping categories (not inclusive)
236            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
237            * @return the ordered range of matching shopping categories
238            * @throws SystemException if a system exception occurred
239            */
240            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
241                    long groupId, int start, int end,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence()
245                                       .findByGroupId(groupId, start, end, orderByComparator);
246            }
247    
248            /**
249            * Returns the first shopping category in the ordered set where groupId = &#63;.
250            *
251            * <p>
252            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
253            * </p>
254            *
255            * @param groupId the group ID
256            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
257            * @return the first matching shopping category
258            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
259            * @throws SystemException if a system exception occurred
260            */
261            public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First(
262                    long groupId,
263                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
264                    throws com.liferay.portal.kernel.exception.SystemException,
265                            com.liferay.portlet.shopping.NoSuchCategoryException {
266                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
267            }
268    
269            /**
270            * Returns the last shopping category in the ordered set where groupId = &#63;.
271            *
272            * <p>
273            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
274            * </p>
275            *
276            * @param groupId the group ID
277            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
278            * @return the last matching shopping category
279            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
280            * @throws SystemException if a system exception occurred
281            */
282            public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last(
283                    long groupId,
284                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285                    throws com.liferay.portal.kernel.exception.SystemException,
286                            com.liferay.portlet.shopping.NoSuchCategoryException {
287                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
288            }
289    
290            /**
291            * Returns the shopping categories before and after the current shopping category in the ordered set where groupId = &#63;.
292            *
293            * <p>
294            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
295            * </p>
296            *
297            * @param categoryId the primary key of the current shopping category
298            * @param groupId the group ID
299            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
300            * @return the previous, current, and next shopping category
301            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext(
305                    long categoryId, long groupId,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.kernel.exception.SystemException,
308                            com.liferay.portlet.shopping.NoSuchCategoryException {
309                    return getPersistence()
310                                       .findByGroupId_PrevAndNext(categoryId, groupId,
311                            orderByComparator);
312            }
313    
314            /**
315            * Returns all the shopping categories that the user has permission to view where groupId = &#63;.
316            *
317            * @param groupId the group ID
318            * @return the matching shopping categories that the user has permission to view
319            * @throws SystemException if a system exception occurred
320            */
321            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
322                    long groupId)
323                    throws com.liferay.portal.kernel.exception.SystemException {
324                    return getPersistence().filterFindByGroupId(groupId);
325            }
326    
327            /**
328            * Returns a range of all the shopping categories that the user has permission to view where groupId = &#63;.
329            *
330            * <p>
331            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
332            * </p>
333            *
334            * @param groupId the group ID
335            * @param start the lower bound of the range of shopping categories
336            * @param end the upper bound of the range of shopping categories (not inclusive)
337            * @return the range of matching shopping categories that the user has permission to view
338            * @throws SystemException if a system exception occurred
339            */
340            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
341                    long groupId, int start, int end)
342                    throws com.liferay.portal.kernel.exception.SystemException {
343                    return getPersistence().filterFindByGroupId(groupId, start, end);
344            }
345    
346            /**
347            * Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = &#63;.
348            *
349            * <p>
350            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
351            * </p>
352            *
353            * @param groupId the group ID
354            * @param start the lower bound of the range of shopping categories
355            * @param end the upper bound of the range of shopping categories (not inclusive)
356            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
357            * @return the ordered range of matching shopping categories that the user has permission to view
358            * @throws SystemException if a system exception occurred
359            */
360            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
361                    long groupId, int start, int end,
362                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
363                    throws com.liferay.portal.kernel.exception.SystemException {
364                    return getPersistence()
365                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
366            }
367    
368            /**
369            * Returns the shopping categories before and after the current shopping category in the ordered set of shopping categories that the user has permission to view where groupId = &#63;.
370            *
371            * @param categoryId the primary key of the current shopping category
372            * @param groupId the group ID
373            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
374            * @return the previous, current, and next shopping category
375            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
376            * @throws SystemException if a system exception occurred
377            */
378            public static com.liferay.portlet.shopping.model.ShoppingCategory[] filterFindByGroupId_PrevAndNext(
379                    long categoryId, long groupId,
380                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
381                    throws com.liferay.portal.kernel.exception.SystemException,
382                            com.liferay.portlet.shopping.NoSuchCategoryException {
383                    return getPersistence()
384                                       .filterFindByGroupId_PrevAndNext(categoryId, groupId,
385                            orderByComparator);
386            }
387    
388            /**
389            * Returns all the shopping categories where groupId = &#63; and parentCategoryId = &#63;.
390            *
391            * @param groupId the group ID
392            * @param parentCategoryId the parent category ID
393            * @return the matching shopping categories
394            * @throws SystemException if a system exception occurred
395            */
396            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
397                    long groupId, long parentCategoryId)
398                    throws com.liferay.portal.kernel.exception.SystemException {
399                    return getPersistence().findByG_P(groupId, parentCategoryId);
400            }
401    
402            /**
403            * Returns a range of all the shopping categories where groupId = &#63; and parentCategoryId = &#63;.
404            *
405            * <p>
406            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
407            * </p>
408            *
409            * @param groupId the group ID
410            * @param parentCategoryId the parent category ID
411            * @param start the lower bound of the range of shopping categories
412            * @param end the upper bound of the range of shopping categories (not inclusive)
413            * @return the range of matching shopping categories
414            * @throws SystemException if a system exception occurred
415            */
416            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
417                    long groupId, long parentCategoryId, int start, int end)
418                    throws com.liferay.portal.kernel.exception.SystemException {
419                    return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
420            }
421    
422            /**
423            * Returns an ordered range of all the shopping categories where groupId = &#63; and parentCategoryId = &#63;.
424            *
425            * <p>
426            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
427            * </p>
428            *
429            * @param groupId the group ID
430            * @param parentCategoryId the parent category ID
431            * @param start the lower bound of the range of shopping categories
432            * @param end the upper bound of the range of shopping categories (not inclusive)
433            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
434            * @return the ordered range of matching shopping categories
435            * @throws SystemException if a system exception occurred
436            */
437            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
438                    long groupId, long parentCategoryId, int start, int end,
439                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
440                    throws com.liferay.portal.kernel.exception.SystemException {
441                    return getPersistence()
442                                       .findByG_P(groupId, parentCategoryId, start, end,
443                            orderByComparator);
444            }
445    
446            /**
447            * Returns the first shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
448            *
449            * <p>
450            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
451            * </p>
452            *
453            * @param groupId the group ID
454            * @param parentCategoryId the parent category ID
455            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
456            * @return the first matching shopping category
457            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
458            * @throws SystemException if a system exception occurred
459            */
460            public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First(
461                    long groupId, long parentCategoryId,
462                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
463                    throws com.liferay.portal.kernel.exception.SystemException,
464                            com.liferay.portlet.shopping.NoSuchCategoryException {
465                    return getPersistence()
466                                       .findByG_P_First(groupId, parentCategoryId, orderByComparator);
467            }
468    
469            /**
470            * Returns the last shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
471            *
472            * <p>
473            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
474            * </p>
475            *
476            * @param groupId the group ID
477            * @param parentCategoryId the parent category ID
478            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
479            * @return the last matching shopping category
480            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
481            * @throws SystemException if a system exception occurred
482            */
483            public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_Last(
484                    long groupId, long parentCategoryId,
485                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
486                    throws com.liferay.portal.kernel.exception.SystemException,
487                            com.liferay.portlet.shopping.NoSuchCategoryException {
488                    return getPersistence()
489                                       .findByG_P_Last(groupId, parentCategoryId, orderByComparator);
490            }
491    
492            /**
493            * Returns the shopping categories before and after the current shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
494            *
495            * <p>
496            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
497            * </p>
498            *
499            * @param categoryId the primary key of the current shopping category
500            * @param groupId the group ID
501            * @param parentCategoryId the parent category ID
502            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
503            * @return the previous, current, and next shopping category
504            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
505            * @throws SystemException if a system exception occurred
506            */
507            public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext(
508                    long categoryId, long groupId, long parentCategoryId,
509                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
510                    throws com.liferay.portal.kernel.exception.SystemException,
511                            com.liferay.portlet.shopping.NoSuchCategoryException {
512                    return getPersistence()
513                                       .findByG_P_PrevAndNext(categoryId, groupId,
514                            parentCategoryId, orderByComparator);
515            }
516    
517            /**
518            * Returns all the shopping categories that the user has permission to view where groupId = &#63; and parentCategoryId = &#63;.
519            *
520            * @param groupId the group ID
521            * @param parentCategoryId the parent category ID
522            * @return the matching shopping categories that the user has permission to view
523            * @throws SystemException if a system exception occurred
524            */
525            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
526                    long groupId, long parentCategoryId)
527                    throws com.liferay.portal.kernel.exception.SystemException {
528                    return getPersistence().filterFindByG_P(groupId, parentCategoryId);
529            }
530    
531            /**
532            * Returns a range of all the shopping categories that the user has permission to view where groupId = &#63; and parentCategoryId = &#63;.
533            *
534            * <p>
535            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
536            * </p>
537            *
538            * @param groupId the group ID
539            * @param parentCategoryId the parent category ID
540            * @param start the lower bound of the range of shopping categories
541            * @param end the upper bound of the range of shopping categories (not inclusive)
542            * @return the range of matching shopping categories that the user has permission to view
543            * @throws SystemException if a system exception occurred
544            */
545            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
546                    long groupId, long parentCategoryId, int start, int end)
547                    throws com.liferay.portal.kernel.exception.SystemException {
548                    return getPersistence()
549                                       .filterFindByG_P(groupId, parentCategoryId, start, end);
550            }
551    
552            /**
553            * Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = &#63; and parentCategoryId = &#63;.
554            *
555            * <p>
556            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
557            * </p>
558            *
559            * @param groupId the group ID
560            * @param parentCategoryId the parent category ID
561            * @param start the lower bound of the range of shopping categories
562            * @param end the upper bound of the range of shopping categories (not inclusive)
563            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
564            * @return the ordered range of matching shopping categories that the user has permission to view
565            * @throws SystemException if a system exception occurred
566            */
567            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
568                    long groupId, long parentCategoryId, int start, int end,
569                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
570                    throws com.liferay.portal.kernel.exception.SystemException {
571                    return getPersistence()
572                                       .filterFindByG_P(groupId, parentCategoryId, start, end,
573                            orderByComparator);
574            }
575    
576            /**
577            * Returns the shopping categories before and after the current shopping category in the ordered set of shopping categories that the user has permission to view where groupId = &#63; and parentCategoryId = &#63;.
578            *
579            * @param categoryId the primary key of the current shopping category
580            * @param groupId the group ID
581            * @param parentCategoryId the parent category ID
582            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
583            * @return the previous, current, and next shopping category
584            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
585            * @throws SystemException if a system exception occurred
586            */
587            public static com.liferay.portlet.shopping.model.ShoppingCategory[] filterFindByG_P_PrevAndNext(
588                    long categoryId, long groupId, long parentCategoryId,
589                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
590                    throws com.liferay.portal.kernel.exception.SystemException,
591                            com.liferay.portlet.shopping.NoSuchCategoryException {
592                    return getPersistence()
593                                       .filterFindByG_P_PrevAndNext(categoryId, groupId,
594                            parentCategoryId, orderByComparator);
595            }
596    
597            /**
598            * Returns all the shopping categories.
599            *
600            * @return the shopping categories
601            * @throws SystemException if a system exception occurred
602            */
603            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
604                    throws com.liferay.portal.kernel.exception.SystemException {
605                    return getPersistence().findAll();
606            }
607    
608            /**
609            * Returns a range of all the shopping categories.
610            *
611            * <p>
612            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
613            * </p>
614            *
615            * @param start the lower bound of the range of shopping categories
616            * @param end the upper bound of the range of shopping categories (not inclusive)
617            * @return the range of shopping categories
618            * @throws SystemException if a system exception occurred
619            */
620            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
621                    int start, int end)
622                    throws com.liferay.portal.kernel.exception.SystemException {
623                    return getPersistence().findAll(start, end);
624            }
625    
626            /**
627            * Returns an ordered range of all the shopping categories.
628            *
629            * <p>
630            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
631            * </p>
632            *
633            * @param start the lower bound of the range of shopping categories
634            * @param end the upper bound of the range of shopping categories (not inclusive)
635            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
636            * @return the ordered range of shopping categories
637            * @throws SystemException if a system exception occurred
638            */
639            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
640                    int start, int end,
641                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
642                    throws com.liferay.portal.kernel.exception.SystemException {
643                    return getPersistence().findAll(start, end, orderByComparator);
644            }
645    
646            /**
647            * Removes all the shopping categories where groupId = &#63; from the database.
648            *
649            * @param groupId the group ID
650            * @throws SystemException if a system exception occurred
651            */
652            public static void removeByGroupId(long groupId)
653                    throws com.liferay.portal.kernel.exception.SystemException {
654                    getPersistence().removeByGroupId(groupId);
655            }
656    
657            /**
658            * Removes all the shopping categories where groupId = &#63; and parentCategoryId = &#63; from the database.
659            *
660            * @param groupId the group ID
661            * @param parentCategoryId the parent category ID
662            * @throws SystemException if a system exception occurred
663            */
664            public static void removeByG_P(long groupId, long parentCategoryId)
665                    throws com.liferay.portal.kernel.exception.SystemException {
666                    getPersistence().removeByG_P(groupId, parentCategoryId);
667            }
668    
669            /**
670            * Removes all the shopping categories from the database.
671            *
672            * @throws SystemException if a system exception occurred
673            */
674            public static void removeAll()
675                    throws com.liferay.portal.kernel.exception.SystemException {
676                    getPersistence().removeAll();
677            }
678    
679            /**
680            * Returns the number of shopping categories where groupId = &#63;.
681            *
682            * @param groupId the group ID
683            * @return the number of matching shopping categories
684            * @throws SystemException if a system exception occurred
685            */
686            public static int countByGroupId(long groupId)
687                    throws com.liferay.portal.kernel.exception.SystemException {
688                    return getPersistence().countByGroupId(groupId);
689            }
690    
691            /**
692            * Returns the number of shopping categories that the user has permission to view where groupId = &#63;.
693            *
694            * @param groupId the group ID
695            * @return the number of matching shopping categories that the user has permission to view
696            * @throws SystemException if a system exception occurred
697            */
698            public static int filterCountByGroupId(long groupId)
699                    throws com.liferay.portal.kernel.exception.SystemException {
700                    return getPersistence().filterCountByGroupId(groupId);
701            }
702    
703            /**
704            * Returns the number of shopping categories where groupId = &#63; and parentCategoryId = &#63;.
705            *
706            * @param groupId the group ID
707            * @param parentCategoryId the parent category ID
708            * @return the number of matching shopping categories
709            * @throws SystemException if a system exception occurred
710            */
711            public static int countByG_P(long groupId, long parentCategoryId)
712                    throws com.liferay.portal.kernel.exception.SystemException {
713                    return getPersistence().countByG_P(groupId, parentCategoryId);
714            }
715    
716            /**
717            * Returns the number of shopping categories that the user has permission to view where groupId = &#63; and parentCategoryId = &#63;.
718            *
719            * @param groupId the group ID
720            * @param parentCategoryId the parent category ID
721            * @return the number of matching shopping categories that the user has permission to view
722            * @throws SystemException if a system exception occurred
723            */
724            public static int filterCountByG_P(long groupId, long parentCategoryId)
725                    throws com.liferay.portal.kernel.exception.SystemException {
726                    return getPersistence().filterCountByG_P(groupId, parentCategoryId);
727            }
728    
729            /**
730            * Returns the number of shopping categories.
731            *
732            * @return the number of shopping categories
733            * @throws SystemException if a system exception occurred
734            */
735            public static int countAll()
736                    throws com.liferay.portal.kernel.exception.SystemException {
737                    return getPersistence().countAll();
738            }
739    
740            public static ShoppingCategoryPersistence getPersistence() {
741                    if (_persistence == null) {
742                            _persistence = (ShoppingCategoryPersistence)PortalBeanLocatorUtil.locate(ShoppingCategoryPersistence.class.getName());
743    
744                            ReferenceRegistry.registerReference(ShoppingCategoryUtil.class,
745                                    "_persistence");
746                    }
747    
748                    return _persistence;
749            }
750    
751            public void setPersistence(ShoppingCategoryPersistence persistence) {
752                    _persistence = persistence;
753    
754                    ReferenceRegistry.registerReference(ShoppingCategoryUtil.class,
755                            "_persistence");
756            }
757    
758            private static ShoppingCategoryPersistence _persistence;
759    }