001    /**
002     * Copyright (c) 2000-2010 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.portal.service.persistence;
016    
017    import com.liferay.portal.model.PortletItem;
018    
019    /**
020     * The persistence interface for the portlet item service.
021     *
022     * <p>
023     * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface.
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see PortletItemPersistenceImpl
028     * @see PortletItemUtil
029     * @generated
030     */
031    public interface PortletItemPersistence extends BasePersistence<PortletItem> {
032            /**
033            * Caches the portlet item in the entity cache if it is enabled.
034            *
035            * @param portletItem the portlet item to cache
036            */
037            public void cacheResult(com.liferay.portal.model.PortletItem portletItem);
038    
039            /**
040            * Caches the portlet items in the entity cache if it is enabled.
041            *
042            * @param portletItems the portlet items to cache
043            */
044            public void cacheResult(
045                    java.util.List<com.liferay.portal.model.PortletItem> portletItems);
046    
047            /**
048            * Creates a new portlet item with the primary key.
049            *
050            * @param portletItemId the primary key for the new portlet item
051            * @return the new portlet item
052            */
053            public com.liferay.portal.model.PortletItem create(long portletItemId);
054    
055            /**
056            * Removes the portlet item with the primary key from the database. Also notifies the appropriate model listeners.
057            *
058            * @param portletItemId the primary key of the portlet item to remove
059            * @return the portlet item that was removed
060            * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found
061            * @throws SystemException if a system exception occurred
062            */
063            public com.liferay.portal.model.PortletItem remove(long portletItemId)
064                    throws com.liferay.portal.NoSuchPortletItemException,
065                            com.liferay.portal.kernel.exception.SystemException;
066    
067            public com.liferay.portal.model.PortletItem updateImpl(
068                    com.liferay.portal.model.PortletItem portletItem, boolean merge)
069                    throws com.liferay.portal.kernel.exception.SystemException;
070    
071            /**
072            * Finds the portlet item with the primary key or throws a {@link com.liferay.portal.NoSuchPortletItemException} if it could not be found.
073            *
074            * @param portletItemId the primary key of the portlet item to find
075            * @return the portlet item
076            * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found
077            * @throws SystemException if a system exception occurred
078            */
079            public com.liferay.portal.model.PortletItem findByPrimaryKey(
080                    long portletItemId)
081                    throws com.liferay.portal.NoSuchPortletItemException,
082                            com.liferay.portal.kernel.exception.SystemException;
083    
084            /**
085            * Finds the portlet item with the primary key or returns <code>null</code> if it could not be found.
086            *
087            * @param portletItemId the primary key of the portlet item to find
088            * @return the portlet item, or <code>null</code> if a portlet item with the primary key could not be found
089            * @throws SystemException if a system exception occurred
090            */
091            public com.liferay.portal.model.PortletItem fetchByPrimaryKey(
092                    long portletItemId)
093                    throws com.liferay.portal.kernel.exception.SystemException;
094    
095            /**
096            * Finds all the portlet items where groupId = &#63; and classNameId = &#63;.
097            *
098            * @param groupId the group id to search with
099            * @param classNameId the class name id to search with
100            * @return the matching portlet items
101            * @throws SystemException if a system exception occurred
102            */
103            public java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
104                    long groupId, long classNameId)
105                    throws com.liferay.portal.kernel.exception.SystemException;
106    
107            /**
108            * Finds a range of all the portlet items where groupId = &#63; and classNameId = &#63;.
109            *
110            * <p>
111            * 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.
112            * </p>
113            *
114            * @param groupId the group id to search with
115            * @param classNameId the class name id to search with
116            * @param start the lower bound of the range of portlet items to return
117            * @param end the upper bound of the range of portlet items to return (not inclusive)
118            * @return the range of matching portlet items
119            * @throws SystemException if a system exception occurred
120            */
121            public java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
122                    long groupId, long classNameId, int start, int end)
123                    throws com.liferay.portal.kernel.exception.SystemException;
124    
125            /**
126            * Finds an ordered range of all the portlet items where groupId = &#63; and classNameId = &#63;.
127            *
128            * <p>
129            * 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.
130            * </p>
131            *
132            * @param groupId the group id to search with
133            * @param classNameId the class name id to search with
134            * @param start the lower bound of the range of portlet items to return
135            * @param end the upper bound of the range of portlet items to return (not inclusive)
136            * @param orderByComparator the comparator to order the results by
137            * @return the ordered range of matching portlet items
138            * @throws SystemException if a system exception occurred
139            */
140            public java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
141                    long groupId, long classNameId, int start, int end,
142                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143                    throws com.liferay.portal.kernel.exception.SystemException;
144    
145            /**
146            * Finds the first portlet item in the ordered set where groupId = &#63; and classNameId = &#63;.
147            *
148            * <p>
149            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
150            * </p>
151            *
152            * @param groupId the group id to search with
153            * @param classNameId the class name id to search with
154            * @param orderByComparator the comparator to order the set by
155            * @return the first matching portlet item
156            * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found
157            * @throws SystemException if a system exception occurred
158            */
159            public com.liferay.portal.model.PortletItem findByG_C_First(long groupId,
160                    long classNameId,
161                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162                    throws com.liferay.portal.NoSuchPortletItemException,
163                            com.liferay.portal.kernel.exception.SystemException;
164    
165            /**
166            * Finds the last portlet item in the ordered set where groupId = &#63; and classNameId = &#63;.
167            *
168            * <p>
169            * 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.
170            * </p>
171            *
172            * @param groupId the group id to search with
173            * @param classNameId the class name id to search with
174            * @param orderByComparator the comparator to order the set by
175            * @return the last matching portlet item
176            * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found
177            * @throws SystemException if a system exception occurred
178            */
179            public com.liferay.portal.model.PortletItem findByG_C_Last(long groupId,
180                    long classNameId,
181                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182                    throws com.liferay.portal.NoSuchPortletItemException,
183                            com.liferay.portal.kernel.exception.SystemException;
184    
185            /**
186            * Finds the portlet items before and after the current portlet item in the ordered set where groupId = &#63; and classNameId = &#63;.
187            *
188            * <p>
189            * 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.
190            * </p>
191            *
192            * @param portletItemId the primary key of the current portlet item
193            * @param groupId the group id to search with
194            * @param classNameId the class name id to search with
195            * @param orderByComparator the comparator to order the set by
196            * @return the previous, current, and next portlet item
197            * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found
198            * @throws SystemException if a system exception occurred
199            */
200            public com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext(
201                    long portletItemId, long groupId, long classNameId,
202                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203                    throws com.liferay.portal.NoSuchPortletItemException,
204                            com.liferay.portal.kernel.exception.SystemException;
205    
206            /**
207            * Finds all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
208            *
209            * @param groupId the group id to search with
210            * @param portletId the portlet id to search with
211            * @param classNameId the class name id to search with
212            * @return the matching portlet items
213            * @throws SystemException if a system exception occurred
214            */
215            public java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
216                    long groupId, java.lang.String portletId, long classNameId)
217                    throws com.liferay.portal.kernel.exception.SystemException;
218    
219            /**
220            * Finds a range of all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
221            *
222            * <p>
223            * 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.
224            * </p>
225            *
226            * @param groupId the group id to search with
227            * @param portletId the portlet id to search with
228            * @param classNameId the class name id to search with
229            * @param start the lower bound of the range of portlet items to return
230            * @param end the upper bound of the range of portlet items to return (not inclusive)
231            * @return the range of matching portlet items
232            * @throws SystemException if a system exception occurred
233            */
234            public java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
235                    long groupId, java.lang.String portletId, long classNameId, int start,
236                    int end) throws com.liferay.portal.kernel.exception.SystemException;
237    
238            /**
239            * Finds an ordered range of all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
240            *
241            * <p>
242            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
243            * </p>
244            *
245            * @param groupId the group id to search with
246            * @param portletId the portlet id to search with
247            * @param classNameId the class name id to search with
248            * @param start the lower bound of the range of portlet items to return
249            * @param end the upper bound of the range of portlet items to return (not inclusive)
250            * @param orderByComparator the comparator to order the results by
251            * @return the ordered range of matching portlet items
252            * @throws SystemException if a system exception occurred
253            */
254            public java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
255                    long groupId, java.lang.String portletId, long classNameId, int start,
256                    int end,
257                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
258                    throws com.liferay.portal.kernel.exception.SystemException;
259    
260            /**
261            * Finds the first portlet item in the ordered set where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
262            *
263            * <p>
264            * 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.
265            * </p>
266            *
267            * @param groupId the group id to search with
268            * @param portletId the portlet id to search with
269            * @param classNameId the class name id to search with
270            * @param orderByComparator the comparator to order the set by
271            * @return the first matching portlet item
272            * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found
273            * @throws SystemException if a system exception occurred
274            */
275            public com.liferay.portal.model.PortletItem findByG_P_C_First(
276                    long groupId, java.lang.String portletId, long classNameId,
277                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
278                    throws com.liferay.portal.NoSuchPortletItemException,
279                            com.liferay.portal.kernel.exception.SystemException;
280    
281            /**
282            * Finds the last portlet item in the ordered set where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
283            *
284            * <p>
285            * 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.
286            * </p>
287            *
288            * @param groupId the group id to search with
289            * @param portletId the portlet id to search with
290            * @param classNameId the class name id to search with
291            * @param orderByComparator the comparator to order the set by
292            * @return the last matching portlet item
293            * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found
294            * @throws SystemException if a system exception occurred
295            */
296            public com.liferay.portal.model.PortletItem findByG_P_C_Last(long groupId,
297                    java.lang.String portletId, long classNameId,
298                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
299                    throws com.liferay.portal.NoSuchPortletItemException,
300                            com.liferay.portal.kernel.exception.SystemException;
301    
302            /**
303            * Finds the portlet items before and after the current portlet item in the ordered set where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
304            *
305            * <p>
306            * 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.
307            * </p>
308            *
309            * @param portletItemId the primary key of the current portlet item
310            * @param groupId the group id to search with
311            * @param portletId the portlet id to search with
312            * @param classNameId the class name id to search with
313            * @param orderByComparator the comparator to order the set by
314            * @return the previous, current, and next portlet item
315            * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found
316            * @throws SystemException if a system exception occurred
317            */
318            public com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext(
319                    long portletItemId, long groupId, java.lang.String portletId,
320                    long classNameId,
321                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
322                    throws com.liferay.portal.NoSuchPortletItemException,
323                            com.liferay.portal.kernel.exception.SystemException;
324    
325            /**
326            * Finds the portlet item where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63; or throws a {@link com.liferay.portal.NoSuchPortletItemException} if it could not be found.
327            *
328            * @param groupId the group id to search with
329            * @param name the name to search with
330            * @param portletId the portlet id to search with
331            * @param classNameId the class name id to search with
332            * @return the matching portlet item
333            * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found
334            * @throws SystemException if a system exception occurred
335            */
336            public com.liferay.portal.model.PortletItem findByG_N_P_C(long groupId,
337                    java.lang.String name, java.lang.String portletId, long classNameId)
338                    throws com.liferay.portal.NoSuchPortletItemException,
339                            com.liferay.portal.kernel.exception.SystemException;
340    
341            /**
342            * Finds the portlet item where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
343            *
344            * @param groupId the group id to search with
345            * @param name the name to search with
346            * @param portletId the portlet id to search with
347            * @param classNameId the class name id to search with
348            * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found
349            * @throws SystemException if a system exception occurred
350            */
351            public com.liferay.portal.model.PortletItem fetchByG_N_P_C(long groupId,
352                    java.lang.String name, java.lang.String portletId, long classNameId)
353                    throws com.liferay.portal.kernel.exception.SystemException;
354    
355            /**
356            * Finds the portlet item where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
357            *
358            * @param groupId the group id to search with
359            * @param name the name to search with
360            * @param portletId the portlet id to search with
361            * @param classNameId the class name id to search with
362            * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found
363            * @throws SystemException if a system exception occurred
364            */
365            public com.liferay.portal.model.PortletItem fetchByG_N_P_C(long groupId,
366                    java.lang.String name, java.lang.String portletId, long classNameId,
367                    boolean retrieveFromCache)
368                    throws com.liferay.portal.kernel.exception.SystemException;
369    
370            /**
371            * Finds all the portlet items.
372            *
373            * @return the portlet items
374            * @throws SystemException if a system exception occurred
375            */
376            public java.util.List<com.liferay.portal.model.PortletItem> findAll()
377                    throws com.liferay.portal.kernel.exception.SystemException;
378    
379            /**
380            * Finds a range of all the portlet items.
381            *
382            * <p>
383            * 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.
384            * </p>
385            *
386            * @param start the lower bound of the range of portlet items to return
387            * @param end the upper bound of the range of portlet items to return (not inclusive)
388            * @return the range of portlet items
389            * @throws SystemException if a system exception occurred
390            */
391            public java.util.List<com.liferay.portal.model.PortletItem> findAll(
392                    int start, int end)
393                    throws com.liferay.portal.kernel.exception.SystemException;
394    
395            /**
396            * Finds an ordered range of all the portlet items.
397            *
398            * <p>
399            * 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.
400            * </p>
401            *
402            * @param start the lower bound of the range of portlet items to return
403            * @param end the upper bound of the range of portlet items to return (not inclusive)
404            * @param orderByComparator the comparator to order the results by
405            * @return the ordered range of portlet items
406            * @throws SystemException if a system exception occurred
407            */
408            public java.util.List<com.liferay.portal.model.PortletItem> findAll(
409                    int start, int end,
410                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
411                    throws com.liferay.portal.kernel.exception.SystemException;
412    
413            /**
414            * Removes all the portlet items where groupId = &#63; and classNameId = &#63; from the database.
415            *
416            * @param groupId the group id to search with
417            * @param classNameId the class name id to search with
418            * @throws SystemException if a system exception occurred
419            */
420            public void removeByG_C(long groupId, long classNameId)
421                    throws com.liferay.portal.kernel.exception.SystemException;
422    
423            /**
424            * Removes all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63; from the database.
425            *
426            * @param groupId the group id to search with
427            * @param portletId the portlet id to search with
428            * @param classNameId the class name id to search with
429            * @throws SystemException if a system exception occurred
430            */
431            public void removeByG_P_C(long groupId, java.lang.String portletId,
432                    long classNameId)
433                    throws com.liferay.portal.kernel.exception.SystemException;
434    
435            /**
436            * Removes the portlet item where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63; from the database.
437            *
438            * @param groupId the group id to search with
439            * @param name the name to search with
440            * @param portletId the portlet id to search with
441            * @param classNameId the class name id to search with
442            * @throws SystemException if a system exception occurred
443            */
444            public void removeByG_N_P_C(long groupId, java.lang.String name,
445                    java.lang.String portletId, long classNameId)
446                    throws com.liferay.portal.NoSuchPortletItemException,
447                            com.liferay.portal.kernel.exception.SystemException;
448    
449            /**
450            * Removes all the portlet items from the database.
451            *
452            * @throws SystemException if a system exception occurred
453            */
454            public void removeAll()
455                    throws com.liferay.portal.kernel.exception.SystemException;
456    
457            /**
458            * Counts all the portlet items where groupId = &#63; and classNameId = &#63;.
459            *
460            * @param groupId the group id to search with
461            * @param classNameId the class name id to search with
462            * @return the number of matching portlet items
463            * @throws SystemException if a system exception occurred
464            */
465            public int countByG_C(long groupId, long classNameId)
466                    throws com.liferay.portal.kernel.exception.SystemException;
467    
468            /**
469            * Counts all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
470            *
471            * @param groupId the group id to search with
472            * @param portletId the portlet id to search with
473            * @param classNameId the class name id to search with
474            * @return the number of matching portlet items
475            * @throws SystemException if a system exception occurred
476            */
477            public int countByG_P_C(long groupId, java.lang.String portletId,
478                    long classNameId)
479                    throws com.liferay.portal.kernel.exception.SystemException;
480    
481            /**
482            * Counts all the portlet items where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63;.
483            *
484            * @param groupId the group id to search with
485            * @param name the name to search with
486            * @param portletId the portlet id to search with
487            * @param classNameId the class name id to search with
488            * @return the number of matching portlet items
489            * @throws SystemException if a system exception occurred
490            */
491            public int countByG_N_P_C(long groupId, java.lang.String name,
492                    java.lang.String portletId, long classNameId)
493                    throws com.liferay.portal.kernel.exception.SystemException;
494    
495            /**
496            * Counts all the portlet items.
497            *
498            * @return the number of portlet items
499            * @throws SystemException if a system exception occurred
500            */
501            public int countAll()
502                    throws com.liferay.portal.kernel.exception.SystemException;
503    }