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.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.SystemException {
97          return getPersistence().remove(portletPreferencesId);
98      }
99  
100     /**
101      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
102      */
103     public static com.liferay.portal.model.PortletPreferences update(
104         com.liferay.portal.model.PortletPreferences portletPreferences)
105         throws com.liferay.portal.SystemException {
106         return getPersistence().update(portletPreferences);
107     }
108 
109     public static com.liferay.portal.model.PortletPreferences updateImpl(
110         com.liferay.portal.model.PortletPreferences portletPreferences,
111         boolean merge) throws com.liferay.portal.SystemException {
112         return getPersistence().updateImpl(portletPreferences, merge);
113     }
114 
115     public static com.liferay.portal.model.PortletPreferences findByPrimaryKey(
116         long portletPreferencesId)
117         throws com.liferay.portal.NoSuchPortletPreferencesException,
118             com.liferay.portal.SystemException {
119         return getPersistence().findByPrimaryKey(portletPreferencesId);
120     }
121 
122     public static com.liferay.portal.model.PortletPreferences fetchByPrimaryKey(
123         long portletPreferencesId) throws com.liferay.portal.SystemException {
124         return getPersistence().fetchByPrimaryKey(portletPreferencesId);
125     }
126 
127     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
128         long plid) throws com.liferay.portal.SystemException {
129         return getPersistence().findByPlid(plid);
130     }
131 
132     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
133         long plid, int start, int end)
134         throws com.liferay.portal.SystemException {
135         return getPersistence().findByPlid(plid, start, end);
136     }
137 
138     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
139         long plid, int start, int end,
140         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141         throws com.liferay.portal.SystemException {
142         return getPersistence().findByPlid(plid, start, end, orderByComparator);
143     }
144 
145     public static com.liferay.portal.model.PortletPreferences findByPlid_First(
146         long plid,
147         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
148         throws com.liferay.portal.NoSuchPortletPreferencesException,
149             com.liferay.portal.SystemException {
150         return getPersistence().findByPlid_First(plid, orderByComparator);
151     }
152 
153     public static com.liferay.portal.model.PortletPreferences findByPlid_Last(
154         long plid,
155         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156         throws com.liferay.portal.NoSuchPortletPreferencesException,
157             com.liferay.portal.SystemException {
158         return getPersistence().findByPlid_Last(plid, orderByComparator);
159     }
160 
161     public static com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
162         long portletPreferencesId, long plid,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.NoSuchPortletPreferencesException,
165             com.liferay.portal.SystemException {
166         return getPersistence()
167                    .findByPlid_PrevAndNext(portletPreferencesId, plid,
168             orderByComparator);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
172         long plid, java.lang.String portletId)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findByP_P(plid, portletId);
175     }
176 
177     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
178         long plid, java.lang.String portletId, int start, int end)
179         throws com.liferay.portal.SystemException {
180         return getPersistence().findByP_P(plid, portletId, start, end);
181     }
182 
183     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
184         long plid, java.lang.String portletId, int start, int end,
185         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
186         throws com.liferay.portal.SystemException {
187         return getPersistence()
188                    .findByP_P(plid, portletId, start, end, orderByComparator);
189     }
190 
191     public static com.liferay.portal.model.PortletPreferences findByP_P_First(
192         long plid, java.lang.String portletId,
193         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194         throws com.liferay.portal.NoSuchPortletPreferencesException,
195             com.liferay.portal.SystemException {
196         return getPersistence()
197                    .findByP_P_First(plid, portletId, orderByComparator);
198     }
199 
200     public static com.liferay.portal.model.PortletPreferences findByP_P_Last(
201         long plid, java.lang.String portletId,
202         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203         throws com.liferay.portal.NoSuchPortletPreferencesException,
204             com.liferay.portal.SystemException {
205         return getPersistence()
206                    .findByP_P_Last(plid, portletId, orderByComparator);
207     }
208 
209     public static com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
210         long portletPreferencesId, long plid, java.lang.String portletId,
211         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212         throws com.liferay.portal.NoSuchPortletPreferencesException,
213             com.liferay.portal.SystemException {
214         return getPersistence()
215                    .findByP_P_PrevAndNext(portletPreferencesId, plid,
216             portletId, orderByComparator);
217     }
218 
219     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
220         long ownerId, int ownerType, long plid)
221         throws com.liferay.portal.SystemException {
222         return getPersistence().findByO_O_P(ownerId, ownerType, plid);
223     }
224 
225     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
226         long ownerId, int ownerType, long plid, int start, int end)
227         throws com.liferay.portal.SystemException {
228         return getPersistence().findByO_O_P(ownerId, ownerType, plid, start, end);
229     }
230 
231     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
232         long ownerId, int ownerType, long plid, int start, int end,
233         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
234         throws com.liferay.portal.SystemException {
235         return getPersistence()
236                    .findByO_O_P(ownerId, ownerType, plid, start, end,
237             orderByComparator);
238     }
239 
240     public static com.liferay.portal.model.PortletPreferences findByO_O_P_First(
241         long ownerId, int ownerType, long plid,
242         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243         throws com.liferay.portal.NoSuchPortletPreferencesException,
244             com.liferay.portal.SystemException {
245         return getPersistence()
246                    .findByO_O_P_First(ownerId, ownerType, plid,
247             orderByComparator);
248     }
249 
250     public static com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
251         long ownerId, int ownerType, long plid,
252         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
253         throws com.liferay.portal.NoSuchPortletPreferencesException,
254             com.liferay.portal.SystemException {
255         return getPersistence()
256                    .findByO_O_P_Last(ownerId, ownerType, plid, orderByComparator);
257     }
258 
259     public static com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
260         long portletPreferencesId, long ownerId, int ownerType, long plid,
261         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
262         throws com.liferay.portal.NoSuchPortletPreferencesException,
263             com.liferay.portal.SystemException {
264         return getPersistence()
265                    .findByO_O_P_PrevAndNext(portletPreferencesId, ownerId,
266             ownerType, plid, orderByComparator);
267     }
268 
269     public static com.liferay.portal.model.PortletPreferences findByO_O_P_P(
270         long ownerId, int ownerType, long plid, java.lang.String portletId)
271         throws com.liferay.portal.NoSuchPortletPreferencesException,
272             com.liferay.portal.SystemException {
273         return getPersistence()
274                    .findByO_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         throws com.liferay.portal.SystemException {
280         return getPersistence()
281                    .fetchByO_O_P_P(ownerId, ownerType, plid, portletId);
282     }
283 
284     public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
285         long ownerId, int ownerType, long plid, java.lang.String portletId,
286         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
287         return getPersistence()
288                    .fetchByO_O_P_P(ownerId, ownerType, plid, portletId,
289             retrieveFromCache);
290     }
291 
292     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
293         throws com.liferay.portal.SystemException {
294         return getPersistence().findAll();
295     }
296 
297     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
298         int start, int end) throws com.liferay.portal.SystemException {
299         return getPersistence().findAll(start, end);
300     }
301 
302     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
303         int start, int end,
304         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
305         throws com.liferay.portal.SystemException {
306         return getPersistence().findAll(start, end, orderByComparator);
307     }
308 
309     public static void removeByPlid(long plid)
310         throws com.liferay.portal.SystemException {
311         getPersistence().removeByPlid(plid);
312     }
313 
314     public static void removeByP_P(long plid, java.lang.String portletId)
315         throws com.liferay.portal.SystemException {
316         getPersistence().removeByP_P(plid, portletId);
317     }
318 
319     public static void removeByO_O_P(long ownerId, int ownerType, long plid)
320         throws com.liferay.portal.SystemException {
321         getPersistence().removeByO_O_P(ownerId, ownerType, plid);
322     }
323 
324     public static void removeByO_O_P_P(long ownerId, int ownerType, long plid,
325         java.lang.String portletId)
326         throws com.liferay.portal.NoSuchPortletPreferencesException,
327             com.liferay.portal.SystemException {
328         getPersistence().removeByO_O_P_P(ownerId, ownerType, plid, portletId);
329     }
330 
331     public static void removeAll() throws com.liferay.portal.SystemException {
332         getPersistence().removeAll();
333     }
334 
335     public static int countByPlid(long plid)
336         throws com.liferay.portal.SystemException {
337         return getPersistence().countByPlid(plid);
338     }
339 
340     public static int countByP_P(long plid, java.lang.String portletId)
341         throws com.liferay.portal.SystemException {
342         return getPersistence().countByP_P(plid, portletId);
343     }
344 
345     public static int countByO_O_P(long ownerId, int ownerType, long plid)
346         throws com.liferay.portal.SystemException {
347         return getPersistence().countByO_O_P(ownerId, ownerType, plid);
348     }
349 
350     public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
351         java.lang.String portletId) throws com.liferay.portal.SystemException {
352         return getPersistence()
353                    .countByO_O_P_P(ownerId, ownerType, plid, portletId);
354     }
355 
356     public static int countAll() throws com.liferay.portal.SystemException {
357         return getPersistence().countAll();
358     }
359 
360     public static PortletPreferencesPersistence getPersistence() {
361         if (_persistence == null) {
362             _persistence = (PortletPreferencesPersistence)PortalBeanLocatorUtil.locate(PortletPreferencesPersistence.class.getName());
363         }
364 
365         return _persistence;
366     }
367 
368     public void setPersistence(PortletPreferencesPersistence persistence) {
369         _persistence = persistence;
370     }
371 
372     private static PortletPreferencesPersistence _persistence;
373 }