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