1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  
26  /**
27   * <a href="PortletPreferencesUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       PortletPreferencesPersistence
36   * @see       PortletPreferencesPersistenceImpl
37   * @generated
38   */
39  public class PortletPreferencesUtil {
40      public static void cacheResult(
41          com.liferay.portal.model.PortletPreferences portletPreferences) {
42          getPersistence().cacheResult(portletPreferences);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portal.model.PortletPreferences> portletPreferenceses) {
47          getPersistence().cacheResult(portletPreferenceses);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portal.model.PortletPreferences create(
55          long portletPreferencesId) {
56          return getPersistence().create(portletPreferencesId);
57      }
58  
59      public static com.liferay.portal.model.PortletPreferences remove(
60          long portletPreferencesId)
61          throws com.liferay.portal.NoSuchPortletPreferencesException,
62              com.liferay.portal.SystemException {
63          return getPersistence().remove(portletPreferencesId);
64      }
65  
66      public static com.liferay.portal.model.PortletPreferences remove(
67          com.liferay.portal.model.PortletPreferences portletPreferences)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(portletPreferences);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(PortletPreferences, boolean merge)}.
74       */
75      public static com.liferay.portal.model.PortletPreferences update(
76          com.liferay.portal.model.PortletPreferences portletPreferences)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(portletPreferences);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  portletPreferences the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when portletPreferences is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portal.model.PortletPreferences update(
94          com.liferay.portal.model.PortletPreferences portletPreferences,
95          boolean merge) throws com.liferay.portal.SystemException {
96          return getPersistence().update(portletPreferences, merge);
97      }
98  
99      public static com.liferay.portal.model.PortletPreferences updateImpl(
100         com.liferay.portal.model.PortletPreferences portletPreferences,
101         boolean merge) throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(portletPreferences, merge);
103     }
104 
105     public static com.liferay.portal.model.PortletPreferences findByPrimaryKey(
106         long portletPreferencesId)
107         throws com.liferay.portal.NoSuchPortletPreferencesException,
108             com.liferay.portal.SystemException {
109         return getPersistence().findByPrimaryKey(portletPreferencesId);
110     }
111 
112     public static com.liferay.portal.model.PortletPreferences fetchByPrimaryKey(
113         long portletPreferencesId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(portletPreferencesId);
115     }
116 
117     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
118         long plid) throws com.liferay.portal.SystemException {
119         return getPersistence().findByPlid(plid);
120     }
121 
122     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
123         long plid, int start, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByPlid(plid, start, end);
126     }
127 
128     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
129         long plid, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByPlid(plid, start, end, obc);
133     }
134 
135     public static com.liferay.portal.model.PortletPreferences findByPlid_First(
136         long plid, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.NoSuchPortletPreferencesException,
138             com.liferay.portal.SystemException {
139         return getPersistence().findByPlid_First(plid, obc);
140     }
141 
142     public static com.liferay.portal.model.PortletPreferences findByPlid_Last(
143         long plid, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.NoSuchPortletPreferencesException,
145             com.liferay.portal.SystemException {
146         return getPersistence().findByPlid_Last(plid, obc);
147     }
148 
149     public static com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
150         long portletPreferencesId, long plid,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.NoSuchPortletPreferencesException,
153             com.liferay.portal.SystemException {
154         return getPersistence()
155                    .findByPlid_PrevAndNext(portletPreferencesId, plid, obc);
156     }
157 
158     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
159         long plid, java.lang.String portletId)
160         throws com.liferay.portal.SystemException {
161         return getPersistence().findByP_P(plid, portletId);
162     }
163 
164     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
165         long plid, java.lang.String portletId, int start, int end)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findByP_P(plid, portletId, start, end);
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         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findByP_P(plid, portletId, start, end, obc);
175     }
176 
177     public static com.liferay.portal.model.PortletPreferences findByP_P_First(
178         long plid, java.lang.String portletId,
179         com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.NoSuchPortletPreferencesException,
181             com.liferay.portal.SystemException {
182         return getPersistence().findByP_P_First(plid, portletId, obc);
183     }
184 
185     public static com.liferay.portal.model.PortletPreferences findByP_P_Last(
186         long plid, java.lang.String portletId,
187         com.liferay.portal.kernel.util.OrderByComparator obc)
188         throws com.liferay.portal.NoSuchPortletPreferencesException,
189             com.liferay.portal.SystemException {
190         return getPersistence().findByP_P_Last(plid, portletId, obc);
191     }
192 
193     public static com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
194         long portletPreferencesId, long plid, java.lang.String portletId,
195         com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.NoSuchPortletPreferencesException,
197             com.liferay.portal.SystemException {
198         return getPersistence()
199                    .findByP_P_PrevAndNext(portletPreferencesId, plid,
200             portletId, obc);
201     }
202 
203     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
204         long ownerId, int ownerType, long plid)
205         throws com.liferay.portal.SystemException {
206         return getPersistence().findByO_O_P(ownerId, ownerType, plid);
207     }
208 
209     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
210         long ownerId, int ownerType, long plid, int start, int end)
211         throws com.liferay.portal.SystemException {
212         return getPersistence().findByO_O_P(ownerId, ownerType, plid, start, end);
213     }
214 
215     public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
216         long ownerId, int ownerType, long plid, int start, int end,
217         com.liferay.portal.kernel.util.OrderByComparator obc)
218         throws com.liferay.portal.SystemException {
219         return getPersistence()
220                    .findByO_O_P(ownerId, ownerType, plid, start, end, obc);
221     }
222 
223     public static com.liferay.portal.model.PortletPreferences findByO_O_P_First(
224         long ownerId, int ownerType, long plid,
225         com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.NoSuchPortletPreferencesException,
227             com.liferay.portal.SystemException {
228         return getPersistence().findByO_O_P_First(ownerId, ownerType, plid, obc);
229     }
230 
231     public static com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
232         long ownerId, int ownerType, long plid,
233         com.liferay.portal.kernel.util.OrderByComparator obc)
234         throws com.liferay.portal.NoSuchPortletPreferencesException,
235             com.liferay.portal.SystemException {
236         return getPersistence().findByO_O_P_Last(ownerId, ownerType, plid, obc);
237     }
238 
239     public static com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
240         long portletPreferencesId, long ownerId, int ownerType, long plid,
241         com.liferay.portal.kernel.util.OrderByComparator obc)
242         throws com.liferay.portal.NoSuchPortletPreferencesException,
243             com.liferay.portal.SystemException {
244         return getPersistence()
245                    .findByO_O_P_PrevAndNext(portletPreferencesId, ownerId,
246             ownerType, plid, obc);
247     }
248 
249     public static com.liferay.portal.model.PortletPreferences findByO_O_P_P(
250         long ownerId, int ownerType, long plid, java.lang.String portletId)
251         throws com.liferay.portal.NoSuchPortletPreferencesException,
252             com.liferay.portal.SystemException {
253         return getPersistence()
254                    .findByO_O_P_P(ownerId, ownerType, plid, portletId);
255     }
256 
257     public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
258         long ownerId, int ownerType, long plid, java.lang.String portletId)
259         throws com.liferay.portal.SystemException {
260         return getPersistence()
261                    .fetchByO_O_P_P(ownerId, ownerType, plid, portletId);
262     }
263 
264     public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
265         long ownerId, int ownerType, long plid, java.lang.String portletId,
266         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
267         return getPersistence()
268                    .fetchByO_O_P_P(ownerId, ownerType, plid, portletId,
269             retrieveFromCache);
270     }
271 
272     public static java.util.List<Object> findWithDynamicQuery(
273         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
274         throws com.liferay.portal.SystemException {
275         return getPersistence().findWithDynamicQuery(dynamicQuery);
276     }
277 
278     public static java.util.List<Object> findWithDynamicQuery(
279         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
280         int end) throws com.liferay.portal.SystemException {
281         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
282     }
283 
284     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
285         throws com.liferay.portal.SystemException {
286         return getPersistence().findAll();
287     }
288 
289     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
290         int start, int end) throws com.liferay.portal.SystemException {
291         return getPersistence().findAll(start, end);
292     }
293 
294     public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
295         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
296         throws com.liferay.portal.SystemException {
297         return getPersistence().findAll(start, end, obc);
298     }
299 
300     public static void removeByPlid(long plid)
301         throws com.liferay.portal.SystemException {
302         getPersistence().removeByPlid(plid);
303     }
304 
305     public static void removeByP_P(long plid, java.lang.String portletId)
306         throws com.liferay.portal.SystemException {
307         getPersistence().removeByP_P(plid, portletId);
308     }
309 
310     public static void removeByO_O_P(long ownerId, int ownerType, long plid)
311         throws com.liferay.portal.SystemException {
312         getPersistence().removeByO_O_P(ownerId, ownerType, plid);
313     }
314 
315     public static void removeByO_O_P_P(long ownerId, int ownerType, long plid,
316         java.lang.String portletId)
317         throws com.liferay.portal.NoSuchPortletPreferencesException,
318             com.liferay.portal.SystemException {
319         getPersistence().removeByO_O_P_P(ownerId, ownerType, plid, portletId);
320     }
321 
322     public static void removeAll() throws com.liferay.portal.SystemException {
323         getPersistence().removeAll();
324     }
325 
326     public static int countByPlid(long plid)
327         throws com.liferay.portal.SystemException {
328         return getPersistence().countByPlid(plid);
329     }
330 
331     public static int countByP_P(long plid, java.lang.String portletId)
332         throws com.liferay.portal.SystemException {
333         return getPersistence().countByP_P(plid, portletId);
334     }
335 
336     public static int countByO_O_P(long ownerId, int ownerType, long plid)
337         throws com.liferay.portal.SystemException {
338         return getPersistence().countByO_O_P(ownerId, ownerType, plid);
339     }
340 
341     public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
342         java.lang.String portletId) throws com.liferay.portal.SystemException {
343         return getPersistence()
344                    .countByO_O_P_P(ownerId, ownerType, plid, portletId);
345     }
346 
347     public static int countAll() throws com.liferay.portal.SystemException {
348         return getPersistence().countAll();
349     }
350 
351     public static PortletPreferencesPersistence getPersistence() {
352         return _persistence;
353     }
354 
355     public void setPersistence(PortletPreferencesPersistence persistence) {
356         _persistence = persistence;
357     }
358 
359     private static PortletPreferencesPersistence _persistence;
360 }