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