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