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