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