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.Layout;
21
22 import java.util.List;
23
24
37 public class LayoutUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49 throws SystemException {
50 return getPersistence().findWithDynamicQuery(dynamicQuery);
51 }
52
53
56 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57 int start, int end) throws SystemException {
58 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59 }
60
61
64 public static Layout remove(Layout layout) throws SystemException {
65 return getPersistence().remove(layout);
66 }
67
68
71 public static Layout update(Layout layout, boolean merge)
72 throws SystemException {
73 return getPersistence().update(layout, merge);
74 }
75
76 public static void cacheResult(com.liferay.portal.model.Layout layout) {
77 getPersistence().cacheResult(layout);
78 }
79
80 public static void cacheResult(
81 java.util.List<com.liferay.portal.model.Layout> layouts) {
82 getPersistence().cacheResult(layouts);
83 }
84
85 public static com.liferay.portal.model.Layout create(long plid) {
86 return getPersistence().create(plid);
87 }
88
89 public static com.liferay.portal.model.Layout remove(long plid)
90 throws com.liferay.portal.NoSuchLayoutException,
91 com.liferay.portal.kernel.exception.SystemException {
92 return getPersistence().remove(plid);
93 }
94
95 public static com.liferay.portal.model.Layout updateImpl(
96 com.liferay.portal.model.Layout layout, boolean merge)
97 throws com.liferay.portal.kernel.exception.SystemException {
98 return getPersistence().updateImpl(layout, merge);
99 }
100
101 public static com.liferay.portal.model.Layout findByPrimaryKey(long plid)
102 throws com.liferay.portal.NoSuchLayoutException,
103 com.liferay.portal.kernel.exception.SystemException {
104 return getPersistence().findByPrimaryKey(plid);
105 }
106
107 public static com.liferay.portal.model.Layout fetchByPrimaryKey(long plid)
108 throws com.liferay.portal.kernel.exception.SystemException {
109 return getPersistence().fetchByPrimaryKey(plid);
110 }
111
112 public static java.util.List<com.liferay.portal.model.Layout> findByGroupId(
113 long groupId)
114 throws com.liferay.portal.kernel.exception.SystemException {
115 return getPersistence().findByGroupId(groupId);
116 }
117
118 public static java.util.List<com.liferay.portal.model.Layout> findByGroupId(
119 long groupId, int start, int end)
120 throws com.liferay.portal.kernel.exception.SystemException {
121 return getPersistence().findByGroupId(groupId, start, end);
122 }
123
124 public static java.util.List<com.liferay.portal.model.Layout> findByGroupId(
125 long groupId, int start, int end,
126 com.liferay.portal.kernel.util.OrderByComparator obc)
127 throws com.liferay.portal.kernel.exception.SystemException {
128 return getPersistence().findByGroupId(groupId, start, end, obc);
129 }
130
131 public static com.liferay.portal.model.Layout findByGroupId_First(
132 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
133 throws com.liferay.portal.NoSuchLayoutException,
134 com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence().findByGroupId_First(groupId, obc);
136 }
137
138 public static com.liferay.portal.model.Layout findByGroupId_Last(
139 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
140 throws com.liferay.portal.NoSuchLayoutException,
141 com.liferay.portal.kernel.exception.SystemException {
142 return getPersistence().findByGroupId_Last(groupId, obc);
143 }
144
145 public static com.liferay.portal.model.Layout[] findByGroupId_PrevAndNext(
146 long plid, long groupId,
147 com.liferay.portal.kernel.util.OrderByComparator obc)
148 throws com.liferay.portal.NoSuchLayoutException,
149 com.liferay.portal.kernel.exception.SystemException {
150 return getPersistence().findByGroupId_PrevAndNext(plid, groupId, obc);
151 }
152
153 public static java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
154 long companyId)
155 throws com.liferay.portal.kernel.exception.SystemException {
156 return getPersistence().findByCompanyId(companyId);
157 }
158
159 public static java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
160 long companyId, int start, int end)
161 throws com.liferay.portal.kernel.exception.SystemException {
162 return getPersistence().findByCompanyId(companyId, start, end);
163 }
164
165 public static java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
166 long companyId, int start, int end,
167 com.liferay.portal.kernel.util.OrderByComparator obc)
168 throws com.liferay.portal.kernel.exception.SystemException {
169 return getPersistence().findByCompanyId(companyId, start, end, obc);
170 }
171
172 public static com.liferay.portal.model.Layout findByCompanyId_First(
173 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
174 throws com.liferay.portal.NoSuchLayoutException,
175 com.liferay.portal.kernel.exception.SystemException {
176 return getPersistence().findByCompanyId_First(companyId, obc);
177 }
178
179 public static com.liferay.portal.model.Layout findByCompanyId_Last(
180 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
181 throws com.liferay.portal.NoSuchLayoutException,
182 com.liferay.portal.kernel.exception.SystemException {
183 return getPersistence().findByCompanyId_Last(companyId, obc);
184 }
185
186 public static com.liferay.portal.model.Layout[] findByCompanyId_PrevAndNext(
187 long plid, long companyId,
188 com.liferay.portal.kernel.util.OrderByComparator obc)
189 throws com.liferay.portal.NoSuchLayoutException,
190 com.liferay.portal.kernel.exception.SystemException {
191 return getPersistence().findByCompanyId_PrevAndNext(plid, companyId, obc);
192 }
193
194 public static com.liferay.portal.model.Layout findByDLFolderId(
195 long dlFolderId)
196 throws com.liferay.portal.NoSuchLayoutException,
197 com.liferay.portal.kernel.exception.SystemException {
198 return getPersistence().findByDLFolderId(dlFolderId);
199 }
200
201 public static com.liferay.portal.model.Layout fetchByDLFolderId(
202 long dlFolderId)
203 throws com.liferay.portal.kernel.exception.SystemException {
204 return getPersistence().fetchByDLFolderId(dlFolderId);
205 }
206
207 public static com.liferay.portal.model.Layout fetchByDLFolderId(
208 long dlFolderId, boolean retrieveFromCache)
209 throws com.liferay.portal.kernel.exception.SystemException {
210 return getPersistence().fetchByDLFolderId(dlFolderId, retrieveFromCache);
211 }
212
213 public static com.liferay.portal.model.Layout findByIconImageId(
214 long iconImageId)
215 throws com.liferay.portal.NoSuchLayoutException,
216 com.liferay.portal.kernel.exception.SystemException {
217 return getPersistence().findByIconImageId(iconImageId);
218 }
219
220 public static com.liferay.portal.model.Layout fetchByIconImageId(
221 long iconImageId)
222 throws com.liferay.portal.kernel.exception.SystemException {
223 return getPersistence().fetchByIconImageId(iconImageId);
224 }
225
226 public static com.liferay.portal.model.Layout fetchByIconImageId(
227 long iconImageId, boolean retrieveFromCache)
228 throws com.liferay.portal.kernel.exception.SystemException {
229 return getPersistence()
230 .fetchByIconImageId(iconImageId, retrieveFromCache);
231 }
232
233 public static java.util.List<com.liferay.portal.model.Layout> findByG_P(
234 long groupId, boolean privateLayout)
235 throws com.liferay.portal.kernel.exception.SystemException {
236 return getPersistence().findByG_P(groupId, privateLayout);
237 }
238
239 public static java.util.List<com.liferay.portal.model.Layout> findByG_P(
240 long groupId, boolean privateLayout, int start, int end)
241 throws com.liferay.portal.kernel.exception.SystemException {
242 return getPersistence().findByG_P(groupId, privateLayout, start, end);
243 }
244
245 public static java.util.List<com.liferay.portal.model.Layout> findByG_P(
246 long groupId, boolean privateLayout, int start, int end,
247 com.liferay.portal.kernel.util.OrderByComparator obc)
248 throws com.liferay.portal.kernel.exception.SystemException {
249 return getPersistence()
250 .findByG_P(groupId, privateLayout, start, end, obc);
251 }
252
253 public static com.liferay.portal.model.Layout findByG_P_First(
254 long groupId, boolean privateLayout,
255 com.liferay.portal.kernel.util.OrderByComparator obc)
256 throws com.liferay.portal.NoSuchLayoutException,
257 com.liferay.portal.kernel.exception.SystemException {
258 return getPersistence().findByG_P_First(groupId, privateLayout, obc);
259 }
260
261 public static com.liferay.portal.model.Layout findByG_P_Last(long groupId,
262 boolean privateLayout,
263 com.liferay.portal.kernel.util.OrderByComparator obc)
264 throws com.liferay.portal.NoSuchLayoutException,
265 com.liferay.portal.kernel.exception.SystemException {
266 return getPersistence().findByG_P_Last(groupId, privateLayout, obc);
267 }
268
269 public static com.liferay.portal.model.Layout[] findByG_P_PrevAndNext(
270 long plid, long groupId, boolean privateLayout,
271 com.liferay.portal.kernel.util.OrderByComparator obc)
272 throws com.liferay.portal.NoSuchLayoutException,
273 com.liferay.portal.kernel.exception.SystemException {
274 return getPersistence()
275 .findByG_P_PrevAndNext(plid, groupId, privateLayout, obc);
276 }
277
278 public static com.liferay.portal.model.Layout findByG_P_L(long groupId,
279 boolean privateLayout, long layoutId)
280 throws com.liferay.portal.NoSuchLayoutException,
281 com.liferay.portal.kernel.exception.SystemException {
282 return getPersistence().findByG_P_L(groupId, privateLayout, layoutId);
283 }
284
285 public static com.liferay.portal.model.Layout fetchByG_P_L(long groupId,
286 boolean privateLayout, long layoutId)
287 throws com.liferay.portal.kernel.exception.SystemException {
288 return getPersistence().fetchByG_P_L(groupId, privateLayout, layoutId);
289 }
290
291 public static com.liferay.portal.model.Layout fetchByG_P_L(long groupId,
292 boolean privateLayout, long layoutId, boolean retrieveFromCache)
293 throws com.liferay.portal.kernel.exception.SystemException {
294 return getPersistence()
295 .fetchByG_P_L(groupId, privateLayout, layoutId,
296 retrieveFromCache);
297 }
298
299 public static java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
300 long groupId, boolean privateLayout, long parentLayoutId)
301 throws com.liferay.portal.kernel.exception.SystemException {
302 return getPersistence()
303 .findByG_P_P(groupId, privateLayout, parentLayoutId);
304 }
305
306 public static java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
307 long groupId, boolean privateLayout, long parentLayoutId, int start,
308 int end) throws com.liferay.portal.kernel.exception.SystemException {
309 return getPersistence()
310 .findByG_P_P(groupId, privateLayout, parentLayoutId, start,
311 end);
312 }
313
314 public static java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
315 long groupId, boolean privateLayout, long parentLayoutId, int start,
316 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
317 throws com.liferay.portal.kernel.exception.SystemException {
318 return getPersistence()
319 .findByG_P_P(groupId, privateLayout, parentLayoutId, start,
320 end, obc);
321 }
322
323 public static com.liferay.portal.model.Layout findByG_P_P_First(
324 long groupId, boolean privateLayout, long parentLayoutId,
325 com.liferay.portal.kernel.util.OrderByComparator obc)
326 throws com.liferay.portal.NoSuchLayoutException,
327 com.liferay.portal.kernel.exception.SystemException {
328 return getPersistence()
329 .findByG_P_P_First(groupId, privateLayout, parentLayoutId,
330 obc);
331 }
332
333 public static com.liferay.portal.model.Layout findByG_P_P_Last(
334 long groupId, boolean privateLayout, long parentLayoutId,
335 com.liferay.portal.kernel.util.OrderByComparator obc)
336 throws com.liferay.portal.NoSuchLayoutException,
337 com.liferay.portal.kernel.exception.SystemException {
338 return getPersistence()
339 .findByG_P_P_Last(groupId, privateLayout, parentLayoutId, obc);
340 }
341
342 public static com.liferay.portal.model.Layout[] findByG_P_P_PrevAndNext(
343 long plid, long groupId, boolean privateLayout, long parentLayoutId,
344 com.liferay.portal.kernel.util.OrderByComparator obc)
345 throws com.liferay.portal.NoSuchLayoutException,
346 com.liferay.portal.kernel.exception.SystemException {
347 return getPersistence()
348 .findByG_P_P_PrevAndNext(plid, groupId, privateLayout,
349 parentLayoutId, obc);
350 }
351
352 public static com.liferay.portal.model.Layout findByG_P_F(long groupId,
353 boolean privateLayout, java.lang.String friendlyURL)
354 throws com.liferay.portal.NoSuchLayoutException,
355 com.liferay.portal.kernel.exception.SystemException {
356 return getPersistence().findByG_P_F(groupId, privateLayout, friendlyURL);
357 }
358
359 public static com.liferay.portal.model.Layout fetchByG_P_F(long groupId,
360 boolean privateLayout, java.lang.String friendlyURL)
361 throws com.liferay.portal.kernel.exception.SystemException {
362 return getPersistence().fetchByG_P_F(groupId, privateLayout, friendlyURL);
363 }
364
365 public static com.liferay.portal.model.Layout fetchByG_P_F(long groupId,
366 boolean privateLayout, java.lang.String friendlyURL,
367 boolean retrieveFromCache)
368 throws com.liferay.portal.kernel.exception.SystemException {
369 return getPersistence()
370 .fetchByG_P_F(groupId, privateLayout, friendlyURL,
371 retrieveFromCache);
372 }
373
374 public static java.util.List<com.liferay.portal.model.Layout> findByG_P_T(
375 long groupId, boolean privateLayout, java.lang.String type)
376 throws com.liferay.portal.kernel.exception.SystemException {
377 return getPersistence().findByG_P_T(groupId, privateLayout, type);
378 }
379
380 public static java.util.List<com.liferay.portal.model.Layout> findByG_P_T(
381 long groupId, boolean privateLayout, java.lang.String type, int start,
382 int end) throws com.liferay.portal.kernel.exception.SystemException {
383 return getPersistence()
384 .findByG_P_T(groupId, privateLayout, type, start, end);
385 }
386
387 public static java.util.List<com.liferay.portal.model.Layout> findByG_P_T(
388 long groupId, boolean privateLayout, java.lang.String type, int start,
389 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
390 throws com.liferay.portal.kernel.exception.SystemException {
391 return getPersistence()
392 .findByG_P_T(groupId, privateLayout, type, start, end, obc);
393 }
394
395 public static com.liferay.portal.model.Layout findByG_P_T_First(
396 long groupId, boolean privateLayout, java.lang.String type,
397 com.liferay.portal.kernel.util.OrderByComparator obc)
398 throws com.liferay.portal.NoSuchLayoutException,
399 com.liferay.portal.kernel.exception.SystemException {
400 return getPersistence()
401 .findByG_P_T_First(groupId, privateLayout, type, obc);
402 }
403
404 public static com.liferay.portal.model.Layout findByG_P_T_Last(
405 long groupId, boolean privateLayout, java.lang.String type,
406 com.liferay.portal.kernel.util.OrderByComparator obc)
407 throws com.liferay.portal.NoSuchLayoutException,
408 com.liferay.portal.kernel.exception.SystemException {
409 return getPersistence()
410 .findByG_P_T_Last(groupId, privateLayout, type, obc);
411 }
412
413 public static com.liferay.portal.model.Layout[] findByG_P_T_PrevAndNext(
414 long plid, long groupId, boolean privateLayout, java.lang.String type,
415 com.liferay.portal.kernel.util.OrderByComparator obc)
416 throws com.liferay.portal.NoSuchLayoutException,
417 com.liferay.portal.kernel.exception.SystemException {
418 return getPersistence()
419 .findByG_P_T_PrevAndNext(plid, groupId, privateLayout, type,
420 obc);
421 }
422
423 public static java.util.List<com.liferay.portal.model.Layout> findAll()
424 throws com.liferay.portal.kernel.exception.SystemException {
425 return getPersistence().findAll();
426 }
427
428 public static java.util.List<com.liferay.portal.model.Layout> findAll(
429 int start, int end)
430 throws com.liferay.portal.kernel.exception.SystemException {
431 return getPersistence().findAll(start, end);
432 }
433
434 public static java.util.List<com.liferay.portal.model.Layout> findAll(
435 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
436 throws com.liferay.portal.kernel.exception.SystemException {
437 return getPersistence().findAll(start, end, obc);
438 }
439
440 public static void removeByGroupId(long groupId)
441 throws com.liferay.portal.kernel.exception.SystemException {
442 getPersistence().removeByGroupId(groupId);
443 }
444
445 public static void removeByCompanyId(long companyId)
446 throws com.liferay.portal.kernel.exception.SystemException {
447 getPersistence().removeByCompanyId(companyId);
448 }
449
450 public static void removeByDLFolderId(long dlFolderId)
451 throws com.liferay.portal.NoSuchLayoutException,
452 com.liferay.portal.kernel.exception.SystemException {
453 getPersistence().removeByDLFolderId(dlFolderId);
454 }
455
456 public static void removeByIconImageId(long iconImageId)
457 throws com.liferay.portal.NoSuchLayoutException,
458 com.liferay.portal.kernel.exception.SystemException {
459 getPersistence().removeByIconImageId(iconImageId);
460 }
461
462 public static void removeByG_P(long groupId, boolean privateLayout)
463 throws com.liferay.portal.kernel.exception.SystemException {
464 getPersistence().removeByG_P(groupId, privateLayout);
465 }
466
467 public static void removeByG_P_L(long groupId, boolean privateLayout,
468 long layoutId)
469 throws com.liferay.portal.NoSuchLayoutException,
470 com.liferay.portal.kernel.exception.SystemException {
471 getPersistence().removeByG_P_L(groupId, privateLayout, layoutId);
472 }
473
474 public static void removeByG_P_P(long groupId, boolean privateLayout,
475 long parentLayoutId)
476 throws com.liferay.portal.kernel.exception.SystemException {
477 getPersistence().removeByG_P_P(groupId, privateLayout, parentLayoutId);
478 }
479
480 public static void removeByG_P_F(long groupId, boolean privateLayout,
481 java.lang.String friendlyURL)
482 throws com.liferay.portal.NoSuchLayoutException,
483 com.liferay.portal.kernel.exception.SystemException {
484 getPersistence().removeByG_P_F(groupId, privateLayout, friendlyURL);
485 }
486
487 public static void removeByG_P_T(long groupId, boolean privateLayout,
488 java.lang.String type)
489 throws com.liferay.portal.kernel.exception.SystemException {
490 getPersistence().removeByG_P_T(groupId, privateLayout, type);
491 }
492
493 public static void removeAll()
494 throws com.liferay.portal.kernel.exception.SystemException {
495 getPersistence().removeAll();
496 }
497
498 public static int countByGroupId(long groupId)
499 throws com.liferay.portal.kernel.exception.SystemException {
500 return getPersistence().countByGroupId(groupId);
501 }
502
503 public static int countByCompanyId(long companyId)
504 throws com.liferay.portal.kernel.exception.SystemException {
505 return getPersistence().countByCompanyId(companyId);
506 }
507
508 public static int countByDLFolderId(long dlFolderId)
509 throws com.liferay.portal.kernel.exception.SystemException {
510 return getPersistence().countByDLFolderId(dlFolderId);
511 }
512
513 public static int countByIconImageId(long iconImageId)
514 throws com.liferay.portal.kernel.exception.SystemException {
515 return getPersistence().countByIconImageId(iconImageId);
516 }
517
518 public static int countByG_P(long groupId, boolean privateLayout)
519 throws com.liferay.portal.kernel.exception.SystemException {
520 return getPersistence().countByG_P(groupId, privateLayout);
521 }
522
523 public static int countByG_P_L(long groupId, boolean privateLayout,
524 long layoutId)
525 throws com.liferay.portal.kernel.exception.SystemException {
526 return getPersistence().countByG_P_L(groupId, privateLayout, layoutId);
527 }
528
529 public static int countByG_P_P(long groupId, boolean privateLayout,
530 long parentLayoutId)
531 throws com.liferay.portal.kernel.exception.SystemException {
532 return getPersistence()
533 .countByG_P_P(groupId, privateLayout, parentLayoutId);
534 }
535
536 public static int countByG_P_F(long groupId, boolean privateLayout,
537 java.lang.String friendlyURL)
538 throws com.liferay.portal.kernel.exception.SystemException {
539 return getPersistence().countByG_P_F(groupId, privateLayout, friendlyURL);
540 }
541
542 public static int countByG_P_T(long groupId, boolean privateLayout,
543 java.lang.String type)
544 throws com.liferay.portal.kernel.exception.SystemException {
545 return getPersistence().countByG_P_T(groupId, privateLayout, type);
546 }
547
548 public static int countAll()
549 throws com.liferay.portal.kernel.exception.SystemException {
550 return getPersistence().countAll();
551 }
552
553 public static LayoutPersistence getPersistence() {
554 if (_persistence == null) {
555 _persistence = (LayoutPersistence)PortalBeanLocatorUtil.locate(LayoutPersistence.class.getName());
556 }
557
558 return _persistence;
559 }
560
561 public void setPersistence(LayoutPersistence persistence) {
562 _persistence = persistence;
563 }
564
565 private static LayoutPersistence _persistence;
566 }