001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.model.PortletPreferences;
018    
019    /**
020     * The persistence interface for the portlet preferences service.
021     *
022     * <p>
023     * Caching information and settings can be found in <code>portal.properties</code>
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see PortletPreferencesPersistenceImpl
028     * @see PortletPreferencesUtil
029     * @generated
030     */
031    public interface PortletPreferencesPersistence extends BasePersistence<PortletPreferences> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * Never modify or reference this interface directly. Always use {@link PortletPreferencesUtil} to access the portlet preferences persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
036             */
037    
038            /**
039            * Caches the portlet preferences in the entity cache if it is enabled.
040            *
041            * @param portletPreferences the portlet preferences
042            */
043            public void cacheResult(
044                    com.liferay.portal.model.PortletPreferences portletPreferences);
045    
046            /**
047            * Caches the portlet preferenceses in the entity cache if it is enabled.
048            *
049            * @param portletPreferenceses the portlet preferenceses
050            */
051            public void cacheResult(
052                    java.util.List<com.liferay.portal.model.PortletPreferences> portletPreferenceses);
053    
054            /**
055            * Creates a new portlet preferences with the primary key. Does not add the portlet preferences to the database.
056            *
057            * @param portletPreferencesId the primary key for the new portlet preferences
058            * @return the new portlet preferences
059            */
060            public com.liferay.portal.model.PortletPreferences create(
061                    long portletPreferencesId);
062    
063            /**
064            * Removes the portlet preferences with the primary key from the database. Also notifies the appropriate model listeners.
065            *
066            * @param portletPreferencesId the primary key of the portlet preferences
067            * @return the portlet preferences that was removed
068            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public com.liferay.portal.model.PortletPreferences remove(
072                    long portletPreferencesId)
073                    throws com.liferay.portal.NoSuchPortletPreferencesException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            public com.liferay.portal.model.PortletPreferences updateImpl(
077                    com.liferay.portal.model.PortletPreferences portletPreferences,
078                    boolean merge)
079                    throws com.liferay.portal.kernel.exception.SystemException;
080    
081            /**
082            * Returns the portlet preferences with the primary key or throws a {@link com.liferay.portal.NoSuchPortletPreferencesException} if it could not be found.
083            *
084            * @param portletPreferencesId the primary key of the portlet preferences
085            * @return the portlet preferences
086            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
087            * @throws SystemException if a system exception occurred
088            */
089            public com.liferay.portal.model.PortletPreferences findByPrimaryKey(
090                    long portletPreferencesId)
091                    throws com.liferay.portal.NoSuchPortletPreferencesException,
092                            com.liferay.portal.kernel.exception.SystemException;
093    
094            /**
095            * Returns the portlet preferences with the primary key or returns <code>null</code> if it could not be found.
096            *
097            * @param portletPreferencesId the primary key of the portlet preferences
098            * @return the portlet preferences, or <code>null</code> if a portlet preferences with the primary key could not be found
099            * @throws SystemException if a system exception occurred
100            */
101            public com.liferay.portal.model.PortletPreferences fetchByPrimaryKey(
102                    long portletPreferencesId)
103                    throws com.liferay.portal.kernel.exception.SystemException;
104    
105            /**
106            * Returns all the portlet preferenceses where plid = &#63;.
107            *
108            * @param plid the plid
109            * @return the matching portlet preferenceses
110            * @throws SystemException if a system exception occurred
111            */
112            public java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
113                    long plid) throws com.liferay.portal.kernel.exception.SystemException;
114    
115            /**
116            * Returns a range of all the portlet preferenceses where plid = &#63;.
117            *
118            * <p>
119            * 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.
120            * </p>
121            *
122            * @param plid the plid
123            * @param start the lower bound of the range of portlet preferenceses
124            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
125            * @return the range of matching portlet preferenceses
126            * @throws SystemException if a system exception occurred
127            */
128            public java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
129                    long plid, int start, int end)
130                    throws com.liferay.portal.kernel.exception.SystemException;
131    
132            /**
133            * Returns an ordered range of all the portlet preferenceses where plid = &#63;.
134            *
135            * <p>
136            * 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.
137            * </p>
138            *
139            * @param plid the plid
140            * @param start the lower bound of the range of portlet preferenceses
141            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
142            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
143            * @return the ordered range of matching portlet preferenceses
144            * @throws SystemException if a system exception occurred
145            */
146            public java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
147                    long plid, int start, int end,
148                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149                    throws com.liferay.portal.kernel.exception.SystemException;
150    
151            /**
152            * Returns the first portlet preferences in the ordered set where plid = &#63;.
153            *
154            * @param plid the plid
155            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
156            * @return the first matching portlet preferences
157            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            public com.liferay.portal.model.PortletPreferences findByPlid_First(
161                    long plid,
162                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163                    throws com.liferay.portal.NoSuchPortletPreferencesException,
164                            com.liferay.portal.kernel.exception.SystemException;
165    
166            /**
167            * Returns the first portlet preferences in the ordered set where plid = &#63;.
168            *
169            * @param plid the plid
170            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
171            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
172            * @throws SystemException if a system exception occurred
173            */
174            public com.liferay.portal.model.PortletPreferences fetchByPlid_First(
175                    long plid,
176                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
177                    throws com.liferay.portal.kernel.exception.SystemException;
178    
179            /**
180            * Returns the last portlet preferences in the ordered set where plid = &#63;.
181            *
182            * @param plid the plid
183            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
184            * @return the last matching portlet preferences
185            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            public com.liferay.portal.model.PortletPreferences findByPlid_Last(
189                    long plid,
190                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
191                    throws com.liferay.portal.NoSuchPortletPreferencesException,
192                            com.liferay.portal.kernel.exception.SystemException;
193    
194            /**
195            * Returns the last portlet preferences in the ordered set where plid = &#63;.
196            *
197            * @param plid the plid
198            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
199            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
200            * @throws SystemException if a system exception occurred
201            */
202            public com.liferay.portal.model.PortletPreferences fetchByPlid_Last(
203                    long plid,
204                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
205                    throws com.liferay.portal.kernel.exception.SystemException;
206    
207            /**
208            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where plid = &#63;.
209            *
210            * @param portletPreferencesId the primary key of the current portlet preferences
211            * @param plid the plid
212            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
213            * @return the previous, current, and next portlet preferences
214            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
215            * @throws SystemException if a system exception occurred
216            */
217            public com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
218                    long portletPreferencesId, long plid,
219                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
220                    throws com.liferay.portal.NoSuchPortletPreferencesException,
221                            com.liferay.portal.kernel.exception.SystemException;
222    
223            /**
224            * Returns all the portlet preferenceses where plid = &#63; and portletId = &#63;.
225            *
226            * @param plid the plid
227            * @param portletId the portlet ID
228            * @return the matching portlet preferenceses
229            * @throws SystemException if a system exception occurred
230            */
231            public java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
232                    long plid, java.lang.String portletId)
233                    throws com.liferay.portal.kernel.exception.SystemException;
234    
235            /**
236            * Returns a range of all the portlet preferenceses where plid = &#63; and portletId = &#63;.
237            *
238            * <p>
239            * 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.
240            * </p>
241            *
242            * @param plid the plid
243            * @param portletId the portlet ID
244            * @param start the lower bound of the range of portlet preferenceses
245            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
246            * @return the range of matching portlet preferenceses
247            * @throws SystemException if a system exception occurred
248            */
249            public java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
250                    long plid, java.lang.String portletId, int start, int end)
251                    throws com.liferay.portal.kernel.exception.SystemException;
252    
253            /**
254            * Returns an ordered range of all the portlet preferenceses where plid = &#63; and portletId = &#63;.
255            *
256            * <p>
257            * 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.
258            * </p>
259            *
260            * @param plid the plid
261            * @param portletId the portlet ID
262            * @param start the lower bound of the range of portlet preferenceses
263            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
264            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
265            * @return the ordered range of matching portlet preferenceses
266            * @throws SystemException if a system exception occurred
267            */
268            public java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
269                    long plid, java.lang.String portletId, int start, int end,
270                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
271                    throws com.liferay.portal.kernel.exception.SystemException;
272    
273            /**
274            * Returns the first portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
275            *
276            * @param plid the plid
277            * @param portletId the portlet ID
278            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
279            * @return the first matching portlet preferences
280            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
281            * @throws SystemException if a system exception occurred
282            */
283            public com.liferay.portal.model.PortletPreferences findByP_P_First(
284                    long plid, java.lang.String portletId,
285                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
286                    throws com.liferay.portal.NoSuchPortletPreferencesException,
287                            com.liferay.portal.kernel.exception.SystemException;
288    
289            /**
290            * Returns the first portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
291            *
292            * @param plid the plid
293            * @param portletId the portlet ID
294            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
295            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
296            * @throws SystemException if a system exception occurred
297            */
298            public com.liferay.portal.model.PortletPreferences fetchByP_P_First(
299                    long plid, java.lang.String portletId,
300                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
301                    throws com.liferay.portal.kernel.exception.SystemException;
302    
303            /**
304            * Returns the last portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
305            *
306            * @param plid the plid
307            * @param portletId the portlet ID
308            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
309            * @return the last matching portlet preferences
310            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
311            * @throws SystemException if a system exception occurred
312            */
313            public com.liferay.portal.model.PortletPreferences findByP_P_Last(
314                    long plid, java.lang.String portletId,
315                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
316                    throws com.liferay.portal.NoSuchPortletPreferencesException,
317                            com.liferay.portal.kernel.exception.SystemException;
318    
319            /**
320            * Returns the last portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
321            *
322            * @param plid the plid
323            * @param portletId the portlet ID
324            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
325            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
326            * @throws SystemException if a system exception occurred
327            */
328            public com.liferay.portal.model.PortletPreferences fetchByP_P_Last(
329                    long plid, java.lang.String portletId,
330                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
331                    throws com.liferay.portal.kernel.exception.SystemException;
332    
333            /**
334            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
335            *
336            * @param portletPreferencesId the primary key of the current portlet preferences
337            * @param plid the plid
338            * @param portletId the portlet ID
339            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
340            * @return the previous, current, and next portlet preferences
341            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
342            * @throws SystemException if a system exception occurred
343            */
344            public com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
345                    long portletPreferencesId, long plid, java.lang.String portletId,
346                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
347                    throws com.liferay.portal.NoSuchPortletPreferencesException,
348                            com.liferay.portal.kernel.exception.SystemException;
349    
350            /**
351            * Returns all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
352            *
353            * @param ownerId the owner ID
354            * @param ownerType the owner type
355            * @param plid the plid
356            * @return the matching portlet preferenceses
357            * @throws SystemException if a system exception occurred
358            */
359            public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
360                    long ownerId, int ownerType, long plid)
361                    throws com.liferay.portal.kernel.exception.SystemException;
362    
363            /**
364            * Returns a range of all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
365            *
366            * <p>
367            * 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.
368            * </p>
369            *
370            * @param ownerId the owner ID
371            * @param ownerType the owner type
372            * @param plid the plid
373            * @param start the lower bound of the range of portlet preferenceses
374            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
375            * @return the range of matching portlet preferenceses
376            * @throws SystemException if a system exception occurred
377            */
378            public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
379                    long ownerId, int ownerType, long plid, int start, int end)
380                    throws com.liferay.portal.kernel.exception.SystemException;
381    
382            /**
383            * Returns an ordered range of all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
384            *
385            * <p>
386            * 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.
387            * </p>
388            *
389            * @param ownerId the owner ID
390            * @param ownerType the owner type
391            * @param plid the plid
392            * @param start the lower bound of the range of portlet preferenceses
393            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
394            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
395            * @return the ordered range of matching portlet preferenceses
396            * @throws SystemException if a system exception occurred
397            */
398            public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
399                    long ownerId, int ownerType, long plid, int start, int end,
400                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
401                    throws com.liferay.portal.kernel.exception.SystemException;
402    
403            /**
404            * Returns the first portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
405            *
406            * @param ownerId the owner ID
407            * @param ownerType the owner type
408            * @param plid the plid
409            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
410            * @return the first matching portlet preferences
411            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
412            * @throws SystemException if a system exception occurred
413            */
414            public com.liferay.portal.model.PortletPreferences findByO_O_P_First(
415                    long ownerId, int ownerType, long plid,
416                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
417                    throws com.liferay.portal.NoSuchPortletPreferencesException,
418                            com.liferay.portal.kernel.exception.SystemException;
419    
420            /**
421            * Returns the first portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
422            *
423            * @param ownerId the owner ID
424            * @param ownerType the owner type
425            * @param plid the plid
426            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
427            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
428            * @throws SystemException if a system exception occurred
429            */
430            public com.liferay.portal.model.PortletPreferences fetchByO_O_P_First(
431                    long ownerId, int ownerType, long plid,
432                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
433                    throws com.liferay.portal.kernel.exception.SystemException;
434    
435            /**
436            * Returns the last portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
437            *
438            * @param ownerId the owner ID
439            * @param ownerType the owner type
440            * @param plid the plid
441            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
442            * @return the last matching portlet preferences
443            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
444            * @throws SystemException if a system exception occurred
445            */
446            public com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
447                    long ownerId, int ownerType, long plid,
448                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
449                    throws com.liferay.portal.NoSuchPortletPreferencesException,
450                            com.liferay.portal.kernel.exception.SystemException;
451    
452            /**
453            * Returns the last portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
454            *
455            * @param ownerId the owner ID
456            * @param ownerType the owner type
457            * @param plid the plid
458            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
459            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
460            * @throws SystemException if a system exception occurred
461            */
462            public com.liferay.portal.model.PortletPreferences fetchByO_O_P_Last(
463                    long ownerId, int ownerType, long plid,
464                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
465                    throws com.liferay.portal.kernel.exception.SystemException;
466    
467            /**
468            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
469            *
470            * @param portletPreferencesId the primary key of the current portlet preferences
471            * @param ownerId the owner ID
472            * @param ownerType the owner type
473            * @param plid the plid
474            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
475            * @return the previous, current, and next portlet preferences
476            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
477            * @throws SystemException if a system exception occurred
478            */
479            public com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
480                    long portletPreferencesId, long ownerId, int ownerType, long plid,
481                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
482                    throws com.liferay.portal.NoSuchPortletPreferencesException,
483                            com.liferay.portal.kernel.exception.SystemException;
484    
485            /**
486            * Returns all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
487            *
488            * @param ownerType the owner type
489            * @param plid the plid
490            * @param portletId the portlet ID
491            * @return the matching portlet preferenceses
492            * @throws SystemException if a system exception occurred
493            */
494            public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_P_P(
495                    int ownerType, long plid, java.lang.String portletId)
496                    throws com.liferay.portal.kernel.exception.SystemException;
497    
498            /**
499            * Returns a range of all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
500            *
501            * <p>
502            * 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.
503            * </p>
504            *
505            * @param ownerType the owner type
506            * @param plid the plid
507            * @param portletId the portlet ID
508            * @param start the lower bound of the range of portlet preferenceses
509            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
510            * @return the range of matching portlet preferenceses
511            * @throws SystemException if a system exception occurred
512            */
513            public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_P_P(
514                    int ownerType, long plid, java.lang.String portletId, int start, int end)
515                    throws com.liferay.portal.kernel.exception.SystemException;
516    
517            /**
518            * Returns an ordered range of all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
519            *
520            * <p>
521            * 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.
522            * </p>
523            *
524            * @param ownerType the owner type
525            * @param plid the plid
526            * @param portletId the portlet ID
527            * @param start the lower bound of the range of portlet preferenceses
528            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
529            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
530            * @return the ordered range of matching portlet preferenceses
531            * @throws SystemException if a system exception occurred
532            */
533            public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_P_P(
534                    int ownerType, long plid, java.lang.String portletId, int start,
535                    int end,
536                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
537                    throws com.liferay.portal.kernel.exception.SystemException;
538    
539            /**
540            * Returns the first portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
541            *
542            * @param ownerType the owner type
543            * @param plid the plid
544            * @param portletId the portlet ID
545            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
546            * @return the first matching portlet preferences
547            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
548            * @throws SystemException if a system exception occurred
549            */
550            public com.liferay.portal.model.PortletPreferences findByO_P_P_First(
551                    int ownerType, long plid, java.lang.String portletId,
552                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
553                    throws com.liferay.portal.NoSuchPortletPreferencesException,
554                            com.liferay.portal.kernel.exception.SystemException;
555    
556            /**
557            * Returns the first portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
558            *
559            * @param ownerType the owner type
560            * @param plid the plid
561            * @param portletId the portlet ID
562            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
563            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
564            * @throws SystemException if a system exception occurred
565            */
566            public com.liferay.portal.model.PortletPreferences fetchByO_P_P_First(
567                    int ownerType, long plid, java.lang.String portletId,
568                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
569                    throws com.liferay.portal.kernel.exception.SystemException;
570    
571            /**
572            * Returns the last portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
573            *
574            * @param ownerType the owner type
575            * @param plid the plid
576            * @param portletId the portlet ID
577            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
578            * @return the last matching portlet preferences
579            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
580            * @throws SystemException if a system exception occurred
581            */
582            public com.liferay.portal.model.PortletPreferences findByO_P_P_Last(
583                    int ownerType, long plid, java.lang.String portletId,
584                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
585                    throws com.liferay.portal.NoSuchPortletPreferencesException,
586                            com.liferay.portal.kernel.exception.SystemException;
587    
588            /**
589            * Returns the last portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
590            *
591            * @param ownerType the owner type
592            * @param plid the plid
593            * @param portletId the portlet ID
594            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
595            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
596            * @throws SystemException if a system exception occurred
597            */
598            public com.liferay.portal.model.PortletPreferences fetchByO_P_P_Last(
599                    int ownerType, long plid, java.lang.String portletId,
600                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
601                    throws com.liferay.portal.kernel.exception.SystemException;
602    
603            /**
604            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
605            *
606            * @param portletPreferencesId the primary key of the current portlet preferences
607            * @param ownerType the owner type
608            * @param plid the plid
609            * @param portletId the portlet ID
610            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
611            * @return the previous, current, and next portlet preferences
612            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
613            * @throws SystemException if a system exception occurred
614            */
615            public com.liferay.portal.model.PortletPreferences[] findByO_P_P_PrevAndNext(
616                    long portletPreferencesId, int ownerType, long plid,
617                    java.lang.String portletId,
618                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
619                    throws com.liferay.portal.NoSuchPortletPreferencesException,
620                            com.liferay.portal.kernel.exception.SystemException;
621    
622            /**
623            * Returns the portlet preferences where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63; or throws a {@link com.liferay.portal.NoSuchPortletPreferencesException} if it could not be found.
624            *
625            * @param ownerId the owner ID
626            * @param ownerType the owner type
627            * @param plid the plid
628            * @param portletId the portlet ID
629            * @return the matching portlet preferences
630            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
631            * @throws SystemException if a system exception occurred
632            */
633            public com.liferay.portal.model.PortletPreferences findByO_O_P_P(
634                    long ownerId, int ownerType, long plid, java.lang.String portletId)
635                    throws com.liferay.portal.NoSuchPortletPreferencesException,
636                            com.liferay.portal.kernel.exception.SystemException;
637    
638            /**
639            * Returns the portlet preferences where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
640            *
641            * @param ownerId the owner ID
642            * @param ownerType the owner type
643            * @param plid the plid
644            * @param portletId the portlet ID
645            * @return the matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
646            * @throws SystemException if a system exception occurred
647            */
648            public com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
649                    long ownerId, int ownerType, long plid, java.lang.String portletId)
650                    throws com.liferay.portal.kernel.exception.SystemException;
651    
652            /**
653            * Returns the portlet preferences where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
654            *
655            * @param ownerId the owner ID
656            * @param ownerType the owner type
657            * @param plid the plid
658            * @param portletId the portlet ID
659            * @param retrieveFromCache whether to use the finder cache
660            * @return the matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
661            * @throws SystemException if a system exception occurred
662            */
663            public com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
664                    long ownerId, int ownerType, long plid, java.lang.String portletId,
665                    boolean retrieveFromCache)
666                    throws com.liferay.portal.kernel.exception.SystemException;
667    
668            /**
669            * Returns all the portlet preferenceses.
670            *
671            * @return the portlet preferenceses
672            * @throws SystemException if a system exception occurred
673            */
674            public java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
675                    throws com.liferay.portal.kernel.exception.SystemException;
676    
677            /**
678            * Returns a range of all the portlet preferenceses.
679            *
680            * <p>
681            * 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.
682            * </p>
683            *
684            * @param start the lower bound of the range of portlet preferenceses
685            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
686            * @return the range of portlet preferenceses
687            * @throws SystemException if a system exception occurred
688            */
689            public java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
690                    int start, int end)
691                    throws com.liferay.portal.kernel.exception.SystemException;
692    
693            /**
694            * Returns an ordered range of all the portlet preferenceses.
695            *
696            * <p>
697            * 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.
698            * </p>
699            *
700            * @param start the lower bound of the range of portlet preferenceses
701            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
702            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
703            * @return the ordered range of portlet preferenceses
704            * @throws SystemException if a system exception occurred
705            */
706            public java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
707                    int start, int end,
708                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
709                    throws com.liferay.portal.kernel.exception.SystemException;
710    
711            /**
712            * Removes all the portlet preferenceses where plid = &#63; from the database.
713            *
714            * @param plid the plid
715            * @throws SystemException if a system exception occurred
716            */
717            public void removeByPlid(long plid)
718                    throws com.liferay.portal.kernel.exception.SystemException;
719    
720            /**
721            * Removes all the portlet preferenceses where plid = &#63; and portletId = &#63; from the database.
722            *
723            * @param plid the plid
724            * @param portletId the portlet ID
725            * @throws SystemException if a system exception occurred
726            */
727            public void removeByP_P(long plid, java.lang.String portletId)
728                    throws com.liferay.portal.kernel.exception.SystemException;
729    
730            /**
731            * Removes all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63; from the database.
732            *
733            * @param ownerId the owner ID
734            * @param ownerType the owner type
735            * @param plid the plid
736            * @throws SystemException if a system exception occurred
737            */
738            public void removeByO_O_P(long ownerId, int ownerType, long plid)
739                    throws com.liferay.portal.kernel.exception.SystemException;
740    
741            /**
742            * Removes all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63; from the database.
743            *
744            * @param ownerType the owner type
745            * @param plid the plid
746            * @param portletId the portlet ID
747            * @throws SystemException if a system exception occurred
748            */
749            public void removeByO_P_P(int ownerType, long plid,
750                    java.lang.String portletId)
751                    throws com.liferay.portal.kernel.exception.SystemException;
752    
753            /**
754            * Removes the portlet preferences where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63; from the database.
755            *
756            * @param ownerId the owner ID
757            * @param ownerType the owner type
758            * @param plid the plid
759            * @param portletId the portlet ID
760            * @return the portlet preferences that was removed
761            * @throws SystemException if a system exception occurred
762            */
763            public com.liferay.portal.model.PortletPreferences removeByO_O_P_P(
764                    long ownerId, int ownerType, long plid, java.lang.String portletId)
765                    throws com.liferay.portal.NoSuchPortletPreferencesException,
766                            com.liferay.portal.kernel.exception.SystemException;
767    
768            /**
769            * Removes all the portlet preferenceses from the database.
770            *
771            * @throws SystemException if a system exception occurred
772            */
773            public void removeAll()
774                    throws com.liferay.portal.kernel.exception.SystemException;
775    
776            /**
777            * Returns the number of portlet preferenceses where plid = &#63;.
778            *
779            * @param plid the plid
780            * @return the number of matching portlet preferenceses
781            * @throws SystemException if a system exception occurred
782            */
783            public int countByPlid(long plid)
784                    throws com.liferay.portal.kernel.exception.SystemException;
785    
786            /**
787            * Returns the number of portlet preferenceses where plid = &#63; and portletId = &#63;.
788            *
789            * @param plid the plid
790            * @param portletId the portlet ID
791            * @return the number of matching portlet preferenceses
792            * @throws SystemException if a system exception occurred
793            */
794            public int countByP_P(long plid, java.lang.String portletId)
795                    throws com.liferay.portal.kernel.exception.SystemException;
796    
797            /**
798            * Returns the number of portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
799            *
800            * @param ownerId the owner ID
801            * @param ownerType the owner type
802            * @param plid the plid
803            * @return the number of matching portlet preferenceses
804            * @throws SystemException if a system exception occurred
805            */
806            public int countByO_O_P(long ownerId, int ownerType, long plid)
807                    throws com.liferay.portal.kernel.exception.SystemException;
808    
809            /**
810            * Returns the number of portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
811            *
812            * @param ownerType the owner type
813            * @param plid the plid
814            * @param portletId the portlet ID
815            * @return the number of matching portlet preferenceses
816            * @throws SystemException if a system exception occurred
817            */
818            public int countByO_P_P(int ownerType, long plid, java.lang.String portletId)
819                    throws com.liferay.portal.kernel.exception.SystemException;
820    
821            /**
822            * Returns the number of portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63;.
823            *
824            * @param ownerId the owner ID
825            * @param ownerType the owner type
826            * @param plid the plid
827            * @param portletId the portlet ID
828            * @return the number of matching portlet preferenceses
829            * @throws SystemException if a system exception occurred
830            */
831            public int countByO_O_P_P(long ownerId, int ownerType, long plid,
832                    java.lang.String portletId)
833                    throws com.liferay.portal.kernel.exception.SystemException;
834    
835            /**
836            * Returns the number of portlet preferenceses.
837            *
838            * @return the number of portlet preferenceses
839            * @throws SystemException if a system exception occurred
840            */
841            public int countAll()
842                    throws com.liferay.portal.kernel.exception.SystemException;
843    }