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