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            * Returns the shopping category where groupId = &#63; and name = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchCategoryException} if it could not be found.
482            *
483            * @param groupId the group ID
484            * @param name the name
485            * @return the matching shopping category
486            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found
487            * @throws SystemException if a system exception occurred
488            */
489            public com.liferay.portlet.shopping.model.ShoppingCategory findByG_N(
490                    long groupId, java.lang.String name)
491                    throws com.liferay.portal.kernel.exception.SystemException,
492                            com.liferay.portlet.shopping.NoSuchCategoryException;
493    
494            /**
495            * Returns the shopping category where groupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
496            *
497            * @param groupId the group ID
498            * @param name the name
499            * @return the matching shopping category, or <code>null</code> if a matching shopping category could not be found
500            * @throws SystemException if a system exception occurred
501            */
502            public com.liferay.portlet.shopping.model.ShoppingCategory fetchByG_N(
503                    long groupId, java.lang.String name)
504                    throws com.liferay.portal.kernel.exception.SystemException;
505    
506            /**
507            * Returns the shopping category where groupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
508            *
509            * @param groupId the group ID
510            * @param name the name
511            * @param retrieveFromCache whether to use the finder cache
512            * @return the matching shopping category, or <code>null</code> if a matching shopping category could not be found
513            * @throws SystemException if a system exception occurred
514            */
515            public com.liferay.portlet.shopping.model.ShoppingCategory fetchByG_N(
516                    long groupId, java.lang.String name, boolean retrieveFromCache)
517                    throws com.liferay.portal.kernel.exception.SystemException;
518    
519            /**
520            * Removes the shopping category where groupId = &#63; and name = &#63; from the database.
521            *
522            * @param groupId the group ID
523            * @param name the name
524            * @return the shopping category that was removed
525            * @throws SystemException if a system exception occurred
526            */
527            public com.liferay.portlet.shopping.model.ShoppingCategory removeByG_N(
528                    long groupId, java.lang.String name)
529                    throws com.liferay.portal.kernel.exception.SystemException,
530                            com.liferay.portlet.shopping.NoSuchCategoryException;
531    
532            /**
533            * Returns the number of shopping categories where groupId = &#63; and name = &#63;.
534            *
535            * @param groupId the group ID
536            * @param name the name
537            * @return the number of matching shopping categories
538            * @throws SystemException if a system exception occurred
539            */
540            public int countByG_N(long groupId, java.lang.String name)
541                    throws com.liferay.portal.kernel.exception.SystemException;
542    
543            /**
544            * Caches the shopping category in the entity cache if it is enabled.
545            *
546            * @param shoppingCategory the shopping category
547            */
548            public void cacheResult(
549                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory);
550    
551            /**
552            * Caches the shopping categories in the entity cache if it is enabled.
553            *
554            * @param shoppingCategories the shopping categories
555            */
556            public void cacheResult(
557                    java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> shoppingCategories);
558    
559            /**
560            * Creates a new shopping category with the primary key. Does not add the shopping category to the database.
561            *
562            * @param categoryId the primary key for the new shopping category
563            * @return the new shopping category
564            */
565            public com.liferay.portlet.shopping.model.ShoppingCategory create(
566                    long categoryId);
567    
568            /**
569            * Removes the shopping category with the primary key from the database. Also notifies the appropriate model listeners.
570            *
571            * @param categoryId the primary key of the shopping category
572            * @return the shopping category that was removed
573            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
574            * @throws SystemException if a system exception occurred
575            */
576            public com.liferay.portlet.shopping.model.ShoppingCategory remove(
577                    long categoryId)
578                    throws com.liferay.portal.kernel.exception.SystemException,
579                            com.liferay.portlet.shopping.NoSuchCategoryException;
580    
581            public com.liferay.portlet.shopping.model.ShoppingCategory updateImpl(
582                    com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
583                    throws com.liferay.portal.kernel.exception.SystemException;
584    
585            /**
586            * Returns the shopping category with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchCategoryException} if it could not be found.
587            *
588            * @param categoryId the primary key of the shopping category
589            * @return the shopping category
590            * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found
591            * @throws SystemException if a system exception occurred
592            */
593            public com.liferay.portlet.shopping.model.ShoppingCategory findByPrimaryKey(
594                    long categoryId)
595                    throws com.liferay.portal.kernel.exception.SystemException,
596                            com.liferay.portlet.shopping.NoSuchCategoryException;
597    
598            /**
599            * Returns the shopping category with the primary key or returns <code>null</code> if it could not be found.
600            *
601            * @param categoryId the primary key of the shopping category
602            * @return the shopping category, or <code>null</code> if a shopping category with the primary key could not be found
603            * @throws SystemException if a system exception occurred
604            */
605            public com.liferay.portlet.shopping.model.ShoppingCategory fetchByPrimaryKey(
606                    long categoryId)
607                    throws com.liferay.portal.kernel.exception.SystemException;
608    
609            /**
610            * Returns all the shopping categories.
611            *
612            * @return the shopping categories
613            * @throws SystemException if a system exception occurred
614            */
615            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
616                    throws com.liferay.portal.kernel.exception.SystemException;
617    
618            /**
619            * Returns a range of all the shopping categories.
620            *
621            * <p>
622            * 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.
623            * </p>
624            *
625            * @param start the lower bound of the range of shopping categories
626            * @param end the upper bound of the range of shopping categories (not inclusive)
627            * @return the range of shopping categories
628            * @throws SystemException if a system exception occurred
629            */
630            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
631                    int start, int end)
632                    throws com.liferay.portal.kernel.exception.SystemException;
633    
634            /**
635            * Returns an ordered range of all the shopping categories.
636            *
637            * <p>
638            * 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.
639            * </p>
640            *
641            * @param start the lower bound of the range of shopping categories
642            * @param end the upper bound of the range of shopping categories (not inclusive)
643            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
644            * @return the ordered range of shopping categories
645            * @throws SystemException if a system exception occurred
646            */
647            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
648                    int start, int end,
649                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
650                    throws com.liferay.portal.kernel.exception.SystemException;
651    
652            /**
653            * Removes all the shopping categories from the database.
654            *
655            * @throws SystemException if a system exception occurred
656            */
657            public void removeAll()
658                    throws com.liferay.portal.kernel.exception.SystemException;
659    
660            /**
661            * Returns the number of shopping categories.
662            *
663            * @return the number of shopping categories
664            * @throws SystemException if a system exception occurred
665            */
666            public int countAll()
667                    throws com.liferay.portal.kernel.exception.SystemException;
668    }