001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.model.PortletPreferences;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the portlet preferences service. This utility wraps {@link com.liferay.portal.service.persistence.impl.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.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see PortletPreferencesPersistence
037     * @see com.liferay.portal.service.persistence.impl.PortletPreferencesPersistenceImpl
038     * @generated
039     */
040    @ProviderType
041    public class PortletPreferencesUtil {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
046             */
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
050             */
051            public static void clearCache() {
052                    getPersistence().clearCache();
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
057             */
058            public static void clearCache(PortletPreferences portletPreferences) {
059                    getPersistence().clearCache(portletPreferences);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<PortletPreferences> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<PortletPreferences> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end) {
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<PortletPreferences> orderByComparator) {
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)
098             */
099            public static PortletPreferences update(
100                    PortletPreferences portletPreferences) {
101                    return getPersistence().update(portletPreferences);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static PortletPreferences update(
108                    PortletPreferences portletPreferences, ServiceContext serviceContext) {
109                    return getPersistence().update(portletPreferences, serviceContext);
110            }
111    
112            /**
113            * Returns all the portlet preferenceses where plid = &#63;.
114            *
115            * @param plid the plid
116            * @return the matching portlet preferenceses
117            */
118            public static List<PortletPreferences> findByPlid(long plid) {
119                    return getPersistence().findByPlid(plid);
120            }
121    
122            /**
123            * Returns a range of all the portlet preferenceses where plid = &#63;.
124            *
125            * <p>
126            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
127            * </p>
128            *
129            * @param plid the plid
130            * @param start the lower bound of the range of portlet preferenceses
131            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
132            * @return the range of matching portlet preferenceses
133            */
134            public static List<PortletPreferences> findByPlid(long plid, int start,
135                    int end) {
136                    return getPersistence().findByPlid(plid, start, end);
137            }
138    
139            /**
140            * Returns an ordered range of all the portlet preferenceses where plid = &#63;.
141            *
142            * <p>
143            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
144            * </p>
145            *
146            * @param plid the plid
147            * @param start the lower bound of the range of portlet preferenceses
148            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
149            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
150            * @return the ordered range of matching portlet preferenceses
151            */
152            public static List<PortletPreferences> findByPlid(long plid, int start,
153                    int end, OrderByComparator<PortletPreferences> orderByComparator) {
154                    return getPersistence().findByPlid(plid, start, end, orderByComparator);
155            }
156    
157            /**
158            * Returns the first portlet preferences in the ordered set where plid = &#63;.
159            *
160            * @param plid the plid
161            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
162            * @return the first matching portlet preferences
163            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
164            */
165            public static PortletPreferences findByPlid_First(long plid,
166                    OrderByComparator<PortletPreferences> orderByComparator)
167                    throws com.liferay.portal.NoSuchPortletPreferencesException {
168                    return getPersistence().findByPlid_First(plid, orderByComparator);
169            }
170    
171            /**
172            * Returns the first portlet preferences in the ordered set where plid = &#63;.
173            *
174            * @param plid the plid
175            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
176            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
177            */
178            public static PortletPreferences fetchByPlid_First(long plid,
179                    OrderByComparator<PortletPreferences> orderByComparator) {
180                    return getPersistence().fetchByPlid_First(plid, orderByComparator);
181            }
182    
183            /**
184            * Returns the last portlet preferences in the ordered set where plid = &#63;.
185            *
186            * @param plid the plid
187            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
188            * @return the last matching portlet preferences
189            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
190            */
191            public static PortletPreferences findByPlid_Last(long plid,
192                    OrderByComparator<PortletPreferences> orderByComparator)
193                    throws com.liferay.portal.NoSuchPortletPreferencesException {
194                    return getPersistence().findByPlid_Last(plid, orderByComparator);
195            }
196    
197            /**
198            * Returns the last portlet preferences in the ordered set where plid = &#63;.
199            *
200            * @param plid the plid
201            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
202            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
203            */
204            public static PortletPreferences fetchByPlid_Last(long plid,
205                    OrderByComparator<PortletPreferences> orderByComparator) {
206                    return getPersistence().fetchByPlid_Last(plid, orderByComparator);
207            }
208    
209            /**
210            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where plid = &#63;.
211            *
212            * @param portletPreferencesId the primary key of the current portlet preferences
213            * @param plid the plid
214            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
215            * @return the previous, current, and next portlet preferences
216            * @throws NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
217            */
218            public static PortletPreferences[] findByPlid_PrevAndNext(
219                    long portletPreferencesId, long plid,
220                    OrderByComparator<PortletPreferences> orderByComparator)
221                    throws com.liferay.portal.NoSuchPortletPreferencesException {
222                    return getPersistence()
223                                       .findByPlid_PrevAndNext(portletPreferencesId, plid,
224                            orderByComparator);
225            }
226    
227            /**
228            * Removes all the portlet preferenceses where plid = &#63; from the database.
229            *
230            * @param plid the plid
231            */
232            public static void removeByPlid(long plid) {
233                    getPersistence().removeByPlid(plid);
234            }
235    
236            /**
237            * Returns the number of portlet preferenceses where plid = &#63;.
238            *
239            * @param plid the plid
240            * @return the number of matching portlet preferenceses
241            */
242            public static int countByPlid(long plid) {
243                    return getPersistence().countByPlid(plid);
244            }
245    
246            /**
247            * Returns all the portlet preferenceses where portletId = &#63;.
248            *
249            * @param portletId the portlet ID
250            * @return the matching portlet preferenceses
251            */
252            public static List<PortletPreferences> findByPortletId(
253                    java.lang.String portletId) {
254                    return getPersistence().findByPortletId(portletId);
255            }
256    
257            /**
258            * Returns a range of all the portlet preferenceses where portletId = &#63;.
259            *
260            * <p>
261            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
262            * </p>
263            *
264            * @param portletId the portlet ID
265            * @param start the lower bound of the range of portlet preferenceses
266            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
267            * @return the range of matching portlet preferenceses
268            */
269            public static List<PortletPreferences> findByPortletId(
270                    java.lang.String portletId, int start, int end) {
271                    return getPersistence().findByPortletId(portletId, start, end);
272            }
273    
274            /**
275            * Returns an ordered range of all the portlet preferenceses where portletId = &#63;.
276            *
277            * <p>
278            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
279            * </p>
280            *
281            * @param portletId the portlet ID
282            * @param start the lower bound of the range of portlet preferenceses
283            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
284            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
285            * @return the ordered range of matching portlet preferenceses
286            */
287            public static List<PortletPreferences> findByPortletId(
288                    java.lang.String portletId, int start, int end,
289                    OrderByComparator<PortletPreferences> orderByComparator) {
290                    return getPersistence()
291                                       .findByPortletId(portletId, start, end, orderByComparator);
292            }
293    
294            /**
295            * Returns the first portlet preferences in the ordered set where portletId = &#63;.
296            *
297            * @param portletId the portlet ID
298            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
299            * @return the first matching portlet preferences
300            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
301            */
302            public static PortletPreferences findByPortletId_First(
303                    java.lang.String portletId,
304                    OrderByComparator<PortletPreferences> orderByComparator)
305                    throws com.liferay.portal.NoSuchPortletPreferencesException {
306                    return getPersistence()
307                                       .findByPortletId_First(portletId, orderByComparator);
308            }
309    
310            /**
311            * Returns the first portlet preferences in the ordered set where portletId = &#63;.
312            *
313            * @param portletId the portlet ID
314            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
315            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
316            */
317            public static PortletPreferences fetchByPortletId_First(
318                    java.lang.String portletId,
319                    OrderByComparator<PortletPreferences> orderByComparator) {
320                    return getPersistence()
321                                       .fetchByPortletId_First(portletId, orderByComparator);
322            }
323    
324            /**
325            * Returns the last portlet preferences in the ordered set where portletId = &#63;.
326            *
327            * @param portletId the portlet ID
328            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
329            * @return the last matching portlet preferences
330            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
331            */
332            public static PortletPreferences findByPortletId_Last(
333                    java.lang.String portletId,
334                    OrderByComparator<PortletPreferences> orderByComparator)
335                    throws com.liferay.portal.NoSuchPortletPreferencesException {
336                    return getPersistence()
337                                       .findByPortletId_Last(portletId, orderByComparator);
338            }
339    
340            /**
341            * Returns the last portlet preferences in the ordered set where portletId = &#63;.
342            *
343            * @param portletId the portlet ID
344            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
345            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
346            */
347            public static PortletPreferences fetchByPortletId_Last(
348                    java.lang.String portletId,
349                    OrderByComparator<PortletPreferences> orderByComparator) {
350                    return getPersistence()
351                                       .fetchByPortletId_Last(portletId, orderByComparator);
352            }
353    
354            /**
355            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where portletId = &#63;.
356            *
357            * @param portletPreferencesId the primary key of the current portlet preferences
358            * @param portletId the portlet ID
359            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
360            * @return the previous, current, and next portlet preferences
361            * @throws NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
362            */
363            public static PortletPreferences[] findByPortletId_PrevAndNext(
364                    long portletPreferencesId, java.lang.String portletId,
365                    OrderByComparator<PortletPreferences> orderByComparator)
366                    throws com.liferay.portal.NoSuchPortletPreferencesException {
367                    return getPersistence()
368                                       .findByPortletId_PrevAndNext(portletPreferencesId,
369                            portletId, orderByComparator);
370            }
371    
372            /**
373            * Removes all the portlet preferenceses where portletId = &#63; from the database.
374            *
375            * @param portletId the portlet ID
376            */
377            public static void removeByPortletId(java.lang.String portletId) {
378                    getPersistence().removeByPortletId(portletId);
379            }
380    
381            /**
382            * Returns the number of portlet preferenceses where portletId = &#63;.
383            *
384            * @param portletId the portlet ID
385            * @return the number of matching portlet preferenceses
386            */
387            public static int countByPortletId(java.lang.String portletId) {
388                    return getPersistence().countByPortletId(portletId);
389            }
390    
391            /**
392            * Returns all the portlet preferenceses where ownerType = &#63; and portletId = &#63;.
393            *
394            * @param ownerType the owner type
395            * @param portletId the portlet ID
396            * @return the matching portlet preferenceses
397            */
398            public static List<PortletPreferences> findByO_P(int ownerType,
399                    java.lang.String portletId) {
400                    return getPersistence().findByO_P(ownerType, portletId);
401            }
402    
403            /**
404            * Returns a range of all the portlet preferenceses where ownerType = &#63; and portletId = &#63;.
405            *
406            * <p>
407            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
408            * </p>
409            *
410            * @param ownerType the owner type
411            * @param portletId the portlet ID
412            * @param start the lower bound of the range of portlet preferenceses
413            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
414            * @return the range of matching portlet preferenceses
415            */
416            public static List<PortletPreferences> findByO_P(int ownerType,
417                    java.lang.String portletId, int start, int end) {
418                    return getPersistence().findByO_P(ownerType, portletId, start, end);
419            }
420    
421            /**
422            * Returns an ordered range of all the portlet preferenceses where ownerType = &#63; and portletId = &#63;.
423            *
424            * <p>
425            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
426            * </p>
427            *
428            * @param ownerType the owner type
429            * @param portletId the portlet ID
430            * @param start the lower bound of the range of portlet preferenceses
431            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
432            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
433            * @return the ordered range of matching portlet preferenceses
434            */
435            public static List<PortletPreferences> findByO_P(int ownerType,
436                    java.lang.String portletId, int start, int end,
437                    OrderByComparator<PortletPreferences> orderByComparator) {
438                    return getPersistence()
439                                       .findByO_P(ownerType, portletId, start, end,
440                            orderByComparator);
441            }
442    
443            /**
444            * Returns the first portlet preferences in the ordered set where ownerType = &#63; and portletId = &#63;.
445            *
446            * @param ownerType the owner type
447            * @param portletId the portlet ID
448            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
449            * @return the first matching portlet preferences
450            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
451            */
452            public static PortletPreferences findByO_P_First(int ownerType,
453                    java.lang.String portletId,
454                    OrderByComparator<PortletPreferences> orderByComparator)
455                    throws com.liferay.portal.NoSuchPortletPreferencesException {
456                    return getPersistence()
457                                       .findByO_P_First(ownerType, portletId, orderByComparator);
458            }
459    
460            /**
461            * Returns the first portlet preferences in the ordered set where ownerType = &#63; and portletId = &#63;.
462            *
463            * @param ownerType the owner type
464            * @param portletId the portlet ID
465            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
466            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
467            */
468            public static PortletPreferences fetchByO_P_First(int ownerType,
469                    java.lang.String portletId,
470                    OrderByComparator<PortletPreferences> orderByComparator) {
471                    return getPersistence()
472                                       .fetchByO_P_First(ownerType, portletId, orderByComparator);
473            }
474    
475            /**
476            * Returns the last portlet preferences in the ordered set where ownerType = &#63; and portletId = &#63;.
477            *
478            * @param ownerType the owner type
479            * @param portletId the portlet ID
480            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
481            * @return the last matching portlet preferences
482            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
483            */
484            public static PortletPreferences findByO_P_Last(int ownerType,
485                    java.lang.String portletId,
486                    OrderByComparator<PortletPreferences> orderByComparator)
487                    throws com.liferay.portal.NoSuchPortletPreferencesException {
488                    return getPersistence()
489                                       .findByO_P_Last(ownerType, portletId, orderByComparator);
490            }
491    
492            /**
493            * Returns the last portlet preferences in the ordered set where ownerType = &#63; and portletId = &#63;.
494            *
495            * @param ownerType the owner type
496            * @param portletId the portlet ID
497            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
498            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
499            */
500            public static PortletPreferences fetchByO_P_Last(int ownerType,
501                    java.lang.String portletId,
502                    OrderByComparator<PortletPreferences> orderByComparator) {
503                    return getPersistence()
504                                       .fetchByO_P_Last(ownerType, portletId, orderByComparator);
505            }
506    
507            /**
508            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where ownerType = &#63; and portletId = &#63;.
509            *
510            * @param portletPreferencesId the primary key of the current portlet preferences
511            * @param ownerType the owner type
512            * @param portletId the portlet ID
513            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
514            * @return the previous, current, and next portlet preferences
515            * @throws NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
516            */
517            public static PortletPreferences[] findByO_P_PrevAndNext(
518                    long portletPreferencesId, int ownerType, java.lang.String portletId,
519                    OrderByComparator<PortletPreferences> orderByComparator)
520                    throws com.liferay.portal.NoSuchPortletPreferencesException {
521                    return getPersistence()
522                                       .findByO_P_PrevAndNext(portletPreferencesId, ownerType,
523                            portletId, orderByComparator);
524            }
525    
526            /**
527            * Removes all the portlet preferenceses where ownerType = &#63; and portletId = &#63; from the database.
528            *
529            * @param ownerType the owner type
530            * @param portletId the portlet ID
531            */
532            public static void removeByO_P(int ownerType, java.lang.String portletId) {
533                    getPersistence().removeByO_P(ownerType, portletId);
534            }
535    
536            /**
537            * Returns the number of portlet preferenceses where ownerType = &#63; and portletId = &#63;.
538            *
539            * @param ownerType the owner type
540            * @param portletId the portlet ID
541            * @return the number of matching portlet preferenceses
542            */
543            public static int countByO_P(int ownerType, java.lang.String portletId) {
544                    return getPersistence().countByO_P(ownerType, portletId);
545            }
546    
547            /**
548            * Returns all the portlet preferenceses where plid = &#63; and portletId = &#63;.
549            *
550            * @param plid the plid
551            * @param portletId the portlet ID
552            * @return the matching portlet preferenceses
553            */
554            public static List<PortletPreferences> findByP_P(long plid,
555                    java.lang.String portletId) {
556                    return getPersistence().findByP_P(plid, portletId);
557            }
558    
559            /**
560            * Returns a range of all the portlet preferenceses where plid = &#63; and portletId = &#63;.
561            *
562            * <p>
563            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
564            * </p>
565            *
566            * @param plid the plid
567            * @param portletId the portlet ID
568            * @param start the lower bound of the range of portlet preferenceses
569            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
570            * @return the range of matching portlet preferenceses
571            */
572            public static List<PortletPreferences> findByP_P(long plid,
573                    java.lang.String portletId, int start, int end) {
574                    return getPersistence().findByP_P(plid, portletId, start, end);
575            }
576    
577            /**
578            * Returns an ordered range of all the portlet preferenceses where plid = &#63; and portletId = &#63;.
579            *
580            * <p>
581            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
582            * </p>
583            *
584            * @param plid the plid
585            * @param portletId the portlet ID
586            * @param start the lower bound of the range of portlet preferenceses
587            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
588            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
589            * @return the ordered range of matching portlet preferenceses
590            */
591            public static List<PortletPreferences> findByP_P(long plid,
592                    java.lang.String portletId, int start, int end,
593                    OrderByComparator<PortletPreferences> orderByComparator) {
594                    return getPersistence()
595                                       .findByP_P(plid, portletId, start, end, orderByComparator);
596            }
597    
598            /**
599            * Returns the first portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
600            *
601            * @param plid the plid
602            * @param portletId the portlet ID
603            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
604            * @return the first matching portlet preferences
605            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
606            */
607            public static PortletPreferences findByP_P_First(long plid,
608                    java.lang.String portletId,
609                    OrderByComparator<PortletPreferences> orderByComparator)
610                    throws com.liferay.portal.NoSuchPortletPreferencesException {
611                    return getPersistence()
612                                       .findByP_P_First(plid, portletId, orderByComparator);
613            }
614    
615            /**
616            * Returns the first portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
617            *
618            * @param plid the plid
619            * @param portletId the portlet ID
620            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
621            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
622            */
623            public static PortletPreferences fetchByP_P_First(long plid,
624                    java.lang.String portletId,
625                    OrderByComparator<PortletPreferences> orderByComparator) {
626                    return getPersistence()
627                                       .fetchByP_P_First(plid, portletId, orderByComparator);
628            }
629    
630            /**
631            * Returns the last portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
632            *
633            * @param plid the plid
634            * @param portletId the portlet ID
635            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
636            * @return the last matching portlet preferences
637            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
638            */
639            public static PortletPreferences findByP_P_Last(long plid,
640                    java.lang.String portletId,
641                    OrderByComparator<PortletPreferences> orderByComparator)
642                    throws com.liferay.portal.NoSuchPortletPreferencesException {
643                    return getPersistence()
644                                       .findByP_P_Last(plid, portletId, orderByComparator);
645            }
646    
647            /**
648            * Returns the last portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
649            *
650            * @param plid the plid
651            * @param portletId the portlet ID
652            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
653            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
654            */
655            public static PortletPreferences fetchByP_P_Last(long plid,
656                    java.lang.String portletId,
657                    OrderByComparator<PortletPreferences> orderByComparator) {
658                    return getPersistence()
659                                       .fetchByP_P_Last(plid, portletId, orderByComparator);
660            }
661    
662            /**
663            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where plid = &#63; and portletId = &#63;.
664            *
665            * @param portletPreferencesId the primary key of the current portlet preferences
666            * @param plid the plid
667            * @param portletId the portlet ID
668            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
669            * @return the previous, current, and next portlet preferences
670            * @throws NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
671            */
672            public static PortletPreferences[] findByP_P_PrevAndNext(
673                    long portletPreferencesId, long plid, java.lang.String portletId,
674                    OrderByComparator<PortletPreferences> orderByComparator)
675                    throws com.liferay.portal.NoSuchPortletPreferencesException {
676                    return getPersistence()
677                                       .findByP_P_PrevAndNext(portletPreferencesId, plid,
678                            portletId, orderByComparator);
679            }
680    
681            /**
682            * Removes all the portlet preferenceses where plid = &#63; and portletId = &#63; from the database.
683            *
684            * @param plid the plid
685            * @param portletId the portlet ID
686            */
687            public static void removeByP_P(long plid, java.lang.String portletId) {
688                    getPersistence().removeByP_P(plid, portletId);
689            }
690    
691            /**
692            * Returns the number of portlet preferenceses where plid = &#63; and portletId = &#63;.
693            *
694            * @param plid the plid
695            * @param portletId the portlet ID
696            * @return the number of matching portlet preferenceses
697            */
698            public static int countByP_P(long plid, java.lang.String portletId) {
699                    return getPersistence().countByP_P(plid, portletId);
700            }
701    
702            /**
703            * Returns all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
704            *
705            * @param ownerId the owner ID
706            * @param ownerType the owner type
707            * @param plid the plid
708            * @return the matching portlet preferenceses
709            */
710            public static List<PortletPreferences> findByO_O_P(long ownerId,
711                    int ownerType, long plid) {
712                    return getPersistence().findByO_O_P(ownerId, ownerType, plid);
713            }
714    
715            /**
716            * Returns a range of all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
717            *
718            * <p>
719            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
720            * </p>
721            *
722            * @param ownerId the owner ID
723            * @param ownerType the owner type
724            * @param plid the plid
725            * @param start the lower bound of the range of portlet preferenceses
726            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
727            * @return the range of matching portlet preferenceses
728            */
729            public static List<PortletPreferences> findByO_O_P(long ownerId,
730                    int ownerType, long plid, int start, int end) {
731                    return getPersistence().findByO_O_P(ownerId, ownerType, plid, start, end);
732            }
733    
734            /**
735            * Returns an ordered range of all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
736            *
737            * <p>
738            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
739            * </p>
740            *
741            * @param ownerId the owner ID
742            * @param ownerType the owner type
743            * @param plid the plid
744            * @param start the lower bound of the range of portlet preferenceses
745            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
746            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
747            * @return the ordered range of matching portlet preferenceses
748            */
749            public static List<PortletPreferences> findByO_O_P(long ownerId,
750                    int ownerType, long plid, int start, int end,
751                    OrderByComparator<PortletPreferences> orderByComparator) {
752                    return getPersistence()
753                                       .findByO_O_P(ownerId, ownerType, plid, start, end,
754                            orderByComparator);
755            }
756    
757            /**
758            * Returns the first portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
759            *
760            * @param ownerId the owner ID
761            * @param ownerType the owner type
762            * @param plid the plid
763            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
764            * @return the first matching portlet preferences
765            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
766            */
767            public static PortletPreferences findByO_O_P_First(long ownerId,
768                    int ownerType, long plid,
769                    OrderByComparator<PortletPreferences> orderByComparator)
770                    throws com.liferay.portal.NoSuchPortletPreferencesException {
771                    return getPersistence()
772                                       .findByO_O_P_First(ownerId, ownerType, plid,
773                            orderByComparator);
774            }
775    
776            /**
777            * Returns the first portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
778            *
779            * @param ownerId the owner ID
780            * @param ownerType the owner type
781            * @param plid the plid
782            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
783            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
784            */
785            public static PortletPreferences fetchByO_O_P_First(long ownerId,
786                    int ownerType, long plid,
787                    OrderByComparator<PortletPreferences> orderByComparator) {
788                    return getPersistence()
789                                       .fetchByO_O_P_First(ownerId, ownerType, plid,
790                            orderByComparator);
791            }
792    
793            /**
794            * Returns the last portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
795            *
796            * @param ownerId the owner ID
797            * @param ownerType the owner type
798            * @param plid the plid
799            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
800            * @return the last matching portlet preferences
801            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
802            */
803            public static PortletPreferences findByO_O_P_Last(long ownerId,
804                    int ownerType, long plid,
805                    OrderByComparator<PortletPreferences> orderByComparator)
806                    throws com.liferay.portal.NoSuchPortletPreferencesException {
807                    return getPersistence()
808                                       .findByO_O_P_Last(ownerId, ownerType, plid, orderByComparator);
809            }
810    
811            /**
812            * Returns the last portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
813            *
814            * @param ownerId the owner ID
815            * @param ownerType the owner type
816            * @param plid the plid
817            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
818            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
819            */
820            public static PortletPreferences fetchByO_O_P_Last(long ownerId,
821                    int ownerType, long plid,
822                    OrderByComparator<PortletPreferences> orderByComparator) {
823                    return getPersistence()
824                                       .fetchByO_O_P_Last(ownerId, ownerType, plid,
825                            orderByComparator);
826            }
827    
828            /**
829            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
830            *
831            * @param portletPreferencesId the primary key of the current portlet preferences
832            * @param ownerId the owner ID
833            * @param ownerType the owner type
834            * @param plid the plid
835            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
836            * @return the previous, current, and next portlet preferences
837            * @throws NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
838            */
839            public static PortletPreferences[] findByO_O_P_PrevAndNext(
840                    long portletPreferencesId, long ownerId, int ownerType, long plid,
841                    OrderByComparator<PortletPreferences> orderByComparator)
842                    throws com.liferay.portal.NoSuchPortletPreferencesException {
843                    return getPersistence()
844                                       .findByO_O_P_PrevAndNext(portletPreferencesId, ownerId,
845                            ownerType, plid, orderByComparator);
846            }
847    
848            /**
849            * Removes all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63; from the database.
850            *
851            * @param ownerId the owner ID
852            * @param ownerType the owner type
853            * @param plid the plid
854            */
855            public static void removeByO_O_P(long ownerId, int ownerType, long plid) {
856                    getPersistence().removeByO_O_P(ownerId, ownerType, plid);
857            }
858    
859            /**
860            * Returns the number of portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
861            *
862            * @param ownerId the owner ID
863            * @param ownerType the owner type
864            * @param plid the plid
865            * @return the number of matching portlet preferenceses
866            */
867            public static int countByO_O_P(long ownerId, int ownerType, long plid) {
868                    return getPersistence().countByO_O_P(ownerId, ownerType, plid);
869            }
870    
871            /**
872            * Returns all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and portletId = &#63;.
873            *
874            * @param ownerId the owner ID
875            * @param ownerType the owner type
876            * @param portletId the portlet ID
877            * @return the matching portlet preferenceses
878            */
879            public static List<PortletPreferences> findByO_O_PI(long ownerId,
880                    int ownerType, java.lang.String portletId) {
881                    return getPersistence().findByO_O_PI(ownerId, ownerType, portletId);
882            }
883    
884            /**
885            * Returns a range of all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and portletId = &#63;.
886            *
887            * <p>
888            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
889            * </p>
890            *
891            * @param ownerId the owner ID
892            * @param ownerType the owner type
893            * @param portletId the portlet ID
894            * @param start the lower bound of the range of portlet preferenceses
895            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
896            * @return the range of matching portlet preferenceses
897            */
898            public static List<PortletPreferences> findByO_O_PI(long ownerId,
899                    int ownerType, java.lang.String portletId, int start, int end) {
900                    return getPersistence()
901                                       .findByO_O_PI(ownerId, ownerType, portletId, start, end);
902            }
903    
904            /**
905            * Returns an ordered range of all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and portletId = &#63;.
906            *
907            * <p>
908            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
909            * </p>
910            *
911            * @param ownerId the owner ID
912            * @param ownerType the owner type
913            * @param portletId the portlet ID
914            * @param start the lower bound of the range of portlet preferenceses
915            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
916            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
917            * @return the ordered range of matching portlet preferenceses
918            */
919            public static List<PortletPreferences> findByO_O_PI(long ownerId,
920                    int ownerType, java.lang.String portletId, int start, int end,
921                    OrderByComparator<PortletPreferences> orderByComparator) {
922                    return getPersistence()
923                                       .findByO_O_PI(ownerId, ownerType, portletId, start, end,
924                            orderByComparator);
925            }
926    
927            /**
928            * Returns the first portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and portletId = &#63;.
929            *
930            * @param ownerId the owner ID
931            * @param ownerType the owner type
932            * @param portletId the portlet ID
933            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
934            * @return the first matching portlet preferences
935            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
936            */
937            public static PortletPreferences findByO_O_PI_First(long ownerId,
938                    int ownerType, java.lang.String portletId,
939                    OrderByComparator<PortletPreferences> orderByComparator)
940                    throws com.liferay.portal.NoSuchPortletPreferencesException {
941                    return getPersistence()
942                                       .findByO_O_PI_First(ownerId, ownerType, portletId,
943                            orderByComparator);
944            }
945    
946            /**
947            * Returns the first portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and portletId = &#63;.
948            *
949            * @param ownerId the owner ID
950            * @param ownerType the owner type
951            * @param portletId the portlet ID
952            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
953            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
954            */
955            public static PortletPreferences fetchByO_O_PI_First(long ownerId,
956                    int ownerType, java.lang.String portletId,
957                    OrderByComparator<PortletPreferences> orderByComparator) {
958                    return getPersistence()
959                                       .fetchByO_O_PI_First(ownerId, ownerType, portletId,
960                            orderByComparator);
961            }
962    
963            /**
964            * Returns the last portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and portletId = &#63;.
965            *
966            * @param ownerId the owner ID
967            * @param ownerType the owner type
968            * @param portletId the portlet ID
969            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
970            * @return the last matching portlet preferences
971            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
972            */
973            public static PortletPreferences findByO_O_PI_Last(long ownerId,
974                    int ownerType, java.lang.String portletId,
975                    OrderByComparator<PortletPreferences> orderByComparator)
976                    throws com.liferay.portal.NoSuchPortletPreferencesException {
977                    return getPersistence()
978                                       .findByO_O_PI_Last(ownerId, ownerType, portletId,
979                            orderByComparator);
980            }
981    
982            /**
983            * Returns the last portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and portletId = &#63;.
984            *
985            * @param ownerId the owner ID
986            * @param ownerType the owner type
987            * @param portletId the portlet ID
988            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
989            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
990            */
991            public static PortletPreferences fetchByO_O_PI_Last(long ownerId,
992                    int ownerType, java.lang.String portletId,
993                    OrderByComparator<PortletPreferences> orderByComparator) {
994                    return getPersistence()
995                                       .fetchByO_O_PI_Last(ownerId, ownerType, portletId,
996                            orderByComparator);
997            }
998    
999            /**
1000            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where ownerId = &#63; and ownerType = &#63; and portletId = &#63;.
1001            *
1002            * @param portletPreferencesId the primary key of the current portlet preferences
1003            * @param ownerId the owner ID
1004            * @param ownerType the owner type
1005            * @param portletId the portlet ID
1006            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1007            * @return the previous, current, and next portlet preferences
1008            * @throws NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
1009            */
1010            public static PortletPreferences[] findByO_O_PI_PrevAndNext(
1011                    long portletPreferencesId, long ownerId, int ownerType,
1012                    java.lang.String portletId,
1013                    OrderByComparator<PortletPreferences> orderByComparator)
1014                    throws com.liferay.portal.NoSuchPortletPreferencesException {
1015                    return getPersistence()
1016                                       .findByO_O_PI_PrevAndNext(portletPreferencesId, ownerId,
1017                            ownerType, portletId, orderByComparator);
1018            }
1019    
1020            /**
1021            * Removes all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and portletId = &#63; from the database.
1022            *
1023            * @param ownerId the owner ID
1024            * @param ownerType the owner type
1025            * @param portletId the portlet ID
1026            */
1027            public static void removeByO_O_PI(long ownerId, int ownerType,
1028                    java.lang.String portletId) {
1029                    getPersistence().removeByO_O_PI(ownerId, ownerType, portletId);
1030            }
1031    
1032            /**
1033            * Returns the number of portlet preferenceses where ownerId = &#63; and ownerType = &#63; and portletId = &#63;.
1034            *
1035            * @param ownerId the owner ID
1036            * @param ownerType the owner type
1037            * @param portletId the portlet ID
1038            * @return the number of matching portlet preferenceses
1039            */
1040            public static int countByO_O_PI(long ownerId, int ownerType,
1041                    java.lang.String portletId) {
1042                    return getPersistence().countByO_O_PI(ownerId, ownerType, portletId);
1043            }
1044    
1045            /**
1046            * Returns all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
1047            *
1048            * @param ownerType the owner type
1049            * @param plid the plid
1050            * @param portletId the portlet ID
1051            * @return the matching portlet preferenceses
1052            */
1053            public static List<PortletPreferences> findByO_P_P(int ownerType,
1054                    long plid, java.lang.String portletId) {
1055                    return getPersistence().findByO_P_P(ownerType, plid, portletId);
1056            }
1057    
1058            /**
1059            * Returns a range of all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
1060            *
1061            * <p>
1062            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1063            * </p>
1064            *
1065            * @param ownerType the owner type
1066            * @param plid the plid
1067            * @param portletId the portlet ID
1068            * @param start the lower bound of the range of portlet preferenceses
1069            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
1070            * @return the range of matching portlet preferenceses
1071            */
1072            public static List<PortletPreferences> findByO_P_P(int ownerType,
1073                    long plid, java.lang.String portletId, int start, int end) {
1074                    return getPersistence()
1075                                       .findByO_P_P(ownerType, plid, portletId, start, end);
1076            }
1077    
1078            /**
1079            * Returns an ordered range of all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
1080            *
1081            * <p>
1082            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1083            * </p>
1084            *
1085            * @param ownerType the owner type
1086            * @param plid the plid
1087            * @param portletId the portlet ID
1088            * @param start the lower bound of the range of portlet preferenceses
1089            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
1090            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1091            * @return the ordered range of matching portlet preferenceses
1092            */
1093            public static List<PortletPreferences> findByO_P_P(int ownerType,
1094                    long plid, java.lang.String portletId, int start, int end,
1095                    OrderByComparator<PortletPreferences> orderByComparator) {
1096                    return getPersistence()
1097                                       .findByO_P_P(ownerType, plid, portletId, start, end,
1098                            orderByComparator);
1099            }
1100    
1101            /**
1102            * Returns the first portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
1103            *
1104            * @param ownerType the owner type
1105            * @param plid the plid
1106            * @param portletId the portlet ID
1107            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1108            * @return the first matching portlet preferences
1109            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
1110            */
1111            public static PortletPreferences findByO_P_P_First(int ownerType,
1112                    long plid, java.lang.String portletId,
1113                    OrderByComparator<PortletPreferences> orderByComparator)
1114                    throws com.liferay.portal.NoSuchPortletPreferencesException {
1115                    return getPersistence()
1116                                       .findByO_P_P_First(ownerType, plid, portletId,
1117                            orderByComparator);
1118            }
1119    
1120            /**
1121            * Returns the first portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
1122            *
1123            * @param ownerType the owner type
1124            * @param plid the plid
1125            * @param portletId the portlet ID
1126            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1127            * @return the first matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
1128            */
1129            public static PortletPreferences fetchByO_P_P_First(int ownerType,
1130                    long plid, java.lang.String portletId,
1131                    OrderByComparator<PortletPreferences> orderByComparator) {
1132                    return getPersistence()
1133                                       .fetchByO_P_P_First(ownerType, plid, portletId,
1134                            orderByComparator);
1135            }
1136    
1137            /**
1138            * Returns the last portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
1139            *
1140            * @param ownerType the owner type
1141            * @param plid the plid
1142            * @param portletId the portlet ID
1143            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1144            * @return the last matching portlet preferences
1145            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
1146            */
1147            public static PortletPreferences findByO_P_P_Last(int ownerType, long plid,
1148                    java.lang.String portletId,
1149                    OrderByComparator<PortletPreferences> orderByComparator)
1150                    throws com.liferay.portal.NoSuchPortletPreferencesException {
1151                    return getPersistence()
1152                                       .findByO_P_P_Last(ownerType, plid, portletId,
1153                            orderByComparator);
1154            }
1155    
1156            /**
1157            * Returns the last portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
1158            *
1159            * @param ownerType the owner type
1160            * @param plid the plid
1161            * @param portletId the portlet ID
1162            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1163            * @return the last matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
1164            */
1165            public static PortletPreferences fetchByO_P_P_Last(int ownerType,
1166                    long plid, java.lang.String portletId,
1167                    OrderByComparator<PortletPreferences> orderByComparator) {
1168                    return getPersistence()
1169                                       .fetchByO_P_P_Last(ownerType, plid, portletId,
1170                            orderByComparator);
1171            }
1172    
1173            /**
1174            * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where ownerType = &#63; and plid = &#63; and portletId = &#63;.
1175            *
1176            * @param portletPreferencesId the primary key of the current portlet preferences
1177            * @param ownerType the owner type
1178            * @param plid the plid
1179            * @param portletId the portlet ID
1180            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1181            * @return the previous, current, and next portlet preferences
1182            * @throws NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
1183            */
1184            public static PortletPreferences[] findByO_P_P_PrevAndNext(
1185                    long portletPreferencesId, int ownerType, long plid,
1186                    java.lang.String portletId,
1187                    OrderByComparator<PortletPreferences> orderByComparator)
1188                    throws com.liferay.portal.NoSuchPortletPreferencesException {
1189                    return getPersistence()
1190                                       .findByO_P_P_PrevAndNext(portletPreferencesId, ownerType,
1191                            plid, portletId, orderByComparator);
1192            }
1193    
1194            /**
1195            * Removes all the portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63; from the database.
1196            *
1197            * @param ownerType the owner type
1198            * @param plid the plid
1199            * @param portletId the portlet ID
1200            */
1201            public static void removeByO_P_P(int ownerType, long plid,
1202                    java.lang.String portletId) {
1203                    getPersistence().removeByO_P_P(ownerType, plid, portletId);
1204            }
1205    
1206            /**
1207            * Returns the number of portlet preferenceses where ownerType = &#63; and plid = &#63; and portletId = &#63;.
1208            *
1209            * @param ownerType the owner type
1210            * @param plid the plid
1211            * @param portletId the portlet ID
1212            * @return the number of matching portlet preferenceses
1213            */
1214            public static int countByO_P_P(int ownerType, long plid,
1215                    java.lang.String portletId) {
1216                    return getPersistence().countByO_P_P(ownerType, plid, portletId);
1217            }
1218    
1219            /**
1220            * Returns the portlet preferences where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63; or throws a {@link NoSuchPortletPreferencesException} if it could not be found.
1221            *
1222            * @param ownerId the owner ID
1223            * @param ownerType the owner type
1224            * @param plid the plid
1225            * @param portletId the portlet ID
1226            * @return the matching portlet preferences
1227            * @throws NoSuchPortletPreferencesException if a matching portlet preferences could not be found
1228            */
1229            public static PortletPreferences findByO_O_P_P(long ownerId, int ownerType,
1230                    long plid, java.lang.String portletId)
1231                    throws com.liferay.portal.NoSuchPortletPreferencesException {
1232                    return getPersistence()
1233                                       .findByO_O_P_P(ownerId, ownerType, plid, portletId);
1234            }
1235    
1236            /**
1237            * 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.
1238            *
1239            * @param ownerId the owner ID
1240            * @param ownerType the owner type
1241            * @param plid the plid
1242            * @param portletId the portlet ID
1243            * @return the matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
1244            */
1245            public static PortletPreferences fetchByO_O_P_P(long ownerId,
1246                    int ownerType, long plid, java.lang.String portletId) {
1247                    return getPersistence()
1248                                       .fetchByO_O_P_P(ownerId, ownerType, plid, portletId);
1249            }
1250    
1251            /**
1252            * 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.
1253            *
1254            * @param ownerId the owner ID
1255            * @param ownerType the owner type
1256            * @param plid the plid
1257            * @param portletId the portlet ID
1258            * @param retrieveFromCache whether to use the finder cache
1259            * @return the matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
1260            */
1261            public static PortletPreferences fetchByO_O_P_P(long ownerId,
1262                    int ownerType, long plid, java.lang.String portletId,
1263                    boolean retrieveFromCache) {
1264                    return getPersistence()
1265                                       .fetchByO_O_P_P(ownerId, ownerType, plid, portletId,
1266                            retrieveFromCache);
1267            }
1268    
1269            /**
1270            * Removes the portlet preferences where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63; from the database.
1271            *
1272            * @param ownerId the owner ID
1273            * @param ownerType the owner type
1274            * @param plid the plid
1275            * @param portletId the portlet ID
1276            * @return the portlet preferences that was removed
1277            */
1278            public static PortletPreferences removeByO_O_P_P(long ownerId,
1279                    int ownerType, long plid, java.lang.String portletId)
1280                    throws com.liferay.portal.NoSuchPortletPreferencesException {
1281                    return getPersistence()
1282                                       .removeByO_O_P_P(ownerId, ownerType, plid, portletId);
1283            }
1284    
1285            /**
1286            * Returns the number of portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63;.
1287            *
1288            * @param ownerId the owner ID
1289            * @param ownerType the owner type
1290            * @param plid the plid
1291            * @param portletId the portlet ID
1292            * @return the number of matching portlet preferenceses
1293            */
1294            public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
1295                    java.lang.String portletId) {
1296                    return getPersistence()
1297                                       .countByO_O_P_P(ownerId, ownerType, plid, portletId);
1298            }
1299    
1300            /**
1301            * Caches the portlet preferences in the entity cache if it is enabled.
1302            *
1303            * @param portletPreferences the portlet preferences
1304            */
1305            public static void cacheResult(PortletPreferences portletPreferences) {
1306                    getPersistence().cacheResult(portletPreferences);
1307            }
1308    
1309            /**
1310            * Caches the portlet preferenceses in the entity cache if it is enabled.
1311            *
1312            * @param portletPreferenceses the portlet preferenceses
1313            */
1314            public static void cacheResult(
1315                    List<PortletPreferences> portletPreferenceses) {
1316                    getPersistence().cacheResult(portletPreferenceses);
1317            }
1318    
1319            /**
1320            * Creates a new portlet preferences with the primary key. Does not add the portlet preferences to the database.
1321            *
1322            * @param portletPreferencesId the primary key for the new portlet preferences
1323            * @return the new portlet preferences
1324            */
1325            public static PortletPreferences create(long portletPreferencesId) {
1326                    return getPersistence().create(portletPreferencesId);
1327            }
1328    
1329            /**
1330            * Removes the portlet preferences with the primary key from the database. Also notifies the appropriate model listeners.
1331            *
1332            * @param portletPreferencesId the primary key of the portlet preferences
1333            * @return the portlet preferences that was removed
1334            * @throws NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
1335            */
1336            public static PortletPreferences remove(long portletPreferencesId)
1337                    throws com.liferay.portal.NoSuchPortletPreferencesException {
1338                    return getPersistence().remove(portletPreferencesId);
1339            }
1340    
1341            public static PortletPreferences updateImpl(
1342                    PortletPreferences portletPreferences) {
1343                    return getPersistence().updateImpl(portletPreferences);
1344            }
1345    
1346            /**
1347            * Returns the portlet preferences with the primary key or throws a {@link NoSuchPortletPreferencesException} if it could not be found.
1348            *
1349            * @param portletPreferencesId the primary key of the portlet preferences
1350            * @return the portlet preferences
1351            * @throws NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found
1352            */
1353            public static PortletPreferences findByPrimaryKey(long portletPreferencesId)
1354                    throws com.liferay.portal.NoSuchPortletPreferencesException {
1355                    return getPersistence().findByPrimaryKey(portletPreferencesId);
1356            }
1357    
1358            /**
1359            * Returns the portlet preferences with the primary key or returns <code>null</code> if it could not be found.
1360            *
1361            * @param portletPreferencesId the primary key of the portlet preferences
1362            * @return the portlet preferences, or <code>null</code> if a portlet preferences with the primary key could not be found
1363            */
1364            public static PortletPreferences fetchByPrimaryKey(
1365                    long portletPreferencesId) {
1366                    return getPersistence().fetchByPrimaryKey(portletPreferencesId);
1367            }
1368    
1369            public static java.util.Map<java.io.Serializable, PortletPreferences> fetchByPrimaryKeys(
1370                    java.util.Set<java.io.Serializable> primaryKeys) {
1371                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
1372            }
1373    
1374            /**
1375            * Returns all the portlet preferenceses.
1376            *
1377            * @return the portlet preferenceses
1378            */
1379            public static List<PortletPreferences> findAll() {
1380                    return getPersistence().findAll();
1381            }
1382    
1383            /**
1384            * Returns a range of all the portlet preferenceses.
1385            *
1386            * <p>
1387            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1388            * </p>
1389            *
1390            * @param start the lower bound of the range of portlet preferenceses
1391            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
1392            * @return the range of portlet preferenceses
1393            */
1394            public static List<PortletPreferences> findAll(int start, int end) {
1395                    return getPersistence().findAll(start, end);
1396            }
1397    
1398            /**
1399            * Returns an ordered range of all the portlet preferenceses.
1400            *
1401            * <p>
1402            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1403            * </p>
1404            *
1405            * @param start the lower bound of the range of portlet preferenceses
1406            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
1407            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1408            * @return the ordered range of portlet preferenceses
1409            */
1410            public static List<PortletPreferences> findAll(int start, int end,
1411                    OrderByComparator<PortletPreferences> orderByComparator) {
1412                    return getPersistence().findAll(start, end, orderByComparator);
1413            }
1414    
1415            /**
1416            * Removes all the portlet preferenceses from the database.
1417            */
1418            public static void removeAll() {
1419                    getPersistence().removeAll();
1420            }
1421    
1422            /**
1423            * Returns the number of portlet preferenceses.
1424            *
1425            * @return the number of portlet preferenceses
1426            */
1427            public static int countAll() {
1428                    return getPersistence().countAll();
1429            }
1430    
1431            public static PortletPreferencesPersistence getPersistence() {
1432                    if (_persistence == null) {
1433                            _persistence = (PortletPreferencesPersistence)PortalBeanLocatorUtil.locate(PortletPreferencesPersistence.class.getName());
1434    
1435                            ReferenceRegistry.registerReference(PortletPreferencesUtil.class,
1436                                    "_persistence");
1437                    }
1438    
1439                    return _persistence;
1440            }
1441    
1442            /**
1443             * @deprecated As of 6.2.0
1444             */
1445            @Deprecated
1446            public void setPersistence(PortletPreferencesPersistence persistence) {
1447            }
1448    
1449            private static PortletPreferencesPersistence _persistence;
1450    }