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