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