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            * Returns the shopping category where groupId = &#63; and name = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchCategoryException} if it could not be found.
635            *
636            * @param groupId the group ID
637            * @param name the name
638            * @return the matching shopping category
639            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
640            * @throws SystemException if a system exception occurred
641            */
642            public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_N(
643                    long groupId, java.lang.String name)
644                    throws com.liferay.portal.kernel.exception.SystemException,
645                            com.liferay.portlet.shopping.NoSuchCategoryException {
646                    return getPersistence().findByG_N(groupId, name);
647            }
648    
649            /**
650            * Returns the shopping category where groupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
651            *
652            * @param groupId the group ID
653            * @param name the name
654            * @return the matching shopping category, or <code>null</code> if a matching shopping category could not be found
655            * @throws SystemException if a system exception occurred
656            */
657            public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByG_N(
658                    long groupId, java.lang.String name)
659                    throws com.liferay.portal.kernel.exception.SystemException {
660                    return getPersistence().fetchByG_N(groupId, name);
661            }
662    
663            /**
664            * Returns the shopping category where groupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
665            *
666            * @param groupId the group ID
667            * @param name the name
668            * @param retrieveFromCache whether to use the finder cache
669            * @return the matching shopping category, or <code>null</code> if a matching shopping category could not be found
670            * @throws SystemException if a system exception occurred
671            */
672            public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByG_N(
673                    long groupId, java.lang.String name, boolean retrieveFromCache)
674                    throws com.liferay.portal.kernel.exception.SystemException {
675                    return getPersistence().fetchByG_N(groupId, name, retrieveFromCache);
676            }
677    
678            /**
679            * Removes the shopping category where groupId = &#63; and name = &#63; from the database.
680            *
681            * @param groupId the group ID
682            * @param name the name
683            * @return the shopping category that was removed
684            * @throws SystemException if a system exception occurred
685            */
686            public static com.liferay.portlet.shopping.model.ShoppingCategory removeByG_N(
687                    long groupId, java.lang.String name)
688                    throws com.liferay.portal.kernel.exception.SystemException,
689                            com.liferay.portlet.shopping.NoSuchCategoryException {
690                    return getPersistence().removeByG_N(groupId, name);
691            }
692    
693            /**
694            * Returns the number of shopping categories where groupId = &#63; and name = &#63;.
695            *
696            * @param groupId the group ID
697            * @param name the name
698            * @return the number of matching shopping categories
699            * @throws SystemException if a system exception occurred
700            */
701            public static int countByG_N(long groupId, java.lang.String name)
702                    throws com.liferay.portal.kernel.exception.SystemException {
703                    return getPersistence().countByG_N(groupId, name);
704            }
705    
706            /**
707            * Caches the shopping category in the entity cache if it is enabled.
708            *
709            * @param shoppingCategory the shopping category
710            */
711            public static void cacheResult(
712                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory) {
713                    getPersistence().cacheResult(shoppingCategory);
714            }
715    
716            /**
717            * Caches the shopping categories in the entity cache if it is enabled.
718            *
719            * @param shoppingCategories the shopping categories
720            */
721            public static void cacheResult(
722                    java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> shoppingCategories) {
723                    getPersistence().cacheResult(shoppingCategories);
724            }
725    
726            /**
727            * Creates a new shopping category with the primary key. Does not add the shopping category to the database.
728            *
729            * @param categoryId the primary key for the new shopping category
730            * @return the new shopping category
731            */
732            public static com.liferay.portlet.shopping.model.ShoppingCategory create(
733                    long categoryId) {
734                    return getPersistence().create(categoryId);
735            }
736    
737            /**
738            * Removes the shopping category with the primary key from the database. Also notifies the appropriate model listeners.
739            *
740            * @param categoryId the primary key of the shopping category
741            * @return the shopping category that was removed
742            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
743            * @throws SystemException if a system exception occurred
744            */
745            public static com.liferay.portlet.shopping.model.ShoppingCategory remove(
746                    long categoryId)
747                    throws com.liferay.portal.kernel.exception.SystemException,
748                            com.liferay.portlet.shopping.NoSuchCategoryException {
749                    return getPersistence().remove(categoryId);
750            }
751    
752            public static com.liferay.portlet.shopping.model.ShoppingCategory updateImpl(
753                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
754                    throws com.liferay.portal.kernel.exception.SystemException {
755                    return getPersistence().updateImpl(shoppingCategory);
756            }
757    
758            /**
759            * Returns the shopping category with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchCategoryException} if it could not be found.
760            *
761            * @param categoryId the primary key of the shopping category
762            * @return the shopping category
763            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
764            * @throws SystemException if a system exception occurred
765            */
766            public static com.liferay.portlet.shopping.model.ShoppingCategory findByPrimaryKey(
767                    long categoryId)
768                    throws com.liferay.portal.kernel.exception.SystemException,
769                            com.liferay.portlet.shopping.NoSuchCategoryException {
770                    return getPersistence().findByPrimaryKey(categoryId);
771            }
772    
773            /**
774            * Returns the shopping category with the primary key or returns <code>null</code> if it could not be found.
775            *
776            * @param categoryId the primary key of the shopping category
777            * @return the shopping category, or <code>null</code> if a shopping category with the primary key could not be found
778            * @throws SystemException if a system exception occurred
779            */
780            public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByPrimaryKey(
781                    long categoryId)
782                    throws com.liferay.portal.kernel.exception.SystemException {
783                    return getPersistence().fetchByPrimaryKey(categoryId);
784            }
785    
786            /**
787            * Returns all the shopping categories.
788            *
789            * @return the shopping categories
790            * @throws SystemException if a system exception occurred
791            */
792            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
793                    throws com.liferay.portal.kernel.exception.SystemException {
794                    return getPersistence().findAll();
795            }
796    
797            /**
798            * Returns a range of all the shopping categories.
799            *
800            * <p>
801            * 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.
802            * </p>
803            *
804            * @param start the lower bound of the range of shopping categories
805            * @param end the upper bound of the range of shopping categories (not inclusive)
806            * @return the range of shopping categories
807            * @throws SystemException if a system exception occurred
808            */
809            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
810                    int start, int end)
811                    throws com.liferay.portal.kernel.exception.SystemException {
812                    return getPersistence().findAll(start, end);
813            }
814    
815            /**
816            * Returns an ordered range of all the shopping categories.
817            *
818            * <p>
819            * 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.
820            * </p>
821            *
822            * @param start the lower bound of the range of shopping categories
823            * @param end the upper bound of the range of shopping categories (not inclusive)
824            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
825            * @return the ordered range of shopping categories
826            * @throws SystemException if a system exception occurred
827            */
828            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
829                    int start, int end,
830                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
831                    throws com.liferay.portal.kernel.exception.SystemException {
832                    return getPersistence().findAll(start, end, orderByComparator);
833            }
834    
835            /**
836            * Removes all the shopping categories from the database.
837            *
838            * @throws SystemException if a system exception occurred
839            */
840            public static void removeAll()
841                    throws com.liferay.portal.kernel.exception.SystemException {
842                    getPersistence().removeAll();
843            }
844    
845            /**
846            * Returns the number of shopping categories.
847            *
848            * @return the number of shopping categories
849            * @throws SystemException if a system exception occurred
850            */
851            public static int countAll()
852                    throws com.liferay.portal.kernel.exception.SystemException {
853                    return getPersistence().countAll();
854            }
855    
856            public static ShoppingCategoryPersistence getPersistence() {
857                    if (_persistence == null) {
858                            _persistence = (ShoppingCategoryPersistence)PortalBeanLocatorUtil.locate(ShoppingCategoryPersistence.class.getName());
859    
860                            ReferenceRegistry.registerReference(ShoppingCategoryUtil.class,
861                                    "_persistence");
862                    }
863    
864                    return _persistence;
865            }
866    
867            /**
868             * @deprecated As of 6.2.0
869             */
870            public void setPersistence(ShoppingCategoryPersistence persistence) {
871            }
872    
873            private static ShoppingCategoryPersistence _persistence;
874    }