001    /**
002     * Copyright (c) 2000-2012 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.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            * <p>
251            * 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.
252            * </p>
253            *
254            * @param plid the plid
255            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
256            * @return the first matching portlet preferences
257            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
258            * @throws SystemException if a system exception occurred
259            */
260            public static com.liferay.portal.model.PortletPreferences findByPlid_First(
261                    long plid,
262                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
263                    throws com.liferay.portal.NoSuchPortletPreferencesException,
264                            com.liferay.portal.kernel.exception.SystemException {
265                    return getPersistence().findByPlid_First(plid, orderByComparator);
266            }
267    
268            /**
269            * Returns the last portlet preferences in the ordered set where plid = &#63;.
270            *
271            * <p>
272            * 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.
273            * </p>
274            *
275            * @param plid the plid
276            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
277            * @return the last matching portlet preferences
278            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
279            * @throws SystemException if a system exception occurred
280            */
281            public static com.liferay.portal.model.PortletPreferences findByPlid_Last(
282                    long plid,
283                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
284                    throws com.liferay.portal.NoSuchPortletPreferencesException,
285                            com.liferay.portal.kernel.exception.SystemException {
286                    return getPersistence().findByPlid_Last(plid, orderByComparator);
287            }
288    
289            /**
290            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where plid = &#63;.
291            *
292            * <p>
293            * 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.
294            * </p>
295            *
296            * @param portletPreferencesId the primary key of the current portlet preferences
297            * @param plid the plid
298            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
299            * @return the previous, current, and next portlet preferences
300            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
301            * @throws SystemException if a system exception occurred
302            */
303            public static com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
304                    long portletPreferencesId, long plid,
305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
306                    throws com.liferay.portal.NoSuchPortletPreferencesException,
307                            com.liferay.portal.kernel.exception.SystemException {
308                    return getPersistence()
309                                       .findByPlid_PrevAndNext(portletPreferencesId, plid,
310                            orderByComparator);
311            }
312    
313            /**
314            * Returns all the portlet preferenceses where plid = &#63; and portletId = &#63;.
315            *
316            * @param plid the plid
317            * @param portletId the portlet ID
318            * @return the matching portlet preferenceses
319            * @throws SystemException if a system exception occurred
320            */
321            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
322                    long plid, java.lang.String portletId)
323                    throws com.liferay.portal.kernel.exception.SystemException {
324                    return getPersistence().findByP_P(plid, portletId);
325            }
326    
327            /**
328            * Returns a range of all the portlet preferenceses where plid = &#63; and portletId = &#63;.
329            *
330            * <p>
331            * 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.
332            * </p>
333            *
334            * @param plid the plid
335            * @param portletId the portlet ID
336            * @param start the lower bound of the range of portlet preferenceses
337            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
338            * @return the range of matching portlet preferenceses
339            * @throws SystemException if a system exception occurred
340            */
341            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
342                    long plid, java.lang.String portletId, int start, int end)
343                    throws com.liferay.portal.kernel.exception.SystemException {
344                    return getPersistence().findByP_P(plid, portletId, start, end);
345            }
346    
347            /**
348            * Returns an ordered range of all the portlet preferenceses where plid = &#63; and portletId = &#63;.
349            *
350            * <p>
351            * 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.
352            * </p>
353            *
354            * @param plid the plid
355            * @param portletId the portlet ID
356            * @param start the lower bound of the range of portlet preferenceses
357            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
358            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
359            * @return the ordered range of matching portlet preferenceses
360            * @throws SystemException if a system exception occurred
361            */
362            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
363                    long plid, java.lang.String portletId, int start, int end,
364                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
365                    throws com.liferay.portal.kernel.exception.SystemException {
366                    return getPersistence()
367                                       .findByP_P(plid, portletId, start, end, orderByComparator);
368            }
369    
370            /**
371            * Returns the first portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
372            *
373            * <p>
374            * 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.
375            * </p>
376            *
377            * @param plid the plid
378            * @param portletId the portlet ID
379            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
380            * @return the first matching portlet preferences
381            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
382            * @throws SystemException if a system exception occurred
383            */
384            public static com.liferay.portal.model.PortletPreferences findByP_P_First(
385                    long plid, java.lang.String portletId,
386                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
387                    throws com.liferay.portal.NoSuchPortletPreferencesException,
388                            com.liferay.portal.kernel.exception.SystemException {
389                    return getPersistence()
390                                       .findByP_P_First(plid, portletId, orderByComparator);
391            }
392    
393            /**
394            * Returns the last portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
395            *
396            * <p>
397            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
398            * </p>
399            *
400            * @param plid the plid
401            * @param portletId the portlet ID
402            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
403            * @return the last matching portlet preferences
404            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
405            * @throws SystemException if a system exception occurred
406            */
407            public static com.liferay.portal.model.PortletPreferences findByP_P_Last(
408                    long plid, java.lang.String portletId,
409                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
410                    throws com.liferay.portal.NoSuchPortletPreferencesException,
411                            com.liferay.portal.kernel.exception.SystemException {
412                    return getPersistence()
413                                       .findByP_P_Last(plid, portletId, orderByComparator);
414            }
415    
416            /**
417            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
418            *
419            * <p>
420            * 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.
421            * </p>
422            *
423            * @param portletPreferencesId the primary key of the current portlet preferences
424            * @param plid the plid
425            * @param portletId the portlet ID
426            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
427            * @return the previous, current, and next portlet preferences
428            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
429            * @throws SystemException if a system exception occurred
430            */
431            public static com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
432                    long portletPreferencesId, long plid, java.lang.String portletId,
433                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
434                    throws com.liferay.portal.NoSuchPortletPreferencesException,
435                            com.liferay.portal.kernel.exception.SystemException {
436                    return getPersistence()
437                                       .findByP_P_PrevAndNext(portletPreferencesId, plid,
438                            portletId, orderByComparator);
439            }
440    
441            /**
442            * Returns all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
443            *
444            * @param ownerId the owner ID
445            * @param ownerType the owner type
446            * @param plid the plid
447            * @return the matching portlet preferenceses
448            * @throws SystemException if a system exception occurred
449            */
450            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
451                    long ownerId, int ownerType, long plid)
452                    throws com.liferay.portal.kernel.exception.SystemException {
453                    return getPersistence().findByO_O_P(ownerId, ownerType, plid);
454            }
455    
456            /**
457            * Returns a range of all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
458            *
459            * <p>
460            * 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.
461            * </p>
462            *
463            * @param ownerId the owner ID
464            * @param ownerType the owner type
465            * @param plid the plid
466            * @param start the lower bound of the range of portlet preferenceses
467            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
468            * @return the range of matching portlet preferenceses
469            * @throws SystemException if a system exception occurred
470            */
471            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
472                    long ownerId, int ownerType, long plid, int start, int end)
473                    throws com.liferay.portal.kernel.exception.SystemException {
474                    return getPersistence().findByO_O_P(ownerId, ownerType, plid, start, end);
475            }
476    
477            /**
478            * Returns an ordered range of all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
479            *
480            * <p>
481            * 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.
482            * </p>
483            *
484            * @param ownerId the owner ID
485            * @param ownerType the owner type
486            * @param plid the plid
487            * @param start the lower bound of the range of portlet preferenceses
488            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
489            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
490            * @return the ordered range of matching portlet preferenceses
491            * @throws SystemException if a system exception occurred
492            */
493            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
494                    long ownerId, int ownerType, long plid, int start, int end,
495                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
496                    throws com.liferay.portal.kernel.exception.SystemException {
497                    return getPersistence()
498                                       .findByO_O_P(ownerId, ownerType, plid, start, end,
499                            orderByComparator);
500            }
501    
502            /**
503            * Returns the first portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
504            *
505            * <p>
506            * 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.
507            * </p>
508            *
509            * @param ownerId the owner ID
510            * @param ownerType the owner type
511            * @param plid the plid
512            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
513            * @return the first matching portlet preferences
514            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
515            * @throws SystemException if a system exception occurred
516            */
517            public static com.liferay.portal.model.PortletPreferences findByO_O_P_First(
518                    long ownerId, int ownerType, long plid,
519                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
520                    throws com.liferay.portal.NoSuchPortletPreferencesException,
521                            com.liferay.portal.kernel.exception.SystemException {
522                    return getPersistence()
523                                       .findByO_O_P_First(ownerId, ownerType, plid,
524                            orderByComparator);
525            }
526    
527            /**
528            * Returns the last portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
529            *
530            * <p>
531            * 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.
532            * </p>
533            *
534            * @param ownerId the owner ID
535            * @param ownerType the owner type
536            * @param plid the plid
537            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
538            * @return the last matching portlet preferences
539            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
540            * @throws SystemException if a system exception occurred
541            */
542            public static com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
543                    long ownerId, int ownerType, long plid,
544                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
545                    throws com.liferay.portal.NoSuchPortletPreferencesException,
546                            com.liferay.portal.kernel.exception.SystemException {
547                    return getPersistence()
548                                       .findByO_O_P_Last(ownerId, ownerType, plid, orderByComparator);
549            }
550    
551            /**
552            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
553            *
554            * <p>
555            * 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.
556            * </p>
557            *
558            * @param portletPreferencesId the primary key of the current portlet preferences
559            * @param ownerId the owner ID
560            * @param ownerType the owner type
561            * @param plid the plid
562            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
563            * @return the previous, current, and next portlet preferences
564            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
565            * @throws SystemException if a system exception occurred
566            */
567            public static com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
568                    long portletPreferencesId, long ownerId, int ownerType, long plid,
569                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
570                    throws com.liferay.portal.NoSuchPortletPreferencesException,
571                            com.liferay.portal.kernel.exception.SystemException {
572                    return getPersistence()
573                                       .findByO_O_P_PrevAndNext(portletPreferencesId, ownerId,
574                            ownerType, plid, orderByComparator);
575            }
576    
577            /**
578            * Returns all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
579            *
580            * @param ownerType the owner type
581            * @param plid the plid
582            * @param portletId the portlet ID
583            * @return the matching portlet preferenceses
584            * @throws SystemException if a system exception occurred
585            */
586            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_P_P(
587                    int ownerType, long plid, java.lang.String portletId)
588                    throws com.liferay.portal.kernel.exception.SystemException {
589                    return getPersistence().findByO_P_P(ownerType, plid, portletId);
590            }
591    
592            /**
593            * Returns a range of all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
594            *
595            * <p>
596            * 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.
597            * </p>
598            *
599            * @param ownerType the owner type
600            * @param plid the plid
601            * @param portletId the portlet ID
602            * @param start the lower bound of the range of portlet preferenceses
603            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
604            * @return the range of matching portlet preferenceses
605            * @throws SystemException if a system exception occurred
606            */
607            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_P_P(
608                    int ownerType, long plid, java.lang.String portletId, int start, int end)
609                    throws com.liferay.portal.kernel.exception.SystemException {
610                    return getPersistence()
611                                       .findByO_P_P(ownerType, plid, portletId, start, end);
612            }
613    
614            /**
615            * Returns an ordered range of all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
616            *
617            * <p>
618            * 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.
619            * </p>
620            *
621            * @param ownerType the owner type
622            * @param plid the plid
623            * @param portletId the portlet ID
624            * @param start the lower bound of the range of portlet preferenceses
625            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
626            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
627            * @return the ordered range of matching portlet preferenceses
628            * @throws SystemException if a system exception occurred
629            */
630            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_P_P(
631                    int ownerType, long plid, java.lang.String portletId, int start,
632                    int end,
633                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
634                    throws com.liferay.portal.kernel.exception.SystemException {
635                    return getPersistence()
636                                       .findByO_P_P(ownerType, plid, portletId, start, end,
637                            orderByComparator);
638            }
639    
640            /**
641            * Returns the first portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
642            *
643            * <p>
644            * 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.
645            * </p>
646            *
647            * @param ownerType the owner type
648            * @param plid the plid
649            * @param portletId the portlet ID
650            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
651            * @return the first matching portlet preferences
652            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
653            * @throws SystemException if a system exception occurred
654            */
655            public static com.liferay.portal.model.PortletPreferences findByO_P_P_First(
656                    int ownerType, long plid, java.lang.String portletId,
657                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
658                    throws com.liferay.portal.NoSuchPortletPreferencesException,
659                            com.liferay.portal.kernel.exception.SystemException {
660                    return getPersistence()
661                                       .findByO_P_P_First(ownerType, plid, portletId,
662                            orderByComparator);
663            }
664    
665            /**
666            * Returns the last portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
667            *
668            * <p>
669            * 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.
670            * </p>
671            *
672            * @param ownerType the owner type
673            * @param plid the plid
674            * @param portletId the portlet ID
675            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
676            * @return the last matching portlet preferences
677            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
678            * @throws SystemException if a system exception occurred
679            */
680            public static com.liferay.portal.model.PortletPreferences findByO_P_P_Last(
681                    int ownerType, long plid, java.lang.String portletId,
682                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
683                    throws com.liferay.portal.NoSuchPortletPreferencesException,
684                            com.liferay.portal.kernel.exception.SystemException {
685                    return getPersistence()
686                                       .findByO_P_P_Last(ownerType, plid, portletId,
687                            orderByComparator);
688            }
689    
690            /**
691            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
692            *
693            * <p>
694            * 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.
695            * </p>
696            *
697            * @param portletPreferencesId the primary key of the current portlet preferences
698            * @param ownerType the owner type
699            * @param plid the plid
700            * @param portletId the portlet ID
701            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
702            * @return the previous, current, and next portlet preferences
703            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
704            * @throws SystemException if a system exception occurred
705            */
706            public static com.liferay.portal.model.PortletPreferences[] findByO_P_P_PrevAndNext(
707                    long portletPreferencesId, int ownerType, long plid,
708                    java.lang.String portletId,
709                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
710                    throws com.liferay.portal.NoSuchPortletPreferencesException,
711                            com.liferay.portal.kernel.exception.SystemException {
712                    return getPersistence()
713                                       .findByO_P_P_PrevAndNext(portletPreferencesId, ownerType,
714                            plid, portletId, orderByComparator);
715            }
716    
717            /**
718            * 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.
719            *
720            * @param ownerId the owner ID
721            * @param ownerType the owner type
722            * @param plid the plid
723            * @param portletId the portlet ID
724            * @return the matching portlet preferences
725            * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found
726            * @throws SystemException if a system exception occurred
727            */
728            public static com.liferay.portal.model.PortletPreferences findByO_O_P_P(
729                    long ownerId, int ownerType, long plid, java.lang.String portletId)
730                    throws com.liferay.portal.NoSuchPortletPreferencesException,
731                            com.liferay.portal.kernel.exception.SystemException {
732                    return getPersistence()
733                                       .findByO_O_P_P(ownerId, ownerType, plid, portletId);
734            }
735    
736            /**
737            * 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.
738            *
739            * @param ownerId the owner ID
740            * @param ownerType the owner type
741            * @param plid the plid
742            * @param portletId the portlet ID
743            * @return the matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
744            * @throws SystemException if a system exception occurred
745            */
746            public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
747                    long ownerId, int ownerType, long plid, java.lang.String portletId)
748                    throws com.liferay.portal.kernel.exception.SystemException {
749                    return getPersistence()
750                                       .fetchByO_O_P_P(ownerId, ownerType, plid, portletId);
751            }
752    
753            /**
754            * 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.
755            *
756            * @param ownerId the owner ID
757            * @param ownerType the owner type
758            * @param plid the plid
759            * @param portletId the portlet ID
760            * @param retrieveFromCache whether to use the finder cache
761            * @return the matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
762            * @throws SystemException if a system exception occurred
763            */
764            public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
765                    long ownerId, int ownerType, long plid, java.lang.String portletId,
766                    boolean retrieveFromCache)
767                    throws com.liferay.portal.kernel.exception.SystemException {
768                    return getPersistence()
769                                       .fetchByO_O_P_P(ownerId, ownerType, plid, portletId,
770                            retrieveFromCache);
771            }
772    
773            /**
774            * Returns all the portlet preferenceses.
775            *
776            * @return the portlet preferenceses
777            * @throws SystemException if a system exception occurred
778            */
779            public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
780                    throws com.liferay.portal.kernel.exception.SystemException {
781                    return getPersistence().findAll();
782            }
783    
784            /**
785            * Returns a range of all the portlet preferenceses.
786            *
787            * <p>
788            * 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.
789            * </p>
790            *
791            * @param start the lower bound of the range of portlet preferenceses
792            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
793            * @return the range of portlet preferenceses
794            * @throws SystemException if a system exception occurred
795            */
796            public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
797                    int start, int end)
798                    throws com.liferay.portal.kernel.exception.SystemException {
799                    return getPersistence().findAll(start, end);
800            }
801    
802            /**
803            * Returns an ordered range of all the portlet preferenceses.
804            *
805            * <p>
806            * 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.
807            * </p>
808            *
809            * @param start the lower bound of the range of portlet preferenceses
810            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
811            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
812            * @return the ordered range of portlet preferenceses
813            * @throws SystemException if a system exception occurred
814            */
815            public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
816                    int start, int end,
817                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
818                    throws com.liferay.portal.kernel.exception.SystemException {
819                    return getPersistence().findAll(start, end, orderByComparator);
820            }
821    
822            /**
823            * Removes all the portlet preferenceses where plid = &#63; from the database.
824            *
825            * @param plid the plid
826            * @throws SystemException if a system exception occurred
827            */
828            public static void removeByPlid(long plid)
829                    throws com.liferay.portal.kernel.exception.SystemException {
830                    getPersistence().removeByPlid(plid);
831            }
832    
833            /**
834            * Removes all the portlet preferenceses where plid = &#63; and portletId = &#63; from the database.
835            *
836            * @param plid the plid
837            * @param portletId the portlet ID
838            * @throws SystemException if a system exception occurred
839            */
840            public static void removeByP_P(long plid, java.lang.String portletId)
841                    throws com.liferay.portal.kernel.exception.SystemException {
842                    getPersistence().removeByP_P(plid, portletId);
843            }
844    
845            /**
846            * Removes all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63; from the database.
847            *
848            * @param ownerId the owner ID
849            * @param ownerType the owner type
850            * @param plid the plid
851            * @throws SystemException if a system exception occurred
852            */
853            public static void removeByO_O_P(long ownerId, int ownerType, long plid)
854                    throws com.liferay.portal.kernel.exception.SystemException {
855                    getPersistence().removeByO_O_P(ownerId, ownerType, plid);
856            }
857    
858            /**
859            * Removes all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63; from the database.
860            *
861            * @param ownerType the owner type
862            * @param plid the plid
863            * @param portletId the portlet ID
864            * @throws SystemException if a system exception occurred
865            */
866            public static void removeByO_P_P(int ownerType, long plid,
867                    java.lang.String portletId)
868                    throws com.liferay.portal.kernel.exception.SystemException {
869                    getPersistence().removeByO_P_P(ownerType, plid, portletId);
870            }
871    
872            /**
873            * Removes the portlet preferences where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63; from the database.
874            *
875            * @param ownerId the owner ID
876            * @param ownerType the owner type
877            * @param plid the plid
878            * @param portletId the portlet ID
879            * @throws SystemException if a system exception occurred
880            */
881            public static void removeByO_O_P_P(long ownerId, int ownerType, long plid,
882                    java.lang.String portletId)
883                    throws com.liferay.portal.NoSuchPortletPreferencesException,
884                            com.liferay.portal.kernel.exception.SystemException {
885                    getPersistence().removeByO_O_P_P(ownerId, ownerType, plid, portletId);
886            }
887    
888            /**
889            * Removes all the portlet preferenceses from the database.
890            *
891            * @throws SystemException if a system exception occurred
892            */
893            public static void removeAll()
894                    throws com.liferay.portal.kernel.exception.SystemException {
895                    getPersistence().removeAll();
896            }
897    
898            /**
899            * Returns the number of portlet preferenceses where plid = &#63;.
900            *
901            * @param plid the plid
902            * @return the number of matching portlet preferenceses
903            * @throws SystemException if a system exception occurred
904            */
905            public static int countByPlid(long plid)
906                    throws com.liferay.portal.kernel.exception.SystemException {
907                    return getPersistence().countByPlid(plid);
908            }
909    
910            /**
911            * Returns the number of portlet preferenceses where plid = &#63; and portletId = &#63;.
912            *
913            * @param plid the plid
914            * @param portletId the portlet ID
915            * @return the number of matching portlet preferenceses
916            * @throws SystemException if a system exception occurred
917            */
918            public static int countByP_P(long plid, java.lang.String portletId)
919                    throws com.liferay.portal.kernel.exception.SystemException {
920                    return getPersistence().countByP_P(plid, portletId);
921            }
922    
923            /**
924            * Returns the number of portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
925            *
926            * @param ownerId the owner ID
927            * @param ownerType the owner type
928            * @param plid the plid
929            * @return the number of matching portlet preferenceses
930            * @throws SystemException if a system exception occurred
931            */
932            public static int countByO_O_P(long ownerId, int ownerType, long plid)
933                    throws com.liferay.portal.kernel.exception.SystemException {
934                    return getPersistence().countByO_O_P(ownerId, ownerType, plid);
935            }
936    
937            /**
938            * Returns the number of portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
939            *
940            * @param ownerType the owner type
941            * @param plid the plid
942            * @param portletId the portlet ID
943            * @return the number of matching portlet preferenceses
944            * @throws SystemException if a system exception occurred
945            */
946            public static int countByO_P_P(int ownerType, long plid,
947                    java.lang.String portletId)
948                    throws com.liferay.portal.kernel.exception.SystemException {
949                    return getPersistence().countByO_P_P(ownerType, plid, portletId);
950            }
951    
952            /**
953            * Returns the number of portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63;.
954            *
955            * @param ownerId the owner ID
956            * @param ownerType the owner type
957            * @param plid the plid
958            * @param portletId the portlet ID
959            * @return the number of matching portlet preferenceses
960            * @throws SystemException if a system exception occurred
961            */
962            public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
963                    java.lang.String portletId)
964                    throws com.liferay.portal.kernel.exception.SystemException {
965                    return getPersistence()
966                                       .countByO_O_P_P(ownerId, ownerType, plid, portletId);
967            }
968    
969            /**
970            * Returns the number of portlet preferenceses.
971            *
972            * @return the number of portlet preferenceses
973            * @throws SystemException if a system exception occurred
974            */
975            public static int countAll()
976                    throws com.liferay.portal.kernel.exception.SystemException {
977                    return getPersistence().countAll();
978            }
979    
980            public static PortletPreferencesPersistence getPersistence() {
981                    if (_persistence == null) {
982                            _persistence = (PortletPreferencesPersistence)PortalBeanLocatorUtil.locate(PortletPreferencesPersistence.class.getName());
983    
984                            ReferenceRegistry.registerReference(PortletPreferencesUtil.class,
985                                    "_persistence");
986                    }
987    
988                    return _persistence;
989            }
990    
991            public void setPersistence(PortletPreferencesPersistence persistence) {
992                    _persistence = persistence;
993    
994                    ReferenceRegistry.registerReference(PortletPreferencesUtil.class,
995                            "_persistence");
996            }
997    
998            private static PortletPreferencesPersistence _persistence;
999    }