1
14
15 package com.liferay.portal.service.persistence;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19 import com.liferay.portal.kernel.exception.SystemException;
20 import com.liferay.portal.model.PortletPreferences;
21
22 import java.util.List;
23
24
37 public class PortletPreferencesUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static void clearCache(PortletPreferences portletPreferences) {
49 getPersistence().clearCache(portletPreferences);
50 }
51
52
55 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56 throws SystemException {
57 return getPersistence().countWithDynamicQuery(dynamicQuery);
58 }
59
60
63 public static List<PortletPreferences> findWithDynamicQuery(
64 DynamicQuery dynamicQuery) throws SystemException {
65 return getPersistence().findWithDynamicQuery(dynamicQuery);
66 }
67
68
71 public static List<PortletPreferences> findWithDynamicQuery(
72 DynamicQuery dynamicQuery, int start, int end)
73 throws SystemException {
74 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75 }
76
77
80 public static PortletPreferences remove(
81 PortletPreferences portletPreferences) throws SystemException {
82 return getPersistence().remove(portletPreferences);
83 }
84
85
88 public static PortletPreferences update(
89 PortletPreferences portletPreferences, boolean merge)
90 throws SystemException {
91 return getPersistence().update(portletPreferences, merge);
92 }
93
94 public static void cacheResult(
95 com.liferay.portal.model.PortletPreferences portletPreferences) {
96 getPersistence().cacheResult(portletPreferences);
97 }
98
99 public static void cacheResult(
100 java.util.List<com.liferay.portal.model.PortletPreferences> portletPreferenceses) {
101 getPersistence().cacheResult(portletPreferenceses);
102 }
103
104 public static com.liferay.portal.model.PortletPreferences create(
105 long portletPreferencesId) {
106 return getPersistence().create(portletPreferencesId);
107 }
108
109 public static com.liferay.portal.model.PortletPreferences remove(
110 long portletPreferencesId)
111 throws com.liferay.portal.NoSuchPortletPreferencesException,
112 com.liferay.portal.kernel.exception.SystemException {
113 return getPersistence().remove(portletPreferencesId);
114 }
115
116 public static com.liferay.portal.model.PortletPreferences updateImpl(
117 com.liferay.portal.model.PortletPreferences portletPreferences,
118 boolean merge)
119 throws com.liferay.portal.kernel.exception.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.kernel.exception.SystemException {
127 return getPersistence().findByPrimaryKey(portletPreferencesId);
128 }
129
130 public static com.liferay.portal.model.PortletPreferences fetchByPrimaryKey(
131 long portletPreferencesId)
132 throws com.liferay.portal.kernel.exception.SystemException {
133 return getPersistence().fetchByPrimaryKey(portletPreferencesId);
134 }
135
136 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
137 long plid) throws com.liferay.portal.kernel.exception.SystemException {
138 return getPersistence().findByPlid(plid);
139 }
140
141 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
142 long plid, int start, int end)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getPersistence().findByPlid(plid, start, end);
145 }
146
147 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
148 long plid, int start, int end,
149 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150 throws com.liferay.portal.kernel.exception.SystemException {
151 return getPersistence().findByPlid(plid, start, end, orderByComparator);
152 }
153
154 public static com.liferay.portal.model.PortletPreferences findByPlid_First(
155 long plid,
156 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157 throws com.liferay.portal.NoSuchPortletPreferencesException,
158 com.liferay.portal.kernel.exception.SystemException {
159 return getPersistence().findByPlid_First(plid, orderByComparator);
160 }
161
162 public static com.liferay.portal.model.PortletPreferences findByPlid_Last(
163 long plid,
164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165 throws com.liferay.portal.NoSuchPortletPreferencesException,
166 com.liferay.portal.kernel.exception.SystemException {
167 return getPersistence().findByPlid_Last(plid, orderByComparator);
168 }
169
170 public static com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
171 long portletPreferencesId, long plid,
172 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173 throws com.liferay.portal.NoSuchPortletPreferencesException,
174 com.liferay.portal.kernel.exception.SystemException {
175 return getPersistence()
176 .findByPlid_PrevAndNext(portletPreferencesId, plid,
177 orderByComparator);
178 }
179
180 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
181 long plid, java.lang.String portletId)
182 throws com.liferay.portal.kernel.exception.SystemException {
183 return getPersistence().findByP_P(plid, portletId);
184 }
185
186 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
187 long plid, java.lang.String portletId, int start, int end)
188 throws com.liferay.portal.kernel.exception.SystemException {
189 return getPersistence().findByP_P(plid, portletId, start, end);
190 }
191
192 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
193 long plid, java.lang.String portletId, int start, int end,
194 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195 throws com.liferay.portal.kernel.exception.SystemException {
196 return getPersistence()
197 .findByP_P(plid, portletId, start, end, orderByComparator);
198 }
199
200 public static com.liferay.portal.model.PortletPreferences findByP_P_First(
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.kernel.exception.SystemException {
205 return getPersistence()
206 .findByP_P_First(plid, portletId, orderByComparator);
207 }
208
209 public static com.liferay.portal.model.PortletPreferences findByP_P_Last(
210 long plid, java.lang.String portletId,
211 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212 throws com.liferay.portal.NoSuchPortletPreferencesException,
213 com.liferay.portal.kernel.exception.SystemException {
214 return getPersistence()
215 .findByP_P_Last(plid, portletId, orderByComparator);
216 }
217
218 public static com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
219 long portletPreferencesId, long plid, java.lang.String portletId,
220 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
221 throws com.liferay.portal.NoSuchPortletPreferencesException,
222 com.liferay.portal.kernel.exception.SystemException {
223 return getPersistence()
224 .findByP_P_PrevAndNext(portletPreferencesId, plid,
225 portletId, orderByComparator);
226 }
227
228 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
229 long ownerId, int ownerType, long plid)
230 throws com.liferay.portal.kernel.exception.SystemException {
231 return getPersistence().findByO_O_P(ownerId, ownerType, plid);
232 }
233
234 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
235 long ownerId, int ownerType, long plid, int start, int end)
236 throws com.liferay.portal.kernel.exception.SystemException {
237 return getPersistence().findByO_O_P(ownerId, ownerType, plid, start, end);
238 }
239
240 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
241 long ownerId, int ownerType, long plid, int start, int end,
242 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243 throws com.liferay.portal.kernel.exception.SystemException {
244 return getPersistence()
245 .findByO_O_P(ownerId, ownerType, plid, start, end,
246 orderByComparator);
247 }
248
249 public static com.liferay.portal.model.PortletPreferences findByO_O_P_First(
250 long ownerId, int ownerType, long plid,
251 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252 throws com.liferay.portal.NoSuchPortletPreferencesException,
253 com.liferay.portal.kernel.exception.SystemException {
254 return getPersistence()
255 .findByO_O_P_First(ownerId, ownerType, plid,
256 orderByComparator);
257 }
258
259 public static com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
260 long ownerId, int ownerType, long plid,
261 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
262 throws com.liferay.portal.NoSuchPortletPreferencesException,
263 com.liferay.portal.kernel.exception.SystemException {
264 return getPersistence()
265 .findByO_O_P_Last(ownerId, ownerType, plid, orderByComparator);
266 }
267
268 public static com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
269 long portletPreferencesId, long ownerId, int ownerType, long plid,
270 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
271 throws com.liferay.portal.NoSuchPortletPreferencesException,
272 com.liferay.portal.kernel.exception.SystemException {
273 return getPersistence()
274 .findByO_O_P_PrevAndNext(portletPreferencesId, ownerId,
275 ownerType, plid, orderByComparator);
276 }
277
278 public static com.liferay.portal.model.PortletPreferences findByO_O_P_P(
279 long ownerId, int ownerType, long plid, java.lang.String portletId)
280 throws com.liferay.portal.NoSuchPortletPreferencesException,
281 com.liferay.portal.kernel.exception.SystemException {
282 return getPersistence()
283 .findByO_O_P_P(ownerId, ownerType, plid, portletId);
284 }
285
286 public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
287 long ownerId, int ownerType, long plid, java.lang.String portletId)
288 throws com.liferay.portal.kernel.exception.SystemException {
289 return getPersistence()
290 .fetchByO_O_P_P(ownerId, ownerType, plid, portletId);
291 }
292
293 public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
294 long ownerId, int ownerType, long plid, java.lang.String portletId,
295 boolean retrieveFromCache)
296 throws com.liferay.portal.kernel.exception.SystemException {
297 return getPersistence()
298 .fetchByO_O_P_P(ownerId, ownerType, plid, portletId,
299 retrieveFromCache);
300 }
301
302 public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
303 throws com.liferay.portal.kernel.exception.SystemException {
304 return getPersistence().findAll();
305 }
306
307 public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
308 int start, int end)
309 throws com.liferay.portal.kernel.exception.SystemException {
310 return getPersistence().findAll(start, end);
311 }
312
313 public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
314 int start, int end,
315 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
316 throws com.liferay.portal.kernel.exception.SystemException {
317 return getPersistence().findAll(start, end, orderByComparator);
318 }
319
320 public static void removeByPlid(long plid)
321 throws com.liferay.portal.kernel.exception.SystemException {
322 getPersistence().removeByPlid(plid);
323 }
324
325 public static void removeByP_P(long plid, java.lang.String portletId)
326 throws com.liferay.portal.kernel.exception.SystemException {
327 getPersistence().removeByP_P(plid, portletId);
328 }
329
330 public static void removeByO_O_P(long ownerId, int ownerType, long plid)
331 throws com.liferay.portal.kernel.exception.SystemException {
332 getPersistence().removeByO_O_P(ownerId, ownerType, plid);
333 }
334
335 public static void removeByO_O_P_P(long ownerId, int ownerType, long plid,
336 java.lang.String portletId)
337 throws com.liferay.portal.NoSuchPortletPreferencesException,
338 com.liferay.portal.kernel.exception.SystemException {
339 getPersistence().removeByO_O_P_P(ownerId, ownerType, plid, portletId);
340 }
341
342 public static void removeAll()
343 throws com.liferay.portal.kernel.exception.SystemException {
344 getPersistence().removeAll();
345 }
346
347 public static int countByPlid(long plid)
348 throws com.liferay.portal.kernel.exception.SystemException {
349 return getPersistence().countByPlid(plid);
350 }
351
352 public static int countByP_P(long plid, java.lang.String portletId)
353 throws com.liferay.portal.kernel.exception.SystemException {
354 return getPersistence().countByP_P(plid, portletId);
355 }
356
357 public static int countByO_O_P(long ownerId, int ownerType, long plid)
358 throws com.liferay.portal.kernel.exception.SystemException {
359 return getPersistence().countByO_O_P(ownerId, ownerType, plid);
360 }
361
362 public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
363 java.lang.String portletId)
364 throws com.liferay.portal.kernel.exception.SystemException {
365 return getPersistence()
366 .countByO_O_P_P(ownerId, ownerType, plid, portletId);
367 }
368
369 public static int countAll()
370 throws com.liferay.portal.kernel.exception.SystemException {
371 return getPersistence().countAll();
372 }
373
374 public static PortletPreferencesPersistence getPersistence() {
375 if (_persistence == null) {
376 _persistence = (PortletPreferencesPersistence)PortalBeanLocatorUtil.locate(PortletPreferencesPersistence.class.getName());
377 }
378
379 return _persistence;
380 }
381
382 public void setPersistence(PortletPreferencesPersistence persistence) {
383 _persistence = persistence;
384 }
385
386 private static PortletPreferencesPersistence _persistence;
387 }