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