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