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