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