001    /**
002     * Copyright (c) 2000-2013 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            * @param groupId the group ID
252            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
253            * @return the first matching shopping category
254            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
255            * @throws SystemException if a system exception occurred
256            */
257            public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First(
258                    long groupId,
259                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
260                    throws com.liferay.portal.kernel.exception.SystemException,
261                            com.liferay.portlet.shopping.NoSuchCategoryException {
262                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
263            }
264    
265            /**
266            * Returns the first shopping category in the ordered set where groupId = &#63;.
267            *
268            * @param groupId the group ID
269            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
270            * @return the first matching shopping category, or <code>null</code> if a matching shopping category could not be found
271            * @throws SystemException if a system exception occurred
272            */
273            public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByGroupId_First(
274                    long groupId,
275                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
276                    throws com.liferay.portal.kernel.exception.SystemException {
277                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
278            }
279    
280            /**
281            * Returns the last shopping category in the ordered set where groupId = &#63;.
282            *
283            * @param groupId the group ID
284            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
285            * @return the last matching shopping category
286            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
287            * @throws SystemException if a system exception occurred
288            */
289            public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last(
290                    long groupId,
291                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
292                    throws com.liferay.portal.kernel.exception.SystemException,
293                            com.liferay.portlet.shopping.NoSuchCategoryException {
294                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
295            }
296    
297            /**
298            * Returns the last shopping category in the ordered set where groupId = &#63;.
299            *
300            * @param groupId the group ID
301            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
302            * @return the last matching shopping category, or <code>null</code> if a matching shopping category could not be found
303            * @throws SystemException if a system exception occurred
304            */
305            public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByGroupId_Last(
306                    long groupId,
307                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
308                    throws com.liferay.portal.kernel.exception.SystemException {
309                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
310            }
311    
312            /**
313            * Returns the shopping categories before and after the current shopping category in the ordered set where groupId = &#63;.
314            *
315            * @param categoryId the primary key of the current shopping category
316            * @param groupId the group ID
317            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
318            * @return the previous, current, and next shopping category
319            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
320            * @throws SystemException if a system exception occurred
321            */
322            public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext(
323                    long categoryId, long groupId,
324                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
325                    throws com.liferay.portal.kernel.exception.SystemException,
326                            com.liferay.portlet.shopping.NoSuchCategoryException {
327                    return getPersistence()
328                                       .findByGroupId_PrevAndNext(categoryId, groupId,
329                            orderByComparator);
330            }
331    
332            /**
333            * Returns all the shopping categories that the user has permission to view where groupId = &#63;.
334            *
335            * @param groupId the group ID
336            * @return the matching shopping categories that the user has permission to view
337            * @throws SystemException if a system exception occurred
338            */
339            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
340                    long groupId)
341                    throws com.liferay.portal.kernel.exception.SystemException {
342                    return getPersistence().filterFindByGroupId(groupId);
343            }
344    
345            /**
346            * Returns a range of all the shopping categories that the user has permission to view where groupId = &#63;.
347            *
348            * <p>
349            * 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.
350            * </p>
351            *
352            * @param groupId the group ID
353            * @param start the lower bound of the range of shopping categories
354            * @param end the upper bound of the range of shopping categories (not inclusive)
355            * @return the range of matching shopping categories that the user has permission to view
356            * @throws SystemException if a system exception occurred
357            */
358            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
359                    long groupId, int start, int end)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence().filterFindByGroupId(groupId, start, end);
362            }
363    
364            /**
365            * Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = &#63;.
366            *
367            * <p>
368            * 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.
369            * </p>
370            *
371            * @param groupId the group ID
372            * @param start the lower bound of the range of shopping categories
373            * @param end the upper bound of the range of shopping categories (not inclusive)
374            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
375            * @return the ordered range of matching shopping categories that the user has permission to view
376            * @throws SystemException if a system exception occurred
377            */
378            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
379                    long groupId, int start, int end,
380                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
381                    throws com.liferay.portal.kernel.exception.SystemException {
382                    return getPersistence()
383                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
384            }
385    
386            /**
387            * 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;.
388            *
389            * @param categoryId the primary key of the current shopping category
390            * @param groupId the group ID
391            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
392            * @return the previous, current, and next shopping category
393            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
394            * @throws SystemException if a system exception occurred
395            */
396            public static com.liferay.portlet.shopping.model.ShoppingCategory[] filterFindByGroupId_PrevAndNext(
397                    long categoryId, long groupId,
398                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
399                    throws com.liferay.portal.kernel.exception.SystemException,
400                            com.liferay.portlet.shopping.NoSuchCategoryException {
401                    return getPersistence()
402                                       .filterFindByGroupId_PrevAndNext(categoryId, groupId,
403                            orderByComparator);
404            }
405    
406            /**
407            * Returns all the shopping categories where groupId = &#63; and parentCategoryId = &#63;.
408            *
409            * @param groupId the group ID
410            * @param parentCategoryId the parent category ID
411            * @return the matching shopping categories
412            * @throws SystemException if a system exception occurred
413            */
414            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
415                    long groupId, long parentCategoryId)
416                    throws com.liferay.portal.kernel.exception.SystemException {
417                    return getPersistence().findByG_P(groupId, parentCategoryId);
418            }
419    
420            /**
421            * Returns a range of all the shopping categories where groupId = &#63; and parentCategoryId = &#63;.
422            *
423            * <p>
424            * 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.
425            * </p>
426            *
427            * @param groupId the group ID
428            * @param parentCategoryId the parent category ID
429            * @param start the lower bound of the range of shopping categories
430            * @param end the upper bound of the range of shopping categories (not inclusive)
431            * @return the range of matching shopping categories
432            * @throws SystemException if a system exception occurred
433            */
434            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
435                    long groupId, long parentCategoryId, int start, int end)
436                    throws com.liferay.portal.kernel.exception.SystemException {
437                    return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
438            }
439    
440            /**
441            * Returns an ordered range of all the shopping categories where groupId = &#63; and parentCategoryId = &#63;.
442            *
443            * <p>
444            * 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.
445            * </p>
446            *
447            * @param groupId the group ID
448            * @param parentCategoryId the parent category ID
449            * @param start the lower bound of the range of shopping categories
450            * @param end the upper bound of the range of shopping categories (not inclusive)
451            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
452            * @return the ordered range of matching shopping categories
453            * @throws SystemException if a system exception occurred
454            */
455            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
456                    long groupId, long parentCategoryId, int start, int end,
457                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
458                    throws com.liferay.portal.kernel.exception.SystemException {
459                    return getPersistence()
460                                       .findByG_P(groupId, parentCategoryId, start, end,
461                            orderByComparator);
462            }
463    
464            /**
465            * Returns the first shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
466            *
467            * @param groupId the group ID
468            * @param parentCategoryId the parent category ID
469            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
470            * @return the first matching shopping category
471            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
472            * @throws SystemException if a system exception occurred
473            */
474            public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First(
475                    long groupId, long parentCategoryId,
476                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
477                    throws com.liferay.portal.kernel.exception.SystemException,
478                            com.liferay.portlet.shopping.NoSuchCategoryException {
479                    return getPersistence()
480                                       .findByG_P_First(groupId, parentCategoryId, orderByComparator);
481            }
482    
483            /**
484            * Returns the first shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
485            *
486            * @param groupId the group ID
487            * @param parentCategoryId the parent category ID
488            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
489            * @return the first matching shopping category, or <code>null</code> if a matching shopping category could not be found
490            * @throws SystemException if a system exception occurred
491            */
492            public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByG_P_First(
493                    long groupId, long parentCategoryId,
494                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
495                    throws com.liferay.portal.kernel.exception.SystemException {
496                    return getPersistence()
497                                       .fetchByG_P_First(groupId, parentCategoryId,
498                            orderByComparator);
499            }
500    
501            /**
502            * Returns the last shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
503            *
504            * @param groupId the group ID
505            * @param parentCategoryId the parent category ID
506            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
507            * @return the last matching shopping category
508            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
509            * @throws SystemException if a system exception occurred
510            */
511            public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_Last(
512                    long groupId, long parentCategoryId,
513                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
514                    throws com.liferay.portal.kernel.exception.SystemException,
515                            com.liferay.portlet.shopping.NoSuchCategoryException {
516                    return getPersistence()
517                                       .findByG_P_Last(groupId, parentCategoryId, orderByComparator);
518            }
519    
520            /**
521            * Returns the last shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
522            *
523            * @param groupId the group ID
524            * @param parentCategoryId the parent category ID
525            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
526            * @return the last matching shopping category, or <code>null</code> if a matching shopping category could not be found
527            * @throws SystemException if a system exception occurred
528            */
529            public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByG_P_Last(
530                    long groupId, long parentCategoryId,
531                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
532                    throws com.liferay.portal.kernel.exception.SystemException {
533                    return getPersistence()
534                                       .fetchByG_P_Last(groupId, parentCategoryId, orderByComparator);
535            }
536    
537            /**
538            * Returns the shopping categories before and after the current shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
539            *
540            * @param categoryId the primary key of the current shopping category
541            * @param groupId the group ID
542            * @param parentCategoryId the parent category ID
543            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
544            * @return the previous, current, and next shopping category
545            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
546            * @throws SystemException if a system exception occurred
547            */
548            public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext(
549                    long categoryId, long groupId, long parentCategoryId,
550                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
551                    throws com.liferay.portal.kernel.exception.SystemException,
552                            com.liferay.portlet.shopping.NoSuchCategoryException {
553                    return getPersistence()
554                                       .findByG_P_PrevAndNext(categoryId, groupId,
555                            parentCategoryId, orderByComparator);
556            }
557    
558            /**
559            * Returns all the shopping categories that the user has permission to view where groupId = &#63; and parentCategoryId = &#63;.
560            *
561            * @param groupId the group ID
562            * @param parentCategoryId the parent category ID
563            * @return the matching shopping categories that the user has permission to view
564            * @throws SystemException if a system exception occurred
565            */
566            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
567                    long groupId, long parentCategoryId)
568                    throws com.liferay.portal.kernel.exception.SystemException {
569                    return getPersistence().filterFindByG_P(groupId, parentCategoryId);
570            }
571    
572            /**
573            * Returns a range of all the shopping categories that the user has permission to view where groupId = &#63; and parentCategoryId = &#63;.
574            *
575            * <p>
576            * 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.
577            * </p>
578            *
579            * @param groupId the group ID
580            * @param parentCategoryId the parent category ID
581            * @param start the lower bound of the range of shopping categories
582            * @param end the upper bound of the range of shopping categories (not inclusive)
583            * @return the range of matching shopping categories that the user has permission to view
584            * @throws SystemException if a system exception occurred
585            */
586            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
587                    long groupId, long parentCategoryId, int start, int end)
588                    throws com.liferay.portal.kernel.exception.SystemException {
589                    return getPersistence()
590                                       .filterFindByG_P(groupId, parentCategoryId, start, end);
591            }
592    
593            /**
594            * Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = &#63; and parentCategoryId = &#63;.
595            *
596            * <p>
597            * 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.
598            * </p>
599            *
600            * @param groupId the group ID
601            * @param parentCategoryId the parent category ID
602            * @param start the lower bound of the range of shopping categories
603            * @param end the upper bound of the range of shopping categories (not inclusive)
604            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
605            * @return the ordered range of matching shopping categories that the user has permission to view
606            * @throws SystemException if a system exception occurred
607            */
608            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
609                    long groupId, long parentCategoryId, int start, int end,
610                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
611                    throws com.liferay.portal.kernel.exception.SystemException {
612                    return getPersistence()
613                                       .filterFindByG_P(groupId, parentCategoryId, start, end,
614                            orderByComparator);
615            }
616    
617            /**
618            * 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;.
619            *
620            * @param categoryId the primary key of the current shopping category
621            * @param groupId the group ID
622            * @param parentCategoryId the parent category ID
623            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
624            * @return the previous, current, and next shopping category
625            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
626            * @throws SystemException if a system exception occurred
627            */
628            public static com.liferay.portlet.shopping.model.ShoppingCategory[] filterFindByG_P_PrevAndNext(
629                    long categoryId, long groupId, long parentCategoryId,
630                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
631                    throws com.liferay.portal.kernel.exception.SystemException,
632                            com.liferay.portlet.shopping.NoSuchCategoryException {
633                    return getPersistence()
634                                       .filterFindByG_P_PrevAndNext(categoryId, groupId,
635                            parentCategoryId, orderByComparator);
636            }
637    
638            /**
639            * Returns all the shopping categories.
640            *
641            * @return the shopping categories
642            * @throws SystemException if a system exception occurred
643            */
644            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
645                    throws com.liferay.portal.kernel.exception.SystemException {
646                    return getPersistence().findAll();
647            }
648    
649            /**
650            * Returns a range of all the shopping categories.
651            *
652            * <p>
653            * 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.
654            * </p>
655            *
656            * @param start the lower bound of the range of shopping categories
657            * @param end the upper bound of the range of shopping categories (not inclusive)
658            * @return the range of shopping categories
659            * @throws SystemException if a system exception occurred
660            */
661            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
662                    int start, int end)
663                    throws com.liferay.portal.kernel.exception.SystemException {
664                    return getPersistence().findAll(start, end);
665            }
666    
667            /**
668            * Returns an ordered range of all the shopping categories.
669            *
670            * <p>
671            * 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.
672            * </p>
673            *
674            * @param start the lower bound of the range of shopping categories
675            * @param end the upper bound of the range of shopping categories (not inclusive)
676            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
677            * @return the ordered range of shopping categories
678            * @throws SystemException if a system exception occurred
679            */
680            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
681                    int start, int end,
682                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
683                    throws com.liferay.portal.kernel.exception.SystemException {
684                    return getPersistence().findAll(start, end, orderByComparator);
685            }
686    
687            /**
688            * Removes all the shopping categories where groupId = &#63; from the database.
689            *
690            * @param groupId the group ID
691            * @throws SystemException if a system exception occurred
692            */
693            public static void removeByGroupId(long groupId)
694                    throws com.liferay.portal.kernel.exception.SystemException {
695                    getPersistence().removeByGroupId(groupId);
696            }
697    
698            /**
699            * Removes all the shopping categories where groupId = &#63; and parentCategoryId = &#63; from the database.
700            *
701            * @param groupId the group ID
702            * @param parentCategoryId the parent category ID
703            * @throws SystemException if a system exception occurred
704            */
705            public static void removeByG_P(long groupId, long parentCategoryId)
706                    throws com.liferay.portal.kernel.exception.SystemException {
707                    getPersistence().removeByG_P(groupId, parentCategoryId);
708            }
709    
710            /**
711            * Removes all the shopping categories from the database.
712            *
713            * @throws SystemException if a system exception occurred
714            */
715            public static void removeAll()
716                    throws com.liferay.portal.kernel.exception.SystemException {
717                    getPersistence().removeAll();
718            }
719    
720            /**
721            * Returns the number of shopping categories where groupId = &#63;.
722            *
723            * @param groupId the group ID
724            * @return the number of matching shopping categories
725            * @throws SystemException if a system exception occurred
726            */
727            public static int countByGroupId(long groupId)
728                    throws com.liferay.portal.kernel.exception.SystemException {
729                    return getPersistence().countByGroupId(groupId);
730            }
731    
732            /**
733            * Returns the number of shopping categories that the user has permission to view where groupId = &#63;.
734            *
735            * @param groupId the group ID
736            * @return the number of matching shopping categories that the user has permission to view
737            * @throws SystemException if a system exception occurred
738            */
739            public static int filterCountByGroupId(long groupId)
740                    throws com.liferay.portal.kernel.exception.SystemException {
741                    return getPersistence().filterCountByGroupId(groupId);
742            }
743    
744            /**
745            * Returns the number of shopping categories where groupId = &#63; and parentCategoryId = &#63;.
746            *
747            * @param groupId the group ID
748            * @param parentCategoryId the parent category ID
749            * @return the number of matching shopping categories
750            * @throws SystemException if a system exception occurred
751            */
752            public static int countByG_P(long groupId, long parentCategoryId)
753                    throws com.liferay.portal.kernel.exception.SystemException {
754                    return getPersistence().countByG_P(groupId, parentCategoryId);
755            }
756    
757            /**
758            * Returns the number of shopping categories that the user has permission to view where groupId = &#63; and parentCategoryId = &#63;.
759            *
760            * @param groupId the group ID
761            * @param parentCategoryId the parent category ID
762            * @return the number of matching shopping categories that the user has permission to view
763            * @throws SystemException if a system exception occurred
764            */
765            public static int filterCountByG_P(long groupId, long parentCategoryId)
766                    throws com.liferay.portal.kernel.exception.SystemException {
767                    return getPersistence().filterCountByG_P(groupId, parentCategoryId);
768            }
769    
770            /**
771            * Returns the number of shopping categories.
772            *
773            * @return the number of shopping categories
774            * @throws SystemException if a system exception occurred
775            */
776            public static int countAll()
777                    throws com.liferay.portal.kernel.exception.SystemException {
778                    return getPersistence().countAll();
779            }
780    
781            public static ShoppingCategoryPersistence getPersistence() {
782                    if (_persistence == null) {
783                            _persistence = (ShoppingCategoryPersistence)PortalBeanLocatorUtil.locate(ShoppingCategoryPersistence.class.getName());
784    
785                            ReferenceRegistry.registerReference(ShoppingCategoryUtil.class,
786                                    "_persistence");
787                    }
788    
789                    return _persistence;
790            }
791    
792            /**
793             * @deprecated
794             */
795            public void setPersistence(ShoppingCategoryPersistence persistence) {
796            }
797    
798            private static ShoppingCategoryPersistence _persistence;
799    }