1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  import com.liferay.portal.model.PortletPreferences;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="PortletPreferencesUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       PortletPreferencesPersistence
35   * @see       PortletPreferencesPersistenceImpl
36   * @generated
37   */
38  public class PortletPreferencesUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(PortletPreferences)
48       */
49      public static void clearCache(PortletPreferences portletPreferences) {
50          getPersistence().clearCache(portletPreferences);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static PortletPreferences remove(
81          PortletPreferences portletPreferences) throws SystemException {
82          return getPersistence().remove(portletPreferences);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static PortletPreferences update(
89          PortletPreferences portletPreferences, boolean merge)
90          throws SystemException {
91          return getPersistence().update(portletPreferences, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portal.model.PortletPreferences portletPreferences) {
96          getPersistence().cacheResult(portletPreferences);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portal.model.PortletPreferences> portletPreferenceses) {
101         getPersistence().cacheResult(portletPreferenceses);
102     }
103 
104     public static com.liferay.portal.model.PortletPreferences create(
105         long portletPreferencesId) {
106         return getPersistence().create(portletPreferencesId);
107     }
108 
109     public static com.liferay.portal.model.PortletPreferences remove(
110         long portletPreferencesId)
111         throws com.liferay.portal.NoSuchPortletPreferencesException,
112             com.liferay.portal.SystemException {
113         return getPersistence().remove(portletPreferencesId);
114     }
115 
116     /**
117      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
118      */
119     public static com.liferay.portal.model.PortletPreferences update(
120         com.liferay.portal.model.PortletPreferences portletPreferences)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().update(portletPreferences);
123     }
124 
125     public static com.liferay.portal.model.PortletPreferences updateImpl(
126         com.liferay.portal.model.PortletPreferences portletPreferences,
127         boolean merge) throws com.liferay.portal.SystemException {
128         return getPersistence().updateImpl(portletPreferences, merge);
129     }
130 
131     public static com.liferay.portal.model.PortletPreferences findByPrimaryKey(
132         long portletPreferencesId)
133         throws com.liferay.portal.NoSuchPortletPreferencesException,
134             com.liferay.portal.SystemException {
135         return getPersistence().findByPrimaryKey(portletPreferencesId);
136     }
137 
138     public static com.liferay.portal.model.PortletPreferences fetchByPrimaryKey(
139         long portletPreferencesId) throws com.liferay.portal.SystemException {
140         return getPersistence().fetchByPrimaryKey(portletPreferencesId);
141     }
142 
143     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
144         long plid) throws com.liferay.portal.SystemException {
145         return getPersistence().findByPlid(plid);
146     }
147 
148     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
149         long plid, int start, int end)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findByPlid(plid, start, end);
152     }
153 
154     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
155         long plid, int start, int end,
156         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157         throws com.liferay.portal.SystemException {
158         return getPersistence().findByPlid(plid, start, end, orderByComparator);
159     }
160 
161     public static com.liferay.portal.model.PortletPreferences findByPlid_First(
162         long plid,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.NoSuchPortletPreferencesException,
165             com.liferay.portal.SystemException {
166         return getPersistence().findByPlid_First(plid, orderByComparator);
167     }
168 
169     public static com.liferay.portal.model.PortletPreferences findByPlid_Last(
170         long plid,
171         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172         throws com.liferay.portal.NoSuchPortletPreferencesException,
173             com.liferay.portal.SystemException {
174         return getPersistence().findByPlid_Last(plid, orderByComparator);
175     }
176 
177     public static com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
178         long portletPreferencesId, long plid,
179         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180         throws com.liferay.portal.NoSuchPortletPreferencesException,
181             com.liferay.portal.SystemException {
182         return getPersistence()
183                    .findByPlid_PrevAndNext(portletPreferencesId, plid,
184             orderByComparator);
185     }
186 
187     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
188         long plid, java.lang.String portletId)
189         throws com.liferay.portal.SystemException {
190         return getPersistence().findByP_P(plid, portletId);
191     }
192 
193     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
194         long plid, java.lang.String portletId, int start, int end)
195         throws com.liferay.portal.SystemException {
196         return getPersistence().findByP_P(plid, portletId, start, end);
197     }
198 
199     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
200         long plid, java.lang.String portletId, int start, int end,
201         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202         throws com.liferay.portal.SystemException {
203         return getPersistence()
204                    .findByP_P(plid, portletId, start, end, orderByComparator);
205     }
206 
207     public static com.liferay.portal.model.PortletPreferences findByP_P_First(
208         long plid, java.lang.String portletId,
209         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210         throws com.liferay.portal.NoSuchPortletPreferencesException,
211             com.liferay.portal.SystemException {
212         return getPersistence()
213                    .findByP_P_First(plid, portletId, orderByComparator);
214     }
215 
216     public static com.liferay.portal.model.PortletPreferences findByP_P_Last(
217         long plid, java.lang.String portletId,
218         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219         throws com.liferay.portal.NoSuchPortletPreferencesException,
220             com.liferay.portal.SystemException {
221         return getPersistence()
222                    .findByP_P_Last(plid, portletId, orderByComparator);
223     }
224 
225     public static com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
226         long portletPreferencesId, long plid, java.lang.String portletId,
227         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228         throws com.liferay.portal.NoSuchPortletPreferencesException,
229             com.liferay.portal.SystemException {
230         return getPersistence()
231                    .findByP_P_PrevAndNext(portletPreferencesId, plid,
232             portletId, orderByComparator);
233     }
234 
235     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
236         long ownerId, int ownerType, long plid)
237         throws com.liferay.portal.SystemException {
238         return getPersistence().findByO_O_P(ownerId, ownerType, plid);
239     }
240 
241     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
242         long ownerId, int ownerType, long plid, int start, int end)
243         throws com.liferay.portal.SystemException {
244         return getPersistence().findByO_O_P(ownerId, ownerType, plid, start, end);
245     }
246 
247     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
248         long ownerId, int ownerType, long plid, int start, int end,
249         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
250         throws com.liferay.portal.SystemException {
251         return getPersistence()
252                    .findByO_O_P(ownerId, ownerType, plid, start, end,
253             orderByComparator);
254     }
255 
256     public static com.liferay.portal.model.PortletPreferences findByO_O_P_First(
257         long ownerId, int ownerType, long plid,
258         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259         throws com.liferay.portal.NoSuchPortletPreferencesException,
260             com.liferay.portal.SystemException {
261         return getPersistence()
262                    .findByO_O_P_First(ownerId, ownerType, plid,
263             orderByComparator);
264     }
265 
266     public static com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
267         long ownerId, int ownerType, long plid,
268         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
269         throws com.liferay.portal.NoSuchPortletPreferencesException,
270             com.liferay.portal.SystemException {
271         return getPersistence()
272                    .findByO_O_P_Last(ownerId, ownerType, plid, orderByComparator);
273     }
274 
275     public static com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
276         long portletPreferencesId, long ownerId, int ownerType, long plid,
277         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
278         throws com.liferay.portal.NoSuchPortletPreferencesException,
279             com.liferay.portal.SystemException {
280         return getPersistence()
281                    .findByO_O_P_PrevAndNext(portletPreferencesId, ownerId,
282             ownerType, plid, orderByComparator);
283     }
284 
285     public static com.liferay.portal.model.PortletPreferences findByO_O_P_P(
286         long ownerId, int ownerType, long plid, java.lang.String portletId)
287         throws com.liferay.portal.NoSuchPortletPreferencesException,
288             com.liferay.portal.SystemException {
289         return getPersistence()
290                    .findByO_O_P_P(ownerId, ownerType, plid, portletId);
291     }
292 
293     public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
294         long ownerId, int ownerType, long plid, java.lang.String portletId)
295         throws com.liferay.portal.SystemException {
296         return getPersistence()
297                    .fetchByO_O_P_P(ownerId, ownerType, plid, portletId);
298     }
299 
300     public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
301         long ownerId, int ownerType, long plid, java.lang.String portletId,
302         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
303         return getPersistence()
304                    .fetchByO_O_P_P(ownerId, ownerType, plid, portletId,
305             retrieveFromCache);
306     }
307 
308     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
309         throws com.liferay.portal.SystemException {
310         return getPersistence().findAll();
311     }
312 
313     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
314         int start, int end) throws com.liferay.portal.SystemException {
315         return getPersistence().findAll(start, end);
316     }
317 
318     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
319         int start, int end,
320         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
321         throws com.liferay.portal.SystemException {
322         return getPersistence().findAll(start, end, orderByComparator);
323     }
324 
325     public static void removeByPlid(long plid)
326         throws com.liferay.portal.SystemException {
327         getPersistence().removeByPlid(plid);
328     }
329 
330     public static void removeByP_P(long plid, java.lang.String portletId)
331         throws com.liferay.portal.SystemException {
332         getPersistence().removeByP_P(plid, portletId);
333     }
334 
335     public static void removeByO_O_P(long ownerId, int ownerType, long plid)
336         throws com.liferay.portal.SystemException {
337         getPersistence().removeByO_O_P(ownerId, ownerType, plid);
338     }
339 
340     public static void removeByO_O_P_P(long ownerId, int ownerType, long plid,
341         java.lang.String portletId)
342         throws com.liferay.portal.NoSuchPortletPreferencesException,
343             com.liferay.portal.SystemException {
344         getPersistence().removeByO_O_P_P(ownerId, ownerType, plid, portletId);
345     }
346 
347     public static void removeAll() throws com.liferay.portal.SystemException {
348         getPersistence().removeAll();
349     }
350 
351     public static int countByPlid(long plid)
352         throws com.liferay.portal.SystemException {
353         return getPersistence().countByPlid(plid);
354     }
355 
356     public static int countByP_P(long plid, java.lang.String portletId)
357         throws com.liferay.portal.SystemException {
358         return getPersistence().countByP_P(plid, portletId);
359     }
360 
361     public static int countByO_O_P(long ownerId, int ownerType, long plid)
362         throws com.liferay.portal.SystemException {
363         return getPersistence().countByO_O_P(ownerId, ownerType, plid);
364     }
365 
366     public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
367         java.lang.String portletId) throws com.liferay.portal.SystemException {
368         return getPersistence()
369                    .countByO_O_P_P(ownerId, ownerType, plid, portletId);
370     }
371 
372     public static int countAll() throws com.liferay.portal.SystemException {
373         return getPersistence().countAll();
374     }
375 
376     public static PortletPreferencesPersistence getPersistence() {
377         if (_persistence == null) {
378             _persistence = (PortletPreferencesPersistence)PortalBeanLocatorUtil.locate(PortletPreferencesPersistence.class.getName());
379 
380             ReferenceRegistry.registerReference(PortletPreferencesUtil.class,
381                 "_persistence");
382         }
383 
384         return _persistence;
385     }
386 
387     public void setPersistence(PortletPreferencesPersistence persistence) {
388         _persistence = persistence;
389 
390         ReferenceRegistry.registerReference(PortletPreferencesUtil.class,
391             "_persistence");
392     }
393 
394     private static PortletPreferencesPersistence _persistence;
395 }