001
014
015 package com.liferay.portal.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.kernel.util.OrderByComparator;
021 import com.liferay.portal.model.PortletPreferences;
022 import com.liferay.portal.service.ServiceContext;
023
024 import java.util.List;
025
026
032 public class PortletPreferencesUtil {
033
036 public static void clearCache() {
037 getPersistence().clearCache();
038 }
039
040
043 public static void clearCache(PortletPreferences portletPreferences) {
044 getPersistence().clearCache(portletPreferences);
045 }
046
047
050 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051 throws SystemException {
052 return getPersistence().countWithDynamicQuery(dynamicQuery);
053 }
054
055
058 public static List<PortletPreferences> findWithDynamicQuery(
059 DynamicQuery dynamicQuery) throws SystemException {
060 return getPersistence().findWithDynamicQuery(dynamicQuery);
061 }
062
063
066 public static List<PortletPreferences> findWithDynamicQuery(
067 DynamicQuery dynamicQuery, int start, int end)
068 throws SystemException {
069 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070 }
071
072
075 public static List<PortletPreferences> findWithDynamicQuery(
076 DynamicQuery dynamicQuery, int start, int end,
077 OrderByComparator orderByComparator) throws SystemException {
078 return getPersistence()
079 .findWithDynamicQuery(dynamicQuery, start, end,
080 orderByComparator);
081 }
082
083
086 public static PortletPreferences remove(
087 PortletPreferences portletPreferences) throws SystemException {
088 return getPersistence().remove(portletPreferences);
089 }
090
091
094 public static PortletPreferences update(
095 PortletPreferences portletPreferences, boolean merge)
096 throws SystemException {
097 return getPersistence().update(portletPreferences, merge);
098 }
099
100
103 public static PortletPreferences update(
104 PortletPreferences portletPreferences, boolean merge,
105 ServiceContext serviceContext) throws SystemException {
106 return getPersistence().update(portletPreferences, merge, serviceContext);
107 }
108
109 public static void cacheResult(
110 com.liferay.portal.model.PortletPreferences portletPreferences) {
111 getPersistence().cacheResult(portletPreferences);
112 }
113
114 public static void cacheResult(
115 java.util.List<com.liferay.portal.model.PortletPreferences> portletPreferenceses) {
116 getPersistence().cacheResult(portletPreferenceses);
117 }
118
119 public static com.liferay.portal.model.PortletPreferences create(
120 long portletPreferencesId) {
121 return getPersistence().create(portletPreferencesId);
122 }
123
124 public static com.liferay.portal.model.PortletPreferences remove(
125 long portletPreferencesId)
126 throws com.liferay.portal.NoSuchPortletPreferencesException,
127 com.liferay.portal.kernel.exception.SystemException {
128 return getPersistence().remove(portletPreferencesId);
129 }
130
131 public static com.liferay.portal.model.PortletPreferences updateImpl(
132 com.liferay.portal.model.PortletPreferences portletPreferences,
133 boolean merge)
134 throws com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence().updateImpl(portletPreferences, merge);
136 }
137
138 public static com.liferay.portal.model.PortletPreferences findByPrimaryKey(
139 long portletPreferencesId)
140 throws com.liferay.portal.NoSuchPortletPreferencesException,
141 com.liferay.portal.kernel.exception.SystemException {
142 return getPersistence().findByPrimaryKey(portletPreferencesId);
143 }
144
145 public static com.liferay.portal.model.PortletPreferences fetchByPrimaryKey(
146 long portletPreferencesId)
147 throws com.liferay.portal.kernel.exception.SystemException {
148 return getPersistence().fetchByPrimaryKey(portletPreferencesId);
149 }
150
151 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
152 long plid) throws com.liferay.portal.kernel.exception.SystemException {
153 return getPersistence().findByPlid(plid);
154 }
155
156 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
157 long plid, int start, int end)
158 throws com.liferay.portal.kernel.exception.SystemException {
159 return getPersistence().findByPlid(plid, start, end);
160 }
161
162 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
163 long plid, int start, int end,
164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165 throws com.liferay.portal.kernel.exception.SystemException {
166 return getPersistence().findByPlid(plid, start, end, orderByComparator);
167 }
168
169 public static com.liferay.portal.model.PortletPreferences findByPlid_First(
170 long plid,
171 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172 throws com.liferay.portal.NoSuchPortletPreferencesException,
173 com.liferay.portal.kernel.exception.SystemException {
174 return getPersistence().findByPlid_First(plid, orderByComparator);
175 }
176
177 public static com.liferay.portal.model.PortletPreferences findByPlid_Last(
178 long plid,
179 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180 throws com.liferay.portal.NoSuchPortletPreferencesException,
181 com.liferay.portal.kernel.exception.SystemException {
182 return getPersistence().findByPlid_Last(plid, orderByComparator);
183 }
184
185 public static com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
186 long portletPreferencesId, long plid,
187 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
188 throws com.liferay.portal.NoSuchPortletPreferencesException,
189 com.liferay.portal.kernel.exception.SystemException {
190 return getPersistence()
191 .findByPlid_PrevAndNext(portletPreferencesId, plid,
192 orderByComparator);
193 }
194
195 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
196 long plid, java.lang.String portletId)
197 throws com.liferay.portal.kernel.exception.SystemException {
198 return getPersistence().findByP_P(plid, portletId);
199 }
200
201 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
202 long plid, java.lang.String portletId, int start, int end)
203 throws com.liferay.portal.kernel.exception.SystemException {
204 return getPersistence().findByP_P(plid, portletId, start, end);
205 }
206
207 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
208 long plid, java.lang.String portletId, int start, int end,
209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210 throws com.liferay.portal.kernel.exception.SystemException {
211 return getPersistence()
212 .findByP_P(plid, portletId, start, end, orderByComparator);
213 }
214
215 public static com.liferay.portal.model.PortletPreferences findByP_P_First(
216 long plid, java.lang.String portletId,
217 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
218 throws com.liferay.portal.NoSuchPortletPreferencesException,
219 com.liferay.portal.kernel.exception.SystemException {
220 return getPersistence()
221 .findByP_P_First(plid, portletId, orderByComparator);
222 }
223
224 public static com.liferay.portal.model.PortletPreferences findByP_P_Last(
225 long plid, java.lang.String portletId,
226 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227 throws com.liferay.portal.NoSuchPortletPreferencesException,
228 com.liferay.portal.kernel.exception.SystemException {
229 return getPersistence()
230 .findByP_P_Last(plid, portletId, orderByComparator);
231 }
232
233 public static com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
234 long portletPreferencesId, long plid, java.lang.String portletId,
235 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
236 throws com.liferay.portal.NoSuchPortletPreferencesException,
237 com.liferay.portal.kernel.exception.SystemException {
238 return getPersistence()
239 .findByP_P_PrevAndNext(portletPreferencesId, plid,
240 portletId, orderByComparator);
241 }
242
243 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
244 long ownerId, int ownerType, long plid)
245 throws com.liferay.portal.kernel.exception.SystemException {
246 return getPersistence().findByO_O_P(ownerId, ownerType, plid);
247 }
248
249 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
250 long ownerId, int ownerType, long plid, int start, int end)
251 throws com.liferay.portal.kernel.exception.SystemException {
252 return getPersistence().findByO_O_P(ownerId, ownerType, plid, start, end);
253 }
254
255 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
256 long ownerId, int ownerType, long plid, int start, int end,
257 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
258 throws com.liferay.portal.kernel.exception.SystemException {
259 return getPersistence()
260 .findByO_O_P(ownerId, ownerType, plid, start, end,
261 orderByComparator);
262 }
263
264 public static com.liferay.portal.model.PortletPreferences findByO_O_P_First(
265 long ownerId, int ownerType, long plid,
266 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267 throws com.liferay.portal.NoSuchPortletPreferencesException,
268 com.liferay.portal.kernel.exception.SystemException {
269 return getPersistence()
270 .findByO_O_P_First(ownerId, ownerType, plid,
271 orderByComparator);
272 }
273
274 public static com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
275 long ownerId, int ownerType, long plid,
276 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
277 throws com.liferay.portal.NoSuchPortletPreferencesException,
278 com.liferay.portal.kernel.exception.SystemException {
279 return getPersistence()
280 .findByO_O_P_Last(ownerId, ownerType, plid, orderByComparator);
281 }
282
283 public static com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
284 long portletPreferencesId, long ownerId, int ownerType, long plid,
285 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
286 throws com.liferay.portal.NoSuchPortletPreferencesException,
287 com.liferay.portal.kernel.exception.SystemException {
288 return getPersistence()
289 .findByO_O_P_PrevAndNext(portletPreferencesId, ownerId,
290 ownerType, plid, orderByComparator);
291 }
292
293 public static com.liferay.portal.model.PortletPreferences findByO_O_P_P(
294 long ownerId, int ownerType, long plid, java.lang.String portletId)
295 throws com.liferay.portal.NoSuchPortletPreferencesException,
296 com.liferay.portal.kernel.exception.SystemException {
297 return getPersistence()
298 .findByO_O_P_P(ownerId, ownerType, plid, portletId);
299 }
300
301 public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
302 long ownerId, int ownerType, long plid, java.lang.String portletId)
303 throws com.liferay.portal.kernel.exception.SystemException {
304 return getPersistence()
305 .fetchByO_O_P_P(ownerId, ownerType, plid, portletId);
306 }
307
308 public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
309 long ownerId, int ownerType, long plid, java.lang.String portletId,
310 boolean retrieveFromCache)
311 throws com.liferay.portal.kernel.exception.SystemException {
312 return getPersistence()
313 .fetchByO_O_P_P(ownerId, ownerType, plid, portletId,
314 retrieveFromCache);
315 }
316
317 public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
318 throws com.liferay.portal.kernel.exception.SystemException {
319 return getPersistence().findAll();
320 }
321
322 public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
323 int start, int end)
324 throws com.liferay.portal.kernel.exception.SystemException {
325 return getPersistence().findAll(start, end);
326 }
327
328 public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
329 int start, int end,
330 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
331 throws com.liferay.portal.kernel.exception.SystemException {
332 return getPersistence().findAll(start, end, orderByComparator);
333 }
334
335 public static void removeByPlid(long plid)
336 throws com.liferay.portal.kernel.exception.SystemException {
337 getPersistence().removeByPlid(plid);
338 }
339
340 public static void removeByP_P(long plid, java.lang.String portletId)
341 throws com.liferay.portal.kernel.exception.SystemException {
342 getPersistence().removeByP_P(plid, portletId);
343 }
344
345 public static void removeByO_O_P(long ownerId, int ownerType, long plid)
346 throws com.liferay.portal.kernel.exception.SystemException {
347 getPersistence().removeByO_O_P(ownerId, ownerType, plid);
348 }
349
350 public static void removeByO_O_P_P(long ownerId, int ownerType, long plid,
351 java.lang.String portletId)
352 throws com.liferay.portal.NoSuchPortletPreferencesException,
353 com.liferay.portal.kernel.exception.SystemException {
354 getPersistence().removeByO_O_P_P(ownerId, ownerType, plid, portletId);
355 }
356
357 public static void removeAll()
358 throws com.liferay.portal.kernel.exception.SystemException {
359 getPersistence().removeAll();
360 }
361
362 public static int countByPlid(long plid)
363 throws com.liferay.portal.kernel.exception.SystemException {
364 return getPersistence().countByPlid(plid);
365 }
366
367 public static int countByP_P(long plid, java.lang.String portletId)
368 throws com.liferay.portal.kernel.exception.SystemException {
369 return getPersistence().countByP_P(plid, portletId);
370 }
371
372 public static int countByO_O_P(long ownerId, int ownerType, long plid)
373 throws com.liferay.portal.kernel.exception.SystemException {
374 return getPersistence().countByO_O_P(ownerId, ownerType, plid);
375 }
376
377 public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
378 java.lang.String portletId)
379 throws com.liferay.portal.kernel.exception.SystemException {
380 return getPersistence()
381 .countByO_O_P_P(ownerId, ownerType, plid, portletId);
382 }
383
384 public static int countAll()
385 throws com.liferay.portal.kernel.exception.SystemException {
386 return getPersistence().countAll();
387 }
388
389 public static PortletPreferencesPersistence getPersistence() {
390 if (_persistence == null) {
391 _persistence = (PortletPreferencesPersistence)PortalBeanLocatorUtil.locate(PortletPreferencesPersistence.class.getName());
392 }
393
394 return _persistence;
395 }
396
397 public void setPersistence(PortletPreferencesPersistence persistence) {
398 _persistence = persistence;
399 }
400
401 private static PortletPreferencesPersistence _persistence;
402 }