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.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.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.PortletPreferences;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the portlet preferences service. This utility wraps {@link PortletPreferencesPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see PortletPreferencesPersistence
036     * @see PortletPreferencesPersistenceImpl
037     * @generated
038     */
039    public class PortletPreferencesUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(PortletPreferences portletPreferences) {
057                    getPersistence().clearCache(portletPreferences);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<PortletPreferences> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<PortletPreferences> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<PortletPreferences> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
098             */
099            public static PortletPreferences update(
100                    PortletPreferences portletPreferences, boolean merge)
101                    throws SystemException {
102                    return getPersistence().update(portletPreferences, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static PortletPreferences update(
109                    PortletPreferences portletPreferences, boolean merge,
110                    ServiceContext serviceContext) throws SystemException {
111                    return getPersistence().update(portletPreferences, merge, serviceContext);
112            }
113    
114            /**
115            * Caches the portlet preferences in the entity cache if it is enabled.
116            *
117            * @param portletPreferences the portlet preferences
118            */
119            public static void cacheResult(
120                    com.liferay.portal.model.PortletPreferences portletPreferences) {
121                    getPersistence().cacheResult(portletPreferences);
122            }
123    
124            /**
125            * Caches the portlet preferenceses in the entity cache if it is enabled.
126            *
127            * @param portletPreferenceses the portlet preferenceses
128            */
129            public static void cacheResult(
130                    java.util.List<com.liferay.portal.model.PortletPreferences> portletPreferenceses) {
131                    getPersistence().cacheResult(portletPreferenceses);
132            }
133    
134            /**
135            * Creates a new portlet preferences with the primary key. Does not add the portlet preferences to the database.
136            *
137            * @param portletPreferencesId the primary key for the new portlet preferences
138            * @return the new portlet preferences
139            */
140            public static com.liferay.portal.model.PortletPreferences create(
141                    long portletPreferencesId) {
142                    return getPersistence().create(portletPreferencesId);
143            }
144    
145            /**
146            * Removes the portlet preferences with the primary key from the database. Also notifies the appropriate model listeners.
147            *
148            * @param portletPreferencesId the primary key of the portlet preferences
149            * @return the portlet preferences that was removed
150            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            public static com.liferay.portal.model.PortletPreferences remove(
154                    long portletPreferencesId)
155                    throws com.liferay.portal.NoSuchPortletPreferencesException,
156                            com.liferay.portal.kernel.exception.SystemException {
157                    return getPersistence().remove(portletPreferencesId);
158            }
159    
160            public static com.liferay.portal.model.PortletPreferences updateImpl(
161                    com.liferay.portal.model.PortletPreferences portletPreferences,
162                    boolean merge)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getPersistence().updateImpl(portletPreferences, merge);
165            }
166    
167            /**
168            * Returns the portlet preferences with the primary key or throws a {@link com.liferay.portal.NoSuchPortletPreferencesException} if it could not be found.
169            *
170            * @param portletPreferencesId the primary key of the portlet preferences
171            * @return the portlet preferences
172            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portal.model.PortletPreferences findByPrimaryKey(
176                    long portletPreferencesId)
177                    throws com.liferay.portal.NoSuchPortletPreferencesException,
178                            com.liferay.portal.kernel.exception.SystemException {
179                    return getPersistence().findByPrimaryKey(portletPreferencesId);
180            }
181    
182            /**
183            * Returns the portlet preferences with the primary key or returns <code>null</code> if it could not be found.
184            *
185            * @param portletPreferencesId the primary key of the portlet preferences
186            * @return the portlet preferences, or <code>null</code> if a portlet preferences with the primary key could not be found
187            * @throws SystemException if a system exception occurred
188            */
189            public static com.liferay.portal.model.PortletPreferences fetchByPrimaryKey(
190                    long portletPreferencesId)
191                    throws com.liferay.portal.kernel.exception.SystemException {
192                    return getPersistence().fetchByPrimaryKey(portletPreferencesId);
193            }
194    
195            /**
196            * Returns all the portlet preferenceses where plid = &#63;.
197            *
198            * @param plid the plid
199            * @return the matching portlet preferenceses
200            * @throws SystemException if a system exception occurred
201            */
202            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
203                    long plid) throws com.liferay.portal.kernel.exception.SystemException {
204                    return getPersistence().findByPlid(plid);
205            }
206    
207            /**
208            * Returns a range of all the portlet preferenceses where plid = &#63;.
209            *
210            * <p>
211            * 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.
212            * </p>
213            *
214            * @param plid the plid
215            * @param start the lower bound of the range of portlet preferenceses
216            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
217            * @return the range of matching portlet preferenceses
218            * @throws SystemException if a system exception occurred
219            */
220            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
221                    long plid, int start, int end)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getPersistence().findByPlid(plid, start, end);
224            }
225    
226            /**
227            * Returns an ordered range of all the portlet preferenceses where plid = &#63;.
228            *
229            * <p>
230            * 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.
231            * </p>
232            *
233            * @param plid the plid
234            * @param start the lower bound of the range of portlet preferenceses
235            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
236            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
237            * @return the ordered range of matching portlet preferenceses
238            * @throws SystemException if a system exception occurred
239            */
240            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
241                    long plid, int start, int end,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence().findByPlid(plid, start, end, orderByComparator);
245            }
246    
247            /**
248            * Returns the first portlet preferences in the ordered set where plid = &#63;.
249            *
250            * @param plid the plid
251            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
252            * @return the first matching portlet preferences
253            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
254            * @throws SystemException if a system exception occurred
255            */
256            public static com.liferay.portal.model.PortletPreferences findByPlid_First(
257                    long plid,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.NoSuchPortletPreferencesException,
260                            com.liferay.portal.kernel.exception.SystemException {
261                    return getPersistence().findByPlid_First(plid, orderByComparator);
262            }
263    
264            /**
265            * Returns the first portlet preferences in the ordered set where plid = &#63;.
266            *
267            * @param plid the plid
268            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
269            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
270            * @throws SystemException if a system exception occurred
271            */
272            public static com.liferay.portal.model.PortletPreferences fetchByPlid_First(
273                    long plid,
274                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
275                    throws com.liferay.portal.kernel.exception.SystemException {
276                    return getPersistence().fetchByPlid_First(plid, orderByComparator);
277            }
278    
279            /**
280            * Returns the last portlet preferences in the ordered set where plid = &#63;.
281            *
282            * @param plid the plid
283            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
284            * @return the last matching portlet preferences
285            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
286            * @throws SystemException if a system exception occurred
287            */
288            public static com.liferay.portal.model.PortletPreferences findByPlid_Last(
289                    long plid,
290                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
291                    throws com.liferay.portal.NoSuchPortletPreferencesException,
292                            com.liferay.portal.kernel.exception.SystemException {
293                    return getPersistence().findByPlid_Last(plid, orderByComparator);
294            }
295    
296            /**
297            * Returns the last portlet preferences in the ordered set where plid = &#63;.
298            *
299            * @param plid the plid
300            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
301            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public static com.liferay.portal.model.PortletPreferences fetchByPlid_Last(
305                    long plid,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.kernel.exception.SystemException {
308                    return getPersistence().fetchByPlid_Last(plid, orderByComparator);
309            }
310    
311            /**
312            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where plid = &#63;.
313            *
314            * @param portletPreferencesId the primary key of the current portlet preferences
315            * @param plid the plid
316            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
317            * @return the previous, current, and next portlet preferences
318            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
319            * @throws SystemException if a system exception occurred
320            */
321            public static com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
322                    long portletPreferencesId, long plid,
323                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
324                    throws com.liferay.portal.NoSuchPortletPreferencesException,
325                            com.liferay.portal.kernel.exception.SystemException {
326                    return getPersistence()
327                                       .findByPlid_PrevAndNext(portletPreferencesId, plid,
328                            orderByComparator);
329            }
330    
331            /**
332            * Returns all the portlet preferenceses where plid = &#63; and portletId = &#63;.
333            *
334            * @param plid the plid
335            * @param portletId the portlet ID
336            * @return the matching portlet preferenceses
337            * @throws SystemException if a system exception occurred
338            */
339            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
340                    long plid, java.lang.String portletId)
341                    throws com.liferay.portal.kernel.exception.SystemException {
342                    return getPersistence().findByP_P(plid, portletId);
343            }
344    
345            /**
346            * Returns a range of all the portlet preferenceses where plid = &#63; and portletId = &#63;.
347            *
348            * <p>
349            * 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.
350            * </p>
351            *
352            * @param plid the plid
353            * @param portletId the portlet ID
354            * @param start the lower bound of the range of portlet preferenceses
355            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
356            * @return the range of matching portlet preferenceses
357            * @throws SystemException if a system exception occurred
358            */
359            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
360                    long plid, java.lang.String portletId, int start, int end)
361                    throws com.liferay.portal.kernel.exception.SystemException {
362                    return getPersistence().findByP_P(plid, portletId, start, end);
363            }
364    
365            /**
366            * Returns an ordered range of all the portlet preferenceses where plid = &#63; and portletId = &#63;.
367            *
368            * <p>
369            * 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.
370            * </p>
371            *
372            * @param plid the plid
373            * @param portletId the portlet ID
374            * @param start the lower bound of the range of portlet preferenceses
375            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
376            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
377            * @return the ordered range of matching portlet preferenceses
378            * @throws SystemException if a system exception occurred
379            */
380            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
381                    long plid, java.lang.String portletId, int start, int end,
382                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
383                    throws com.liferay.portal.kernel.exception.SystemException {
384                    return getPersistence()
385                                       .findByP_P(plid, portletId, start, end, orderByComparator);
386            }
387    
388            /**
389            * Returns the first portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
390            *
391            * @param plid the plid
392            * @param portletId the portlet ID
393            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
394            * @return the first matching portlet preferences
395            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
396            * @throws SystemException if a system exception occurred
397            */
398            public static com.liferay.portal.model.PortletPreferences findByP_P_First(
399                    long plid, java.lang.String portletId,
400                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
401                    throws com.liferay.portal.NoSuchPortletPreferencesException,
402                            com.liferay.portal.kernel.exception.SystemException {
403                    return getPersistence()
404                                       .findByP_P_First(plid, portletId, orderByComparator);
405            }
406    
407            /**
408            * Returns the first portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
409            *
410            * @param plid the plid
411            * @param portletId the portlet ID
412            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
413            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
414            * @throws SystemException if a system exception occurred
415            */
416            public static com.liferay.portal.model.PortletPreferences fetchByP_P_First(
417                    long plid, java.lang.String portletId,
418                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
419                    throws com.liferay.portal.kernel.exception.SystemException {
420                    return getPersistence()
421                                       .fetchByP_P_First(plid, portletId, orderByComparator);
422            }
423    
424            /**
425            * Returns the last portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
426            *
427            * @param plid the plid
428            * @param portletId the portlet ID
429            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
430            * @return the last matching portlet preferences
431            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
432            * @throws SystemException if a system exception occurred
433            */
434            public static com.liferay.portal.model.PortletPreferences findByP_P_Last(
435                    long plid, java.lang.String portletId,
436                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
437                    throws com.liferay.portal.NoSuchPortletPreferencesException,
438                            com.liferay.portal.kernel.exception.SystemException {
439                    return getPersistence()
440                                       .findByP_P_Last(plid, portletId, orderByComparator);
441            }
442    
443            /**
444            * Returns the last portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
445            *
446            * @param plid the plid
447            * @param portletId the portlet ID
448            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
449            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
450            * @throws SystemException if a system exception occurred
451            */
452            public static com.liferay.portal.model.PortletPreferences fetchByP_P_Last(
453                    long plid, java.lang.String portletId,
454                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
455                    throws com.liferay.portal.kernel.exception.SystemException {
456                    return getPersistence()
457                                       .fetchByP_P_Last(plid, portletId, orderByComparator);
458            }
459    
460            /**
461            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
462            *
463            * @param portletPreferencesId the primary key of the current portlet preferences
464            * @param plid the plid
465            * @param portletId the portlet ID
466            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
467            * @return the previous, current, and next portlet preferences
468            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
469            * @throws SystemException if a system exception occurred
470            */
471            public static com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
472                    long portletPreferencesId, long plid, java.lang.String portletId,
473                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
474                    throws com.liferay.portal.NoSuchPortletPreferencesException,
475                            com.liferay.portal.kernel.exception.SystemException {
476                    return getPersistence()
477                                       .findByP_P_PrevAndNext(portletPreferencesId, plid,
478                            portletId, orderByComparator);
479            }
480    
481            /**
482            * Returns all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
483            *
484            * @param ownerId the owner ID
485            * @param ownerType the owner type
486            * @param plid the plid
487            * @return the matching portlet preferenceses
488            * @throws SystemException if a system exception occurred
489            */
490            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
491                    long ownerId, int ownerType, long plid)
492                    throws com.liferay.portal.kernel.exception.SystemException {
493                    return getPersistence().findByO_O_P(ownerId, ownerType, plid);
494            }
495    
496            /**
497            * Returns a range of all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
498            *
499            * <p>
500            * 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.
501            * </p>
502            *
503            * @param ownerId the owner ID
504            * @param ownerType the owner type
505            * @param plid the plid
506            * @param start the lower bound of the range of portlet preferenceses
507            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
508            * @return the range of matching portlet preferenceses
509            * @throws SystemException if a system exception occurred
510            */
511            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
512                    long ownerId, int ownerType, long plid, int start, int end)
513                    throws com.liferay.portal.kernel.exception.SystemException {
514                    return getPersistence().findByO_O_P(ownerId, ownerType, plid, start, end);
515            }
516    
517            /**
518            * Returns an ordered range of all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#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 ownerId the owner ID
525            * @param ownerType the owner type
526            * @param plid the plid
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 static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
534                    long ownerId, int ownerType, long plid, int start, int end,
535                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
536                    throws com.liferay.portal.kernel.exception.SystemException {
537                    return getPersistence()
538                                       .findByO_O_P(ownerId, ownerType, plid, start, end,
539                            orderByComparator);
540            }
541    
542            /**
543            * Returns the first portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
544            *
545            * @param ownerId the owner ID
546            * @param ownerType the owner type
547            * @param plid the plid
548            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
549            * @return the first matching portlet preferences
550            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
551            * @throws SystemException if a system exception occurred
552            */
553            public static com.liferay.portal.model.PortletPreferences findByO_O_P_First(
554                    long ownerId, int ownerType, long plid,
555                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
556                    throws com.liferay.portal.NoSuchPortletPreferencesException,
557                            com.liferay.portal.kernel.exception.SystemException {
558                    return getPersistence()
559                                       .findByO_O_P_First(ownerId, ownerType, plid,
560                            orderByComparator);
561            }
562    
563            /**
564            * Returns the first portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
565            *
566            * @param ownerId the owner ID
567            * @param ownerType the owner type
568            * @param plid the plid
569            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
570            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
571            * @throws SystemException if a system exception occurred
572            */
573            public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_First(
574                    long ownerId, int ownerType, long plid,
575                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
576                    throws com.liferay.portal.kernel.exception.SystemException {
577                    return getPersistence()
578                                       .fetchByO_O_P_First(ownerId, ownerType, plid,
579                            orderByComparator);
580            }
581    
582            /**
583            * Returns the last portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
584            *
585            * @param ownerId the owner ID
586            * @param ownerType the owner type
587            * @param plid the plid
588            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
589            * @return the last matching portlet preferences
590            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
591            * @throws SystemException if a system exception occurred
592            */
593            public static com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
594                    long ownerId, int ownerType, long plid,
595                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
596                    throws com.liferay.portal.NoSuchPortletPreferencesException,
597                            com.liferay.portal.kernel.exception.SystemException {
598                    return getPersistence()
599                                       .findByO_O_P_Last(ownerId, ownerType, plid, orderByComparator);
600            }
601    
602            /**
603            * Returns the last portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
604            *
605            * @param ownerId the owner ID
606            * @param ownerType the owner type
607            * @param plid the plid
608            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
609            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
610            * @throws SystemException if a system exception occurred
611            */
612            public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_Last(
613                    long ownerId, int ownerType, long plid,
614                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    return getPersistence()
617                                       .fetchByO_O_P_Last(ownerId, ownerType, plid,
618                            orderByComparator);
619            }
620    
621            /**
622            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
623            *
624            * @param portletPreferencesId the primary key of the current portlet preferences
625            * @param ownerId the owner ID
626            * @param ownerType the owner type
627            * @param plid the plid
628            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
629            * @return the previous, current, and next portlet preferences
630            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
631            * @throws SystemException if a system exception occurred
632            */
633            public static com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
634                    long portletPreferencesId, long ownerId, int ownerType, long plid,
635                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
636                    throws com.liferay.portal.NoSuchPortletPreferencesException,
637                            com.liferay.portal.kernel.exception.SystemException {
638                    return getPersistence()
639                                       .findByO_O_P_PrevAndNext(portletPreferencesId, ownerId,
640                            ownerType, plid, orderByComparator);
641            }
642    
643            /**
644            * Returns all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
645            *
646            * @param ownerType the owner type
647            * @param plid the plid
648            * @param portletId the portlet ID
649            * @return the matching portlet preferenceses
650            * @throws SystemException if a system exception occurred
651            */
652            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_P_P(
653                    int ownerType, long plid, java.lang.String portletId)
654                    throws com.liferay.portal.kernel.exception.SystemException {
655                    return getPersistence().findByO_P_P(ownerType, plid, portletId);
656            }
657    
658            /**
659            * Returns a range of all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
660            *
661            * <p>
662            * 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.
663            * </p>
664            *
665            * @param ownerType the owner type
666            * @param plid the plid
667            * @param portletId the portlet ID
668            * @param start the lower bound of the range of portlet preferenceses
669            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
670            * @return the range of matching portlet preferenceses
671            * @throws SystemException if a system exception occurred
672            */
673            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_P_P(
674                    int ownerType, long plid, java.lang.String portletId, int start, int end)
675                    throws com.liferay.portal.kernel.exception.SystemException {
676                    return getPersistence()
677                                       .findByO_P_P(ownerType, plid, portletId, start, end);
678            }
679    
680            /**
681            * Returns an ordered range of all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
682            *
683            * <p>
684            * 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.
685            * </p>
686            *
687            * @param ownerType the owner type
688            * @param plid the plid
689            * @param portletId the portlet ID
690            * @param start the lower bound of the range of portlet preferenceses
691            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
692            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
693            * @return the ordered range of matching portlet preferenceses
694            * @throws SystemException if a system exception occurred
695            */
696            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_P_P(
697                    int ownerType, long plid, java.lang.String portletId, int start,
698                    int end,
699                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
700                    throws com.liferay.portal.kernel.exception.SystemException {
701                    return getPersistence()
702                                       .findByO_P_P(ownerType, plid, portletId, start, end,
703                            orderByComparator);
704            }
705    
706            /**
707            * Returns the first portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
708            *
709            * @param ownerType the owner type
710            * @param plid the plid
711            * @param portletId the portlet ID
712            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
713            * @return the first matching portlet preferences
714            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
715            * @throws SystemException if a system exception occurred
716            */
717            public static com.liferay.portal.model.PortletPreferences findByO_P_P_First(
718                    int ownerType, long plid, java.lang.String portletId,
719                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
720                    throws com.liferay.portal.NoSuchPortletPreferencesException,
721                            com.liferay.portal.kernel.exception.SystemException {
722                    return getPersistence()
723                                       .findByO_P_P_First(ownerType, plid, portletId,
724                            orderByComparator);
725            }
726    
727            /**
728            * Returns the first portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
729            *
730            * @param ownerType the owner type
731            * @param plid the plid
732            * @param portletId the portlet ID
733            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
734            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
735            * @throws SystemException if a system exception occurred
736            */
737            public static com.liferay.portal.model.PortletPreferences fetchByO_P_P_First(
738                    int ownerType, long plid, java.lang.String portletId,
739                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
740                    throws com.liferay.portal.kernel.exception.SystemException {
741                    return getPersistence()
742                                       .fetchByO_P_P_First(ownerType, plid, portletId,
743                            orderByComparator);
744            }
745    
746            /**
747            * Returns the last portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
748            *
749            * @param ownerType the owner type
750            * @param plid the plid
751            * @param portletId the portlet ID
752            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
753            * @return the last matching portlet preferences
754            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
755            * @throws SystemException if a system exception occurred
756            */
757            public static com.liferay.portal.model.PortletPreferences findByO_P_P_Last(
758                    int ownerType, long plid, java.lang.String portletId,
759                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
760                    throws com.liferay.portal.NoSuchPortletPreferencesException,
761                            com.liferay.portal.kernel.exception.SystemException {
762                    return getPersistence()
763                                       .findByO_P_P_Last(ownerType, plid, portletId,
764                            orderByComparator);
765            }
766    
767            /**
768            * Returns the last portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
769            *
770            * @param ownerType the owner type
771            * @param plid the plid
772            * @param portletId the portlet ID
773            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
774            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
775            * @throws SystemException if a system exception occurred
776            */
777            public static com.liferay.portal.model.PortletPreferences fetchByO_P_P_Last(
778                    int ownerType, long plid, java.lang.String portletId,
779                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
780                    throws com.liferay.portal.kernel.exception.SystemException {
781                    return getPersistence()
782                                       .fetchByO_P_P_Last(ownerType, plid, portletId,
783                            orderByComparator);
784            }
785    
786            /**
787            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
788            *
789            * @param portletPreferencesId the primary key of the current portlet preferences
790            * @param ownerType the owner type
791            * @param plid the plid
792            * @param portletId the portlet ID
793            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
794            * @return the previous, current, and next portlet preferences
795            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
796            * @throws SystemException if a system exception occurred
797            */
798            public static com.liferay.portal.model.PortletPreferences[] findByO_P_P_PrevAndNext(
799                    long portletPreferencesId, int ownerType, long plid,
800                    java.lang.String portletId,
801                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
802                    throws com.liferay.portal.NoSuchPortletPreferencesException,
803                            com.liferay.portal.kernel.exception.SystemException {
804                    return getPersistence()
805                                       .findByO_P_P_PrevAndNext(portletPreferencesId, ownerType,
806                            plid, portletId, orderByComparator);
807            }
808    
809            /**
810            * 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.
811            *
812            * @param ownerId the owner ID
813            * @param ownerType the owner type
814            * @param plid the plid
815            * @param portletId the portlet ID
816            * @return the matching portlet preferences
817            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
818            * @throws SystemException if a system exception occurred
819            */
820            public static com.liferay.portal.model.PortletPreferences findByO_O_P_P(
821                    long ownerId, int ownerType, long plid, java.lang.String portletId)
822                    throws com.liferay.portal.NoSuchPortletPreferencesException,
823                            com.liferay.portal.kernel.exception.SystemException {
824                    return getPersistence()
825                                       .findByO_O_P_P(ownerId, ownerType, plid, portletId);
826            }
827    
828            /**
829            * 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.
830            *
831            * @param ownerId the owner ID
832            * @param ownerType the owner type
833            * @param plid the plid
834            * @param portletId the portlet ID
835            * @return the matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
836            * @throws SystemException if a system exception occurred
837            */
838            public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
839                    long ownerId, int ownerType, long plid, java.lang.String portletId)
840                    throws com.liferay.portal.kernel.exception.SystemException {
841                    return getPersistence()
842                                       .fetchByO_O_P_P(ownerId, ownerType, plid, portletId);
843            }
844    
845            /**
846            * 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.
847            *
848            * @param ownerId the owner ID
849            * @param ownerType the owner type
850            * @param plid the plid
851            * @param portletId the portlet ID
852            * @param retrieveFromCache whether to use the finder cache
853            * @return the matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
854            * @throws SystemException if a system exception occurred
855            */
856            public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
857                    long ownerId, int ownerType, long plid, java.lang.String portletId,
858                    boolean retrieveFromCache)
859                    throws com.liferay.portal.kernel.exception.SystemException {
860                    return getPersistence()
861                                       .fetchByO_O_P_P(ownerId, ownerType, plid, portletId,
862                            retrieveFromCache);
863            }
864    
865            /**
866            * Returns all the portlet preferenceses.
867            *
868            * @return the portlet preferenceses
869            * @throws SystemException if a system exception occurred
870            */
871            public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
872                    throws com.liferay.portal.kernel.exception.SystemException {
873                    return getPersistence().findAll();
874            }
875    
876            /**
877            * Returns a range of all the portlet preferenceses.
878            *
879            * <p>
880            * 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.
881            * </p>
882            *
883            * @param start the lower bound of the range of portlet preferenceses
884            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
885            * @return the range of portlet preferenceses
886            * @throws SystemException if a system exception occurred
887            */
888            public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
889                    int start, int end)
890                    throws com.liferay.portal.kernel.exception.SystemException {
891                    return getPersistence().findAll(start, end);
892            }
893    
894            /**
895            * Returns an ordered range of all the portlet preferenceses.
896            *
897            * <p>
898            * 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.
899            * </p>
900            *
901            * @param start the lower bound of the range of portlet preferenceses
902            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
903            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
904            * @return the ordered range of portlet preferenceses
905            * @throws SystemException if a system exception occurred
906            */
907            public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
908                    int start, int end,
909                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
910                    throws com.liferay.portal.kernel.exception.SystemException {
911                    return getPersistence().findAll(start, end, orderByComparator);
912            }
913    
914            /**
915            * Removes all the portlet preferenceses where plid = &#63; from the database.
916            *
917            * @param plid the plid
918            * @throws SystemException if a system exception occurred
919            */
920            public static void removeByPlid(long plid)
921                    throws com.liferay.portal.kernel.exception.SystemException {
922                    getPersistence().removeByPlid(plid);
923            }
924    
925            /**
926            * Removes all the portlet preferenceses where plid = &#63; and portletId = &#63; from the database.
927            *
928            * @param plid the plid
929            * @param portletId the portlet ID
930            * @throws SystemException if a system exception occurred
931            */
932            public static void removeByP_P(long plid, java.lang.String portletId)
933                    throws com.liferay.portal.kernel.exception.SystemException {
934                    getPersistence().removeByP_P(plid, portletId);
935            }
936    
937            /**
938            * Removes all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63; from the database.
939            *
940            * @param ownerId the owner ID
941            * @param ownerType the owner type
942            * @param plid the plid
943            * @throws SystemException if a system exception occurred
944            */
945            public static void removeByO_O_P(long ownerId, int ownerType, long plid)
946                    throws com.liferay.portal.kernel.exception.SystemException {
947                    getPersistence().removeByO_O_P(ownerId, ownerType, plid);
948            }
949    
950            /**
951            * Removes all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63; from the database.
952            *
953            * @param ownerType the owner type
954            * @param plid the plid
955            * @param portletId the portlet ID
956            * @throws SystemException if a system exception occurred
957            */
958            public static void removeByO_P_P(int ownerType, long plid,
959                    java.lang.String portletId)
960                    throws com.liferay.portal.kernel.exception.SystemException {
961                    getPersistence().removeByO_P_P(ownerType, plid, portletId);
962            }
963    
964            /**
965            * Removes the portlet preferences where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63; from the database.
966            *
967            * @param ownerId the owner ID
968            * @param ownerType the owner type
969            * @param plid the plid
970            * @param portletId the portlet ID
971            * @return the portlet preferences that was removed
972            * @throws SystemException if a system exception occurred
973            */
974            public static com.liferay.portal.model.PortletPreferences removeByO_O_P_P(
975                    long ownerId, int ownerType, long plid, java.lang.String portletId)
976                    throws com.liferay.portal.NoSuchPortletPreferencesException,
977                            com.liferay.portal.kernel.exception.SystemException {
978                    return getPersistence()
979                                       .removeByO_O_P_P(ownerId, ownerType, plid, portletId);
980            }
981    
982            /**
983            * Removes all the portlet preferenceses from the database.
984            *
985            * @throws SystemException if a system exception occurred
986            */
987            public static void removeAll()
988                    throws com.liferay.portal.kernel.exception.SystemException {
989                    getPersistence().removeAll();
990            }
991    
992            /**
993            * Returns the number of portlet preferenceses where plid = &#63;.
994            *
995            * @param plid the plid
996            * @return the number of matching portlet preferenceses
997            * @throws SystemException if a system exception occurred
998            */
999            public static int countByPlid(long plid)
1000                    throws com.liferay.portal.kernel.exception.SystemException {
1001                    return getPersistence().countByPlid(plid);
1002            }
1003    
1004            /**
1005            * Returns the number of portlet preferenceses where plid = &#63; and portletId = &#63;.
1006            *
1007            * @param plid the plid
1008            * @param portletId the portlet ID
1009            * @return the number of matching portlet preferenceses
1010            * @throws SystemException if a system exception occurred
1011            */
1012            public static int countByP_P(long plid, java.lang.String portletId)
1013                    throws com.liferay.portal.kernel.exception.SystemException {
1014                    return getPersistence().countByP_P(plid, portletId);
1015            }
1016    
1017            /**
1018            * Returns the number of portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
1019            *
1020            * @param ownerId the owner ID
1021            * @param ownerType the owner type
1022            * @param plid the plid
1023            * @return the number of matching portlet preferenceses
1024            * @throws SystemException if a system exception occurred
1025            */
1026            public static int countByO_O_P(long ownerId, int ownerType, long plid)
1027                    throws com.liferay.portal.kernel.exception.SystemException {
1028                    return getPersistence().countByO_O_P(ownerId, ownerType, plid);
1029            }
1030    
1031            /**
1032            * Returns the number of portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
1033            *
1034            * @param ownerType the owner type
1035            * @param plid the plid
1036            * @param portletId the portlet ID
1037            * @return the number of matching portlet preferenceses
1038            * @throws SystemException if a system exception occurred
1039            */
1040            public static int countByO_P_P(int ownerType, long plid,
1041                    java.lang.String portletId)
1042                    throws com.liferay.portal.kernel.exception.SystemException {
1043                    return getPersistence().countByO_P_P(ownerType, plid, portletId);
1044            }
1045    
1046            /**
1047            * Returns the number of portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63;.
1048            *
1049            * @param ownerId the owner ID
1050            * @param ownerType the owner type
1051            * @param plid the plid
1052            * @param portletId the portlet ID
1053            * @return the number of matching portlet preferenceses
1054            * @throws SystemException if a system exception occurred
1055            */
1056            public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
1057                    java.lang.String portletId)
1058                    throws com.liferay.portal.kernel.exception.SystemException {
1059                    return getPersistence()
1060                                       .countByO_O_P_P(ownerId, ownerType, plid, portletId);
1061            }
1062    
1063            /**
1064            * Returns the number of portlet preferenceses.
1065            *
1066            * @return the number of portlet preferenceses
1067            * @throws SystemException if a system exception occurred
1068            */
1069            public static int countAll()
1070                    throws com.liferay.portal.kernel.exception.SystemException {
1071                    return getPersistence().countAll();
1072            }
1073    
1074            public static PortletPreferencesPersistence getPersistence() {
1075                    if (_persistence == null) {
1076                            _persistence = (PortletPreferencesPersistence)PortalBeanLocatorUtil.locate(PortletPreferencesPersistence.class.getName());
1077    
1078                            ReferenceRegistry.registerReference(PortletPreferencesUtil.class,
1079                                    "_persistence");
1080                    }
1081    
1082                    return _persistence;
1083            }
1084    
1085            /**
1086             * @deprecated
1087             */
1088            public void setPersistence(PortletPreferencesPersistence persistence) {
1089            }
1090    
1091            private static PortletPreferencesPersistence _persistence;
1092    }