001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.service.persistence.BasePersistence;
020    
021    import com.liferay.portlet.shopping.model.ShoppingCategory;
022    
023    /**
024     * The persistence interface for the shopping category service.
025     *
026     * <p>
027     * Caching information and settings can be found in <code>portal.properties</code>
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see ShoppingCategoryPersistenceImpl
032     * @see ShoppingCategoryUtil
033     * @generated
034     */
035    @ProviderType
036    public interface ShoppingCategoryPersistence extends BasePersistence<ShoppingCategory> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify or reference this interface directly. Always use {@link ShoppingCategoryUtil} to access the shopping category persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
041             */
042    
043            /**
044            * Returns all the shopping categories where groupId = &#63;.
045            *
046            * @param groupId the group ID
047            * @return the matching shopping categories
048            * @throws SystemException if a system exception occurred
049            */
050            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
051                    long groupId)
052                    throws com.liferay.portal.kernel.exception.SystemException;
053    
054            /**
055            * Returns a range of all the shopping categories where groupId = &#63;.
056            *
057            * <p>
058            * 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.
059            * </p>
060            *
061            * @param groupId the group ID
062            * @param start the lower bound of the range of shopping categories
063            * @param end the upper bound of the range of shopping categories (not inclusive)
064            * @return the range of matching shopping categories
065            * @throws SystemException if a system exception occurred
066            */
067            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
068                    long groupId, int start, int end)
069                    throws com.liferay.portal.kernel.exception.SystemException;
070    
071            /**
072            * Returns an ordered range of all the shopping categories where groupId = &#63;.
073            *
074            * <p>
075            * 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.
076            * </p>
077            *
078            * @param groupId the group ID
079            * @param start the lower bound of the range of shopping categories
080            * @param end the upper bound of the range of shopping categories (not inclusive)
081            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
082            * @return the ordered range of matching shopping categories
083            * @throws SystemException if a system exception occurred
084            */
085            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
086                    long groupId, int start, int end,
087                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
088                    throws com.liferay.portal.kernel.exception.SystemException;
089    
090            /**
091            * Returns the first shopping category in the ordered set where groupId = &#63;.
092            *
093            * @param groupId the group ID
094            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
095            * @return the first matching shopping category
096            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
097            * @throws SystemException if a system exception occurred
098            */
099            public com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First(
100                    long groupId,
101                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
102                    throws com.liferay.portal.kernel.exception.SystemException,
103                            com.liferay.portlet.shopping.NoSuchCategoryException;
104    
105            /**
106            * Returns the first shopping category in the ordered set where groupId = &#63;.
107            *
108            * @param groupId the group ID
109            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
110            * @return the first matching shopping category, or <code>null</code> if a matching shopping category could not be found
111            * @throws SystemException if a system exception occurred
112            */
113            public com.liferay.portlet.shopping.model.ShoppingCategory fetchByGroupId_First(
114                    long groupId,
115                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
116                    throws com.liferay.portal.kernel.exception.SystemException;
117    
118            /**
119            * Returns the last shopping category in the ordered set where groupId = &#63;.
120            *
121            * @param groupId the group ID
122            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
123            * @return the last matching shopping category
124            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
125            * @throws SystemException if a system exception occurred
126            */
127            public com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last(
128                    long groupId,
129                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
130                    throws com.liferay.portal.kernel.exception.SystemException,
131                            com.liferay.portlet.shopping.NoSuchCategoryException;
132    
133            /**
134            * Returns the last shopping category in the ordered set where groupId = &#63;.
135            *
136            * @param groupId the group ID
137            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
138            * @return the last matching shopping category, or <code>null</code> if a matching shopping category could not be found
139            * @throws SystemException if a system exception occurred
140            */
141            public com.liferay.portlet.shopping.model.ShoppingCategory fetchByGroupId_Last(
142                    long groupId,
143                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
144                    throws com.liferay.portal.kernel.exception.SystemException;
145    
146            /**
147            * Returns the shopping categories before and after the current shopping category in the ordered set where groupId = &#63;.
148            *
149            * @param categoryId the primary key of the current shopping category
150            * @param groupId the group ID
151            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
152            * @return the previous, current, and next shopping category
153            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
154            * @throws SystemException if a system exception occurred
155            */
156            public com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext(
157                    long categoryId, long groupId,
158                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159                    throws com.liferay.portal.kernel.exception.SystemException,
160                            com.liferay.portlet.shopping.NoSuchCategoryException;
161    
162            /**
163            * Returns all the shopping categories that the user has permission to view where groupId = &#63;.
164            *
165            * @param groupId the group ID
166            * @return the matching shopping categories that the user has permission to view
167            * @throws SystemException if a system exception occurred
168            */
169            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
170                    long groupId)
171                    throws com.liferay.portal.kernel.exception.SystemException;
172    
173            /**
174            * Returns a range of all the shopping categories that the user has permission to view where groupId = &#63;.
175            *
176            * <p>
177            * 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.
178            * </p>
179            *
180            * @param groupId the group ID
181            * @param start the lower bound of the range of shopping categories
182            * @param end the upper bound of the range of shopping categories (not inclusive)
183            * @return the range of matching shopping categories that the user has permission to view
184            * @throws SystemException if a system exception occurred
185            */
186            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
187                    long groupId, int start, int end)
188                    throws com.liferay.portal.kernel.exception.SystemException;
189    
190            /**
191            * Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = &#63;.
192            *
193            * <p>
194            * 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.
195            * </p>
196            *
197            * @param groupId the group ID
198            * @param start the lower bound of the range of shopping categories
199            * @param end the upper bound of the range of shopping categories (not inclusive)
200            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
201            * @return the ordered range of matching shopping categories that the user has permission to view
202            * @throws SystemException if a system exception occurred
203            */
204            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
205                    long groupId, int start, int end,
206                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207                    throws com.liferay.portal.kernel.exception.SystemException;
208    
209            /**
210            * 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;.
211            *
212            * @param categoryId the primary key of the current shopping category
213            * @param groupId the group ID
214            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
215            * @return the previous, current, and next shopping category
216            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
217            * @throws SystemException if a system exception occurred
218            */
219            public com.liferay.portlet.shopping.model.ShoppingCategory[] filterFindByGroupId_PrevAndNext(
220                    long categoryId, long groupId,
221                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222                    throws com.liferay.portal.kernel.exception.SystemException,
223                            com.liferay.portlet.shopping.NoSuchCategoryException;
224    
225            /**
226            * Removes all the shopping categories where groupId = &#63; from the database.
227            *
228            * @param groupId the group ID
229            * @throws SystemException if a system exception occurred
230            */
231            public void removeByGroupId(long groupId)
232                    throws com.liferay.portal.kernel.exception.SystemException;
233    
234            /**
235            * Returns the number of shopping categories where groupId = &#63;.
236            *
237            * @param groupId the group ID
238            * @return the number of matching shopping categories
239            * @throws SystemException if a system exception occurred
240            */
241            public int countByGroupId(long groupId)
242                    throws com.liferay.portal.kernel.exception.SystemException;
243    
244            /**
245            * Returns the number of shopping categories that the user has permission to view where groupId = &#63;.
246            *
247            * @param groupId the group ID
248            * @return the number of matching shopping categories that the user has permission to view
249            * @throws SystemException if a system exception occurred
250            */
251            public int filterCountByGroupId(long groupId)
252                    throws com.liferay.portal.kernel.exception.SystemException;
253    
254            /**
255            * Returns all the shopping categories where groupId = &#63; and parentCategoryId = &#63;.
256            *
257            * @param groupId the group ID
258            * @param parentCategoryId the parent category ID
259            * @return the matching shopping categories
260            * @throws SystemException if a system exception occurred
261            */
262            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
263                    long groupId, long parentCategoryId)
264                    throws com.liferay.portal.kernel.exception.SystemException;
265    
266            /**
267            * Returns a range of all the shopping categories where groupId = &#63; and parentCategoryId = &#63;.
268            *
269            * <p>
270            * 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.
271            * </p>
272            *
273            * @param groupId the group ID
274            * @param parentCategoryId the parent category ID
275            * @param start the lower bound of the range of shopping categories
276            * @param end the upper bound of the range of shopping categories (not inclusive)
277            * @return the range of matching shopping categories
278            * @throws SystemException if a system exception occurred
279            */
280            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
281                    long groupId, long parentCategoryId, int start, int end)
282                    throws com.liferay.portal.kernel.exception.SystemException;
283    
284            /**
285            * Returns an ordered range of all the shopping categories where groupId = &#63; and parentCategoryId = &#63;.
286            *
287            * <p>
288            * 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.
289            * </p>
290            *
291            * @param groupId the group ID
292            * @param parentCategoryId the parent category ID
293            * @param start the lower bound of the range of shopping categories
294            * @param end the upper bound of the range of shopping categories (not inclusive)
295            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
296            * @return the ordered range of matching shopping categories
297            * @throws SystemException if a system exception occurred
298            */
299            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
300                    long groupId, long parentCategoryId, int start, int end,
301                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
302                    throws com.liferay.portal.kernel.exception.SystemException;
303    
304            /**
305            * Returns the first shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
306            *
307            * @param groupId the group ID
308            * @param parentCategoryId the parent category ID
309            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
310            * @return the first matching shopping category
311            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
312            * @throws SystemException if a system exception occurred
313            */
314            public com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First(
315                    long groupId, long parentCategoryId,
316                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
317                    throws com.liferay.portal.kernel.exception.SystemException,
318                            com.liferay.portlet.shopping.NoSuchCategoryException;
319    
320            /**
321            * Returns the first shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
322            *
323            * @param groupId the group ID
324            * @param parentCategoryId the parent category ID
325            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
326            * @return the first matching shopping category, or <code>null</code> if a matching shopping category could not be found
327            * @throws SystemException if a system exception occurred
328            */
329            public com.liferay.portlet.shopping.model.ShoppingCategory fetchByG_P_First(
330                    long groupId, long parentCategoryId,
331                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
332                    throws com.liferay.portal.kernel.exception.SystemException;
333    
334            /**
335            * Returns the last shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
336            *
337            * @param groupId the group ID
338            * @param parentCategoryId the parent category ID
339            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
340            * @return the last matching shopping category
341            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
342            * @throws SystemException if a system exception occurred
343            */
344            public com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_Last(
345                    long groupId, long parentCategoryId,
346                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
347                    throws com.liferay.portal.kernel.exception.SystemException,
348                            com.liferay.portlet.shopping.NoSuchCategoryException;
349    
350            /**
351            * Returns the last shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
352            *
353            * @param groupId the group ID
354            * @param parentCategoryId the parent category ID
355            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
356            * @return the last matching shopping category, or <code>null</code> if a matching shopping category could not be found
357            * @throws SystemException if a system exception occurred
358            */
359            public com.liferay.portlet.shopping.model.ShoppingCategory fetchByG_P_Last(
360                    long groupId, long parentCategoryId,
361                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
362                    throws com.liferay.portal.kernel.exception.SystemException;
363    
364            /**
365            * Returns the shopping categories before and after the current shopping category in the ordered set where groupId = &#63; and parentCategoryId = &#63;.
366            *
367            * @param categoryId the primary key of the current shopping category
368            * @param groupId the group ID
369            * @param parentCategoryId the parent category ID
370            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
371            * @return the previous, current, and next shopping category
372            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
373            * @throws SystemException if a system exception occurred
374            */
375            public com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext(
376                    long categoryId, long groupId, long parentCategoryId,
377                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
378                    throws com.liferay.portal.kernel.exception.SystemException,
379                            com.liferay.portlet.shopping.NoSuchCategoryException;
380    
381            /**
382            * Returns all the shopping categories that the user has permission to view where groupId = &#63; and parentCategoryId = &#63;.
383            *
384            * @param groupId the group ID
385            * @param parentCategoryId the parent category ID
386            * @return the matching shopping categories that the user has permission to view
387            * @throws SystemException if a system exception occurred
388            */
389            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
390                    long groupId, long parentCategoryId)
391                    throws com.liferay.portal.kernel.exception.SystemException;
392    
393            /**
394            * Returns a range of all the shopping categories that the user has permission to view where groupId = &#63; and parentCategoryId = &#63;.
395            *
396            * <p>
397            * 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.
398            * </p>
399            *
400            * @param groupId the group ID
401            * @param parentCategoryId the parent category ID
402            * @param start the lower bound of the range of shopping categories
403            * @param end the upper bound of the range of shopping categories (not inclusive)
404            * @return the range of matching shopping categories that the user has permission to view
405            * @throws SystemException if a system exception occurred
406            */
407            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
408                    long groupId, long parentCategoryId, int start, int end)
409                    throws com.liferay.portal.kernel.exception.SystemException;
410    
411            /**
412            * Returns an ordered range of all the shopping categories that the user has permissions to view where groupId = &#63; and parentCategoryId = &#63;.
413            *
414            * <p>
415            * 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.
416            * </p>
417            *
418            * @param groupId the group ID
419            * @param parentCategoryId the parent category ID
420            * @param start the lower bound of the range of shopping categories
421            * @param end the upper bound of the range of shopping categories (not inclusive)
422            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
423            * @return the ordered range of matching shopping categories that the user has permission to view
424            * @throws SystemException if a system exception occurred
425            */
426            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
427                    long groupId, long parentCategoryId, int start, int end,
428                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
429                    throws com.liferay.portal.kernel.exception.SystemException;
430    
431            /**
432            * 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;.
433            *
434            * @param categoryId the primary key of the current shopping category
435            * @param groupId the group ID
436            * @param parentCategoryId the parent category ID
437            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
438            * @return the previous, current, and next shopping category
439            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
440            * @throws SystemException if a system exception occurred
441            */
442            public com.liferay.portlet.shopping.model.ShoppingCategory[] filterFindByG_P_PrevAndNext(
443                    long categoryId, long groupId, long parentCategoryId,
444                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
445                    throws com.liferay.portal.kernel.exception.SystemException,
446                            com.liferay.portlet.shopping.NoSuchCategoryException;
447    
448            /**
449            * Removes all the shopping categories where groupId = &#63; and parentCategoryId = &#63; from the database.
450            *
451            * @param groupId the group ID
452            * @param parentCategoryId the parent category ID
453            * @throws SystemException if a system exception occurred
454            */
455            public void removeByG_P(long groupId, long parentCategoryId)
456                    throws com.liferay.portal.kernel.exception.SystemException;
457    
458            /**
459            * Returns the number of shopping categories where groupId = &#63; and parentCategoryId = &#63;.
460            *
461            * @param groupId the group ID
462            * @param parentCategoryId the parent category ID
463            * @return the number of matching shopping categories
464            * @throws SystemException if a system exception occurred
465            */
466            public int countByG_P(long groupId, long parentCategoryId)
467                    throws com.liferay.portal.kernel.exception.SystemException;
468    
469            /**
470            * Returns the number of shopping categories that the user has permission to view where groupId = &#63; and parentCategoryId = &#63;.
471            *
472            * @param groupId the group ID
473            * @param parentCategoryId the parent category ID
474            * @return the number of matching shopping categories that the user has permission to view
475            * @throws SystemException if a system exception occurred
476            */
477            public int filterCountByG_P(long groupId, long parentCategoryId)
478                    throws com.liferay.portal.kernel.exception.SystemException;
479    
480            /**
481            * Caches the shopping category in the entity cache if it is enabled.
482            *
483            * @param shoppingCategory the shopping category
484            */
485            public void cacheResult(
486                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory);
487    
488            /**
489            * Caches the shopping categories in the entity cache if it is enabled.
490            *
491            * @param shoppingCategories the shopping categories
492            */
493            public void cacheResult(
494                    java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> shoppingCategories);
495    
496            /**
497            * Creates a new shopping category with the primary key. Does not add the shopping category to the database.
498            *
499            * @param categoryId the primary key for the new shopping category
500            * @return the new shopping category
501            */
502            public com.liferay.portlet.shopping.model.ShoppingCategory create(
503                    long categoryId);
504    
505            /**
506            * Removes the shopping category with the primary key from the database. Also notifies the appropriate model listeners.
507            *
508            * @param categoryId the primary key of the shopping category
509            * @return the shopping category that was removed
510            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
511            * @throws SystemException if a system exception occurred
512            */
513            public com.liferay.portlet.shopping.model.ShoppingCategory remove(
514                    long categoryId)
515                    throws com.liferay.portal.kernel.exception.SystemException,
516                            com.liferay.portlet.shopping.NoSuchCategoryException;
517    
518            public com.liferay.portlet.shopping.model.ShoppingCategory updateImpl(
519                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
520                    throws com.liferay.portal.kernel.exception.SystemException;
521    
522            /**
523            * Returns the shopping category with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchCategoryException} if it could not be found.
524            *
525            * @param categoryId the primary key of the shopping category
526            * @return the shopping category
527            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
528            * @throws SystemException if a system exception occurred
529            */
530            public com.liferay.portlet.shopping.model.ShoppingCategory findByPrimaryKey(
531                    long categoryId)
532                    throws com.liferay.portal.kernel.exception.SystemException,
533                            com.liferay.portlet.shopping.NoSuchCategoryException;
534    
535            /**
536            * Returns the shopping category with the primary key or returns <code>null</code> if it could not be found.
537            *
538            * @param categoryId the primary key of the shopping category
539            * @return the shopping category, or <code>null</code> if a shopping category with the primary key could not be found
540            * @throws SystemException if a system exception occurred
541            */
542            public com.liferay.portlet.shopping.model.ShoppingCategory fetchByPrimaryKey(
543                    long categoryId)
544                    throws com.liferay.portal.kernel.exception.SystemException;
545    
546            /**
547            * Returns all the shopping categories.
548            *
549            * @return the shopping categories
550            * @throws SystemException if a system exception occurred
551            */
552            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
553                    throws com.liferay.portal.kernel.exception.SystemException;
554    
555            /**
556            * Returns a range of all the shopping categories.
557            *
558            * <p>
559            * 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.
560            * </p>
561            *
562            * @param start the lower bound of the range of shopping categories
563            * @param end the upper bound of the range of shopping categories (not inclusive)
564            * @return the range of shopping categories
565            * @throws SystemException if a system exception occurred
566            */
567            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
568                    int start, int end)
569                    throws com.liferay.portal.kernel.exception.SystemException;
570    
571            /**
572            * Returns an ordered range of all the shopping categories.
573            *
574            * <p>
575            * 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.
576            * </p>
577            *
578            * @param start the lower bound of the range of shopping categories
579            * @param end the upper bound of the range of shopping categories (not inclusive)
580            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
581            * @return the ordered range of shopping categories
582            * @throws SystemException if a system exception occurred
583            */
584            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
585                    int start, int end,
586                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
587                    throws com.liferay.portal.kernel.exception.SystemException;
588    
589            /**
590            * Removes all the shopping categories from the database.
591            *
592            * @throws SystemException if a system exception occurred
593            */
594            public void removeAll()
595                    throws com.liferay.portal.kernel.exception.SystemException;
596    
597            /**
598            * Returns the number of shopping categories.
599            *
600            * @return the number of shopping categories
601            * @throws SystemException if a system exception occurred
602            */
603            public int countAll()
604                    throws com.liferay.portal.kernel.exception.SystemException;
605    }