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 obc)
134         throws com.liferay.portal.kernel.exception.SystemException {
135         return getPersistence().findByPlid(plid, start, end, obc);
136     }
137 
138     public static com.liferay.portal.model.PortletPreferences findByPlid_First(
139         long plid, com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.NoSuchPortletPreferencesException,
141             com.liferay.portal.kernel.exception.SystemException {
142         return getPersistence().findByPlid_First(plid, obc);
143     }
144 
145     public static com.liferay.portal.model.PortletPreferences findByPlid_Last(
146         long plid, com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.NoSuchPortletPreferencesException,
148             com.liferay.portal.kernel.exception.SystemException {
149         return getPersistence().findByPlid_Last(plid, obc);
150     }
151 
152     public static com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
153         long portletPreferencesId, long plid,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.NoSuchPortletPreferencesException,
156             com.liferay.portal.kernel.exception.SystemException {
157         return getPersistence()
158                    .findByPlid_PrevAndNext(portletPreferencesId, plid, obc);
159     }
160 
161     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
162         long plid, java.lang.String portletId)
163         throws com.liferay.portal.kernel.exception.SystemException {
164         return getPersistence().findByP_P(plid, portletId);
165     }
166 
167     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
168         long plid, java.lang.String portletId, int start, int end)
169         throws com.liferay.portal.kernel.exception.SystemException {
170         return getPersistence().findByP_P(plid, portletId, start, end);
171     }
172 
173     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
174         long plid, java.lang.String portletId, int start, int end,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.kernel.exception.SystemException {
177         return getPersistence().findByP_P(plid, portletId, start, end, obc);
178     }
179 
180     public static com.liferay.portal.model.PortletPreferences findByP_P_First(
181         long plid, java.lang.String portletId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.NoSuchPortletPreferencesException,
184             com.liferay.portal.kernel.exception.SystemException {
185         return getPersistence().findByP_P_First(plid, portletId, obc);
186     }
187 
188     public static com.liferay.portal.model.PortletPreferences findByP_P_Last(
189         long plid, java.lang.String portletId,
190         com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.NoSuchPortletPreferencesException,
192             com.liferay.portal.kernel.exception.SystemException {
193         return getPersistence().findByP_P_Last(plid, portletId, obc);
194     }
195 
196     public static com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
197         long portletPreferencesId, long plid, java.lang.String portletId,
198         com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.NoSuchPortletPreferencesException,
200             com.liferay.portal.kernel.exception.SystemException {
201         return getPersistence()
202                    .findByP_P_PrevAndNext(portletPreferencesId, plid,
203             portletId, obc);
204     }
205 
206     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
207         long ownerId, int ownerType, long plid)
208         throws com.liferay.portal.kernel.exception.SystemException {
209         return getPersistence().findByO_O_P(ownerId, ownerType, plid);
210     }
211 
212     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
213         long ownerId, int ownerType, long plid, int start, int end)
214         throws com.liferay.portal.kernel.exception.SystemException {
215         return getPersistence().findByO_O_P(ownerId, ownerType, plid, start, end);
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         com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.kernel.exception.SystemException {
222         return getPersistence()
223                    .findByO_O_P(ownerId, ownerType, plid, start, end, obc);
224     }
225 
226     public static com.liferay.portal.model.PortletPreferences findByO_O_P_First(
227         long ownerId, int ownerType, long plid,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.NoSuchPortletPreferencesException,
230             com.liferay.portal.kernel.exception.SystemException {
231         return getPersistence().findByO_O_P_First(ownerId, ownerType, plid, obc);
232     }
233 
234     public static com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
235         long ownerId, int ownerType, long plid,
236         com.liferay.portal.kernel.util.OrderByComparator obc)
237         throws com.liferay.portal.NoSuchPortletPreferencesException,
238             com.liferay.portal.kernel.exception.SystemException {
239         return getPersistence().findByO_O_P_Last(ownerId, ownerType, plid, obc);
240     }
241 
242     public static com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
243         long portletPreferencesId, long ownerId, int ownerType, long plid,
244         com.liferay.portal.kernel.util.OrderByComparator obc)
245         throws com.liferay.portal.NoSuchPortletPreferencesException,
246             com.liferay.portal.kernel.exception.SystemException {
247         return getPersistence()
248                    .findByO_O_P_PrevAndNext(portletPreferencesId, ownerId,
249             ownerType, plid, obc);
250     }
251 
252     public static com.liferay.portal.model.PortletPreferences findByO_O_P_P(
253         long ownerId, int ownerType, long plid, java.lang.String portletId)
254         throws com.liferay.portal.NoSuchPortletPreferencesException,
255             com.liferay.portal.kernel.exception.SystemException {
256         return getPersistence()
257                    .findByO_O_P_P(ownerId, ownerType, plid, portletId);
258     }
259 
260     public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
261         long ownerId, int ownerType, long plid, java.lang.String portletId)
262         throws com.liferay.portal.kernel.exception.SystemException {
263         return getPersistence()
264                    .fetchByO_O_P_P(ownerId, ownerType, plid, portletId);
265     }
266 
267     public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
268         long ownerId, int ownerType, long plid, java.lang.String portletId,
269         boolean retrieveFromCache)
270         throws com.liferay.portal.kernel.exception.SystemException {
271         return getPersistence()
272                    .fetchByO_O_P_P(ownerId, ownerType, plid, portletId,
273             retrieveFromCache);
274     }
275 
276     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
277         throws com.liferay.portal.kernel.exception.SystemException {
278         return getPersistence().findAll();
279     }
280 
281     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
282         int start, int end)
283         throws com.liferay.portal.kernel.exception.SystemException {
284         return getPersistence().findAll(start, end);
285     }
286 
287     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
288         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
289         throws com.liferay.portal.kernel.exception.SystemException {
290         return getPersistence().findAll(start, end, obc);
291     }
292 
293     public static void removeByPlid(long plid)
294         throws com.liferay.portal.kernel.exception.SystemException {
295         getPersistence().removeByPlid(plid);
296     }
297 
298     public static void removeByP_P(long plid, java.lang.String portletId)
299         throws com.liferay.portal.kernel.exception.SystemException {
300         getPersistence().removeByP_P(plid, portletId);
301     }
302 
303     public static void removeByO_O_P(long ownerId, int ownerType, long plid)
304         throws com.liferay.portal.kernel.exception.SystemException {
305         getPersistence().removeByO_O_P(ownerId, ownerType, plid);
306     }
307 
308     public static void removeByO_O_P_P(long ownerId, int ownerType, long plid,
309         java.lang.String portletId)
310         throws com.liferay.portal.NoSuchPortletPreferencesException,
311             com.liferay.portal.kernel.exception.SystemException {
312         getPersistence().removeByO_O_P_P(ownerId, ownerType, plid, portletId);
313     }
314 
315     public static void removeAll()
316         throws com.liferay.portal.kernel.exception.SystemException {
317         getPersistence().removeAll();
318     }
319 
320     public static int countByPlid(long plid)
321         throws com.liferay.portal.kernel.exception.SystemException {
322         return getPersistence().countByPlid(plid);
323     }
324 
325     public static int countByP_P(long plid, java.lang.String portletId)
326         throws com.liferay.portal.kernel.exception.SystemException {
327         return getPersistence().countByP_P(plid, portletId);
328     }
329 
330     public static int countByO_O_P(long ownerId, int ownerType, long plid)
331         throws com.liferay.portal.kernel.exception.SystemException {
332         return getPersistence().countByO_O_P(ownerId, ownerType, plid);
333     }
334 
335     public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
336         java.lang.String portletId)
337         throws com.liferay.portal.kernel.exception.SystemException {
338         return getPersistence()
339                    .countByO_O_P_P(ownerId, ownerType, plid, portletId);
340     }
341 
342     public static int countAll()
343         throws com.liferay.portal.kernel.exception.SystemException {
344         return getPersistence().countAll();
345     }
346 
347     public static PortletPreferencesPersistence getPersistence() {
348         if (_persistence == null) {
349             _persistence = (PortletPreferencesPersistence)PortalBeanLocatorUtil.locate(PortletPreferencesPersistence.class.getName());
350         }
351 
352         return _persistence;
353     }
354 
355     public void setPersistence(PortletPreferencesPersistence persistence) {
356         _persistence = persistence;
357     }
358 
359     private static PortletPreferencesPersistence _persistence;
360 }