001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.PortletPreferences;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the portlet preferences service. This utility wraps {@link PortletPreferencesPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see PortletPreferencesPersistence
036     * @see PortletPreferencesPersistenceImpl
037     * @generated
038     */
039    public class PortletPreferencesUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(PortletPreferences portletPreferences) {
057                    getPersistence().clearCache(portletPreferences);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<PortletPreferences> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<PortletPreferences> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<PortletPreferences> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#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
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
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
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            * Returns 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
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            * Returns 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
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            * Returns all the portlet preferenceses where plid = &#63;.
205            *
206            * @param plid the plid
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            * Returns 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
223            * @param start the lower bound of the range of portlet preferenceses
224            * @param end the upper bound of the range of portlet preferenceses (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            * Returns 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
242            * @param start the lower bound of the range of portlet preferenceses
243            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
244            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns 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
263            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
284            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
306            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns all the portlet preferenceses where plid = &#63; and portletId = &#63;.
323            *
324            * @param plid the plid
325            * @param portletId the portlet ID
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            * Returns 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
343            * @param portletId the portlet ID
344            * @param start the lower bound of the range of portlet preferenceses
345            * @param end the upper bound of the range of portlet preferenceses (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            * Returns 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
363            * @param portletId the portlet ID
364            * @param start the lower bound of the range of portlet preferenceses
365            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
366            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns 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
386            * @param portletId the portlet ID
387            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
409            * @param portletId the portlet ID
410            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
433            * @param portletId the portlet ID
434            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
451            *
452            * @param ownerId the owner ID
453            * @param ownerType the owner type
454            * @param plid the plid
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            * Returns 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
472            * @param ownerType the owner type
473            * @param plid the plid
474            * @param start the lower bound of the range of portlet preferenceses
475            * @param end the upper bound of the range of portlet preferenceses (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            * Returns 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
493            * @param ownerType the owner type
494            * @param plid the plid
495            * @param start the lower bound of the range of portlet preferenceses
496            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
497            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns 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
518            * @param ownerType the owner type
519            * @param plid the plid
520            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
543            * @param ownerType the owner type
544            * @param plid the plid
545            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
568            * @param ownerType the owner type
569            * @param plid the plid
570            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns the portlet preferences where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63; or throws a {@link com.liferay.portal.NoSuchPortletPreferencesException} if it could not be found.
587            *
588            * @param ownerId the owner ID
589            * @param ownerType the owner type
590            * @param plid the plid
591            * @param portletId the portlet ID
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            * 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.
606            *
607            * @param ownerId the owner ID
608            * @param ownerType the owner type
609            * @param plid the plid
610            * @param portletId the portlet ID
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            * 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.
623            *
624            * @param ownerId the owner ID
625            * @param ownerType the owner type
626            * @param plid the plid
627            * @param portletId the portlet ID
628            * @param retrieveFromCache whether to use the finder cache
629            * @return the matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found
630            * @throws SystemException if a system exception occurred
631            */
632            public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
633                    long ownerId, int ownerType, long plid, java.lang.String portletId,
634                    boolean retrieveFromCache)
635                    throws com.liferay.portal.kernel.exception.SystemException {
636                    return getPersistence()
637                                       .fetchByO_O_P_P(ownerId, ownerType, plid, portletId,
638                            retrieveFromCache);
639            }
640    
641            /**
642            * Returns all the portlet preferenceses.
643            *
644            * @return the portlet preferenceses
645            * @throws SystemException if a system exception occurred
646            */
647            public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
648                    throws com.liferay.portal.kernel.exception.SystemException {
649                    return getPersistence().findAll();
650            }
651    
652            /**
653            * Returns a range of all the portlet preferenceses.
654            *
655            * <p>
656            * 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.
657            * </p>
658            *
659            * @param start the lower bound of the range of portlet preferenceses
660            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
661            * @return the range of portlet preferenceses
662            * @throws SystemException if a system exception occurred
663            */
664            public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
665                    int start, int end)
666                    throws com.liferay.portal.kernel.exception.SystemException {
667                    return getPersistence().findAll(start, end);
668            }
669    
670            /**
671            * Returns an ordered range of all the portlet preferenceses.
672            *
673            * <p>
674            * 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.
675            * </p>
676            *
677            * @param start the lower bound of the range of portlet preferenceses
678            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
679            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
680            * @return the ordered range of portlet preferenceses
681            * @throws SystemException if a system exception occurred
682            */
683            public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
684                    int start, int end,
685                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
686                    throws com.liferay.portal.kernel.exception.SystemException {
687                    return getPersistence().findAll(start, end, orderByComparator);
688            }
689    
690            /**
691            * Removes all the portlet preferenceses where plid = &#63; from the database.
692            *
693            * @param plid the plid
694            * @throws SystemException if a system exception occurred
695            */
696            public static void removeByPlid(long plid)
697                    throws com.liferay.portal.kernel.exception.SystemException {
698                    getPersistence().removeByPlid(plid);
699            }
700    
701            /**
702            * Removes all the portlet preferenceses where plid = &#63; and portletId = &#63; from the database.
703            *
704            * @param plid the plid
705            * @param portletId the portlet ID
706            * @throws SystemException if a system exception occurred
707            */
708            public static void removeByP_P(long plid, java.lang.String portletId)
709                    throws com.liferay.portal.kernel.exception.SystemException {
710                    getPersistence().removeByP_P(plid, portletId);
711            }
712    
713            /**
714            * Removes all the portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63; from the database.
715            *
716            * @param ownerId the owner ID
717            * @param ownerType the owner type
718            * @param plid the plid
719            * @throws SystemException if a system exception occurred
720            */
721            public static void removeByO_O_P(long ownerId, int ownerType, long plid)
722                    throws com.liferay.portal.kernel.exception.SystemException {
723                    getPersistence().removeByO_O_P(ownerId, ownerType, plid);
724            }
725    
726            /**
727            * Removes the portlet preferences where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63; from the database.
728            *
729            * @param ownerId the owner ID
730            * @param ownerType the owner type
731            * @param plid the plid
732            * @param portletId the portlet ID
733            * @throws SystemException if a system exception occurred
734            */
735            public static void removeByO_O_P_P(long ownerId, int ownerType, long plid,
736                    java.lang.String portletId)
737                    throws com.liferay.portal.NoSuchPortletPreferencesException,
738                            com.liferay.portal.kernel.exception.SystemException {
739                    getPersistence().removeByO_O_P_P(ownerId, ownerType, plid, portletId);
740            }
741    
742            /**
743            * Removes all the portlet preferenceses from the database.
744            *
745            * @throws SystemException if a system exception occurred
746            */
747            public static void removeAll()
748                    throws com.liferay.portal.kernel.exception.SystemException {
749                    getPersistence().removeAll();
750            }
751    
752            /**
753            * Returns the number of portlet preferenceses where plid = &#63;.
754            *
755            * @param plid the plid
756            * @return the number of matching portlet preferenceses
757            * @throws SystemException if a system exception occurred
758            */
759            public static int countByPlid(long plid)
760                    throws com.liferay.portal.kernel.exception.SystemException {
761                    return getPersistence().countByPlid(plid);
762            }
763    
764            /**
765            * Returns the number of portlet preferenceses where plid = &#63; and portletId = &#63;.
766            *
767            * @param plid the plid
768            * @param portletId the portlet ID
769            * @return the number of matching portlet preferenceses
770            * @throws SystemException if a system exception occurred
771            */
772            public static int countByP_P(long plid, java.lang.String portletId)
773                    throws com.liferay.portal.kernel.exception.SystemException {
774                    return getPersistence().countByP_P(plid, portletId);
775            }
776    
777            /**
778            * Returns the number of portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63;.
779            *
780            * @param ownerId the owner ID
781            * @param ownerType the owner type
782            * @param plid the plid
783            * @return the number of matching portlet preferenceses
784            * @throws SystemException if a system exception occurred
785            */
786            public static int countByO_O_P(long ownerId, int ownerType, long plid)
787                    throws com.liferay.portal.kernel.exception.SystemException {
788                    return getPersistence().countByO_O_P(ownerId, ownerType, plid);
789            }
790    
791            /**
792            * Returns the number of portlet preferenceses where ownerId = &#63; and ownerType = &#63; and plid = &#63; and portletId = &#63;.
793            *
794            * @param ownerId the owner ID
795            * @param ownerType the owner type
796            * @param plid the plid
797            * @param portletId the portlet ID
798            * @return the number of matching portlet preferenceses
799            * @throws SystemException if a system exception occurred
800            */
801            public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
802                    java.lang.String portletId)
803                    throws com.liferay.portal.kernel.exception.SystemException {
804                    return getPersistence()
805                                       .countByO_O_P_P(ownerId, ownerType, plid, portletId);
806            }
807    
808            /**
809            * Returns the number of portlet preferenceses.
810            *
811            * @return the number of portlet preferenceses
812            * @throws SystemException if a system exception occurred
813            */
814            public static int countAll()
815                    throws com.liferay.portal.kernel.exception.SystemException {
816                    return getPersistence().countAll();
817            }
818    
819            public static PortletPreferencesPersistence getPersistence() {
820                    if (_persistence == null) {
821                            _persistence = (PortletPreferencesPersistence)PortalBeanLocatorUtil.locate(PortletPreferencesPersistence.class.getName());
822    
823                            ReferenceRegistry.registerReference(PortletPreferencesUtil.class,
824                                    "_persistence");
825                    }
826    
827                    return _persistence;
828            }
829    
830            public void setPersistence(PortletPreferencesPersistence persistence) {
831                    _persistence = persistence;
832    
833                    ReferenceRegistry.registerReference(PortletPreferencesUtil.class,
834                            "_persistence");
835            }
836    
837            private static PortletPreferencesPersistence _persistence;
838    }