1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <a href="PortletPreferencesUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class PortletPreferencesUtil {
32      public static com.liferay.portal.model.PortletPreferences create(
33          long portletPreferencesId) {
34          return getPersistence().create(portletPreferencesId);
35      }
36  
37      public static com.liferay.portal.model.PortletPreferences remove(
38          long portletPreferencesId)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portal.NoSuchPortletPreferencesException {
41          return getPersistence().remove(portletPreferencesId);
42      }
43  
44      public static com.liferay.portal.model.PortletPreferences remove(
45          com.liferay.portal.model.PortletPreferences portletPreferences)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(portletPreferences);
48      }
49  
50      public static com.liferay.portal.model.PortletPreferences update(
51          com.liferay.portal.model.PortletPreferences portletPreferences)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(portletPreferences);
54      }
55  
56      public static com.liferay.portal.model.PortletPreferences update(
57          com.liferay.portal.model.PortletPreferences portletPreferences,
58          boolean merge) throws com.liferay.portal.SystemException {
59          return getPersistence().update(portletPreferences, merge);
60      }
61  
62      public static com.liferay.portal.model.PortletPreferences updateImpl(
63          com.liferay.portal.model.PortletPreferences portletPreferences,
64          boolean merge) throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(portletPreferences, merge);
66      }
67  
68      public static com.liferay.portal.model.PortletPreferences findByPrimaryKey(
69          long portletPreferencesId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portal.NoSuchPortletPreferencesException {
72          return getPersistence().findByPrimaryKey(portletPreferencesId);
73      }
74  
75      public static com.liferay.portal.model.PortletPreferences fetchByPrimaryKey(
76          long portletPreferencesId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(portletPreferencesId);
78      }
79  
80      public static java.util.List findByPlid(long plid)
81          throws com.liferay.portal.SystemException {
82          return getPersistence().findByPlid(plid);
83      }
84  
85      public static java.util.List findByPlid(long plid, int begin, int end)
86          throws com.liferay.portal.SystemException {
87          return getPersistence().findByPlid(plid, begin, end);
88      }
89  
90      public static java.util.List findByPlid(long plid, int begin, int end,
91          com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findByPlid(plid, begin, end, obc);
94      }
95  
96      public static com.liferay.portal.model.PortletPreferences findByPlid_First(
97          long plid, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portal.NoSuchPortletPreferencesException {
100         return getPersistence().findByPlid_First(plid, obc);
101     }
102 
103     public static com.liferay.portal.model.PortletPreferences findByPlid_Last(
104         long plid, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portal.NoSuchPortletPreferencesException {
107         return getPersistence().findByPlid_Last(plid, obc);
108     }
109 
110     public static com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
111         long portletPreferencesId, long plid,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portal.NoSuchPortletPreferencesException {
115         return getPersistence().findByPlid_PrevAndNext(portletPreferencesId,
116             plid, obc);
117     }
118 
119     public static java.util.List findByP_P(long plid, java.lang.String portletId)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().findByP_P(plid, portletId);
122     }
123 
124     public static java.util.List findByP_P(long plid,
125         java.lang.String portletId, int begin, int end)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().findByP_P(plid, portletId, begin, end);
128     }
129 
130     public static java.util.List findByP_P(long plid,
131         java.lang.String portletId, int begin, int end,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException {
134         return getPersistence().findByP_P(plid, portletId, begin, end, obc);
135     }
136 
137     public static com.liferay.portal.model.PortletPreferences findByP_P_First(
138         long plid, java.lang.String portletId,
139         com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException, 
141             com.liferay.portal.NoSuchPortletPreferencesException {
142         return getPersistence().findByP_P_First(plid, portletId, obc);
143     }
144 
145     public static com.liferay.portal.model.PortletPreferences findByP_P_Last(
146         long plid, java.lang.String portletId,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException, 
149             com.liferay.portal.NoSuchPortletPreferencesException {
150         return getPersistence().findByP_P_Last(plid, portletId, obc);
151     }
152 
153     public static com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
154         long portletPreferencesId, long plid, java.lang.String portletId,
155         com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException, 
157             com.liferay.portal.NoSuchPortletPreferencesException {
158         return getPersistence().findByP_P_PrevAndNext(portletPreferencesId,
159             plid, portletId, obc);
160     }
161 
162     public static java.util.List findByO_O_P(long ownerId, int ownerType,
163         long plid) throws com.liferay.portal.SystemException {
164         return getPersistence().findByO_O_P(ownerId, ownerType, plid);
165     }
166 
167     public static java.util.List findByO_O_P(long ownerId, int ownerType,
168         long plid, int begin, int end)
169         throws com.liferay.portal.SystemException {
170         return getPersistence().findByO_O_P(ownerId, ownerType, plid, begin, end);
171     }
172 
173     public static java.util.List findByO_O_P(long ownerId, int ownerType,
174         long plid, int begin, int end,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException {
177         return getPersistence().findByO_O_P(ownerId, ownerType, plid, begin,
178             end, obc);
179     }
180 
181     public static com.liferay.portal.model.PortletPreferences findByO_O_P_First(
182         long ownerId, int ownerType, long plid,
183         com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException, 
185             com.liferay.portal.NoSuchPortletPreferencesException {
186         return getPersistence().findByO_O_P_First(ownerId, ownerType, plid, obc);
187     }
188 
189     public static com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
190         long ownerId, int ownerType, long plid,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException, 
193             com.liferay.portal.NoSuchPortletPreferencesException {
194         return getPersistence().findByO_O_P_Last(ownerId, ownerType, plid, obc);
195     }
196 
197     public static com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
198         long portletPreferencesId, long ownerId, int ownerType, long plid,
199         com.liferay.portal.kernel.util.OrderByComparator obc)
200         throws com.liferay.portal.SystemException, 
201             com.liferay.portal.NoSuchPortletPreferencesException {
202         return getPersistence().findByO_O_P_PrevAndNext(portletPreferencesId,
203             ownerId, ownerType, plid, obc);
204     }
205 
206     public static com.liferay.portal.model.PortletPreferences findByO_O_P_P(
207         long ownerId, int ownerType, long plid, java.lang.String portletId)
208         throws com.liferay.portal.SystemException, 
209             com.liferay.portal.NoSuchPortletPreferencesException {
210         return getPersistence().findByO_O_P_P(ownerId, ownerType, plid,
211             portletId);
212     }
213 
214     public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
215         long ownerId, int ownerType, long plid, java.lang.String portletId)
216         throws com.liferay.portal.SystemException {
217         return getPersistence().fetchByO_O_P_P(ownerId, ownerType, plid,
218             portletId);
219     }
220 
221     public static java.util.List findWithDynamicQuery(
222         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
223         throws com.liferay.portal.SystemException {
224         return getPersistence().findWithDynamicQuery(queryInitializer);
225     }
226 
227     public static java.util.List findWithDynamicQuery(
228         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
229         int begin, int end) throws com.liferay.portal.SystemException {
230         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
231             end);
232     }
233 
234     public static java.util.List findAll()
235         throws com.liferay.portal.SystemException {
236         return getPersistence().findAll();
237     }
238 
239     public static java.util.List findAll(int begin, int end)
240         throws com.liferay.portal.SystemException {
241         return getPersistence().findAll(begin, end);
242     }
243 
244     public static java.util.List findAll(int begin, int end,
245         com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().findAll(begin, end, obc);
248     }
249 
250     public static void removeByPlid(long plid)
251         throws com.liferay.portal.SystemException {
252         getPersistence().removeByPlid(plid);
253     }
254 
255     public static void removeByP_P(long plid, java.lang.String portletId)
256         throws com.liferay.portal.SystemException {
257         getPersistence().removeByP_P(plid, portletId);
258     }
259 
260     public static void removeByO_O_P(long ownerId, int ownerType, long plid)
261         throws com.liferay.portal.SystemException {
262         getPersistence().removeByO_O_P(ownerId, ownerType, plid);
263     }
264 
265     public static void removeByO_O_P_P(long ownerId, int ownerType, long plid,
266         java.lang.String portletId)
267         throws com.liferay.portal.SystemException, 
268             com.liferay.portal.NoSuchPortletPreferencesException {
269         getPersistence().removeByO_O_P_P(ownerId, ownerType, plid, portletId);
270     }
271 
272     public static void removeAll() throws com.liferay.portal.SystemException {
273         getPersistence().removeAll();
274     }
275 
276     public static int countByPlid(long plid)
277         throws com.liferay.portal.SystemException {
278         return getPersistence().countByPlid(plid);
279     }
280 
281     public static int countByP_P(long plid, java.lang.String portletId)
282         throws com.liferay.portal.SystemException {
283         return getPersistence().countByP_P(plid, portletId);
284     }
285 
286     public static int countByO_O_P(long ownerId, int ownerType, long plid)
287         throws com.liferay.portal.SystemException {
288         return getPersistence().countByO_O_P(ownerId, ownerType, plid);
289     }
290 
291     public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
292         java.lang.String portletId) throws com.liferay.portal.SystemException {
293         return getPersistence().countByO_O_P_P(ownerId, ownerType, plid,
294             portletId);
295     }
296 
297     public static int countAll() throws com.liferay.portal.SystemException {
298         return getPersistence().countAll();
299     }
300 
301     public static PortletPreferencesPersistence getPersistence() {
302         return _getUtil()._persistence;
303     }
304 
305     public void setPersistence(PortletPreferencesPersistence persistence) {
306         _persistence = persistence;
307     }
308 
309     private static PortletPreferencesUtil _getUtil() {
310         if (_util == null) {
311             _util = (PortletPreferencesUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
312         }
313 
314         return _util;
315     }
316 
317     private static final String _UTIL = PortletPreferencesUtil.class.getName();
318     private static PortletPreferencesUtil _util;
319     private PortletPreferencesPersistence _persistence;
320 }