1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  import com.liferay.portal.model.Layout;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="LayoutUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       LayoutPersistence
35   * @see       LayoutPersistenceImpl
36   * @generated
37   */
38  public class LayoutUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(Layout)
48       */
49      public static void clearCache(Layout layout) {
50          getPersistence().clearCache(layout);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static Layout remove(Layout layout) throws SystemException {
81          return getPersistence().remove(layout);
82      }
83  
84      /**
85       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
86       */
87      public static Layout update(Layout layout, boolean merge)
88          throws SystemException {
89          return getPersistence().update(layout, merge);
90      }
91  
92      public static void cacheResult(com.liferay.portal.model.Layout layout) {
93          getPersistence().cacheResult(layout);
94      }
95  
96      public static void cacheResult(
97          java.util.List<com.liferay.portal.model.Layout> layouts) {
98          getPersistence().cacheResult(layouts);
99      }
100 
101     public static com.liferay.portal.model.Layout create(long plid) {
102         return getPersistence().create(plid);
103     }
104 
105     public static com.liferay.portal.model.Layout remove(long plid)
106         throws com.liferay.portal.NoSuchLayoutException,
107             com.liferay.portal.SystemException {
108         return getPersistence().remove(plid);
109     }
110 
111     /**
112      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
113      */
114     public static com.liferay.portal.model.Layout update(
115         com.liferay.portal.model.Layout layout)
116         throws com.liferay.portal.SystemException {
117         return getPersistence().update(layout);
118     }
119 
120     public static com.liferay.portal.model.Layout updateImpl(
121         com.liferay.portal.model.Layout layout, boolean merge)
122         throws com.liferay.portal.SystemException {
123         return getPersistence().updateImpl(layout, merge);
124     }
125 
126     public static com.liferay.portal.model.Layout findByPrimaryKey(long plid)
127         throws com.liferay.portal.NoSuchLayoutException,
128             com.liferay.portal.SystemException {
129         return getPersistence().findByPrimaryKey(plid);
130     }
131 
132     public static com.liferay.portal.model.Layout fetchByPrimaryKey(long plid)
133         throws com.liferay.portal.SystemException {
134         return getPersistence().fetchByPrimaryKey(plid);
135     }
136 
137     public static java.util.List<com.liferay.portal.model.Layout> findByGroupId(
138         long groupId) throws com.liferay.portal.SystemException {
139         return getPersistence().findByGroupId(groupId);
140     }
141 
142     public static java.util.List<com.liferay.portal.model.Layout> findByGroupId(
143         long groupId, int start, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByGroupId(groupId, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portal.model.Layout> findByGroupId(
149         long groupId, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151         throws com.liferay.portal.SystemException {
152         return getPersistence()
153                    .findByGroupId(groupId, start, end, orderByComparator);
154     }
155 
156     public static com.liferay.portal.model.Layout findByGroupId_First(
157         long groupId,
158         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159         throws com.liferay.portal.NoSuchLayoutException,
160             com.liferay.portal.SystemException {
161         return getPersistence().findByGroupId_First(groupId, orderByComparator);
162     }
163 
164     public static com.liferay.portal.model.Layout findByGroupId_Last(
165         long groupId,
166         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167         throws com.liferay.portal.NoSuchLayoutException,
168             com.liferay.portal.SystemException {
169         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
170     }
171 
172     public static com.liferay.portal.model.Layout[] findByGroupId_PrevAndNext(
173         long plid, long groupId,
174         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175         throws com.liferay.portal.NoSuchLayoutException,
176             com.liferay.portal.SystemException {
177         return getPersistence()
178                    .findByGroupId_PrevAndNext(plid, groupId, orderByComparator);
179     }
180 
181     public static java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
182         long companyId) throws com.liferay.portal.SystemException {
183         return getPersistence().findByCompanyId(companyId);
184     }
185 
186     public static java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
187         long companyId, int start, int end)
188         throws com.liferay.portal.SystemException {
189         return getPersistence().findByCompanyId(companyId, start, end);
190     }
191 
192     public static java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
193         long companyId, int start, int end,
194         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195         throws com.liferay.portal.SystemException {
196         return getPersistence()
197                    .findByCompanyId(companyId, start, end, orderByComparator);
198     }
199 
200     public static com.liferay.portal.model.Layout findByCompanyId_First(
201         long companyId,
202         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203         throws com.liferay.portal.NoSuchLayoutException,
204             com.liferay.portal.SystemException {
205         return getPersistence()
206                    .findByCompanyId_First(companyId, orderByComparator);
207     }
208 
209     public static com.liferay.portal.model.Layout findByCompanyId_Last(
210         long companyId,
211         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212         throws com.liferay.portal.NoSuchLayoutException,
213             com.liferay.portal.SystemException {
214         return getPersistence()
215                    .findByCompanyId_Last(companyId, orderByComparator);
216     }
217 
218     public static com.liferay.portal.model.Layout[] findByCompanyId_PrevAndNext(
219         long plid, long companyId,
220         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
221         throws com.liferay.portal.NoSuchLayoutException,
222             com.liferay.portal.SystemException {
223         return getPersistence()
224                    .findByCompanyId_PrevAndNext(plid, companyId,
225             orderByComparator);
226     }
227 
228     public static com.liferay.portal.model.Layout findByDLFolderId(
229         long dlFolderId)
230         throws com.liferay.portal.NoSuchLayoutException,
231             com.liferay.portal.SystemException {
232         return getPersistence().findByDLFolderId(dlFolderId);
233     }
234 
235     public static com.liferay.portal.model.Layout fetchByDLFolderId(
236         long dlFolderId) throws com.liferay.portal.SystemException {
237         return getPersistence().fetchByDLFolderId(dlFolderId);
238     }
239 
240     public static com.liferay.portal.model.Layout fetchByDLFolderId(
241         long dlFolderId, boolean retrieveFromCache)
242         throws com.liferay.portal.SystemException {
243         return getPersistence().fetchByDLFolderId(dlFolderId, retrieveFromCache);
244     }
245 
246     public static com.liferay.portal.model.Layout findByIconImageId(
247         long iconImageId)
248         throws com.liferay.portal.NoSuchLayoutException,
249             com.liferay.portal.SystemException {
250         return getPersistence().findByIconImageId(iconImageId);
251     }
252 
253     public static com.liferay.portal.model.Layout fetchByIconImageId(
254         long iconImageId) throws com.liferay.portal.SystemException {
255         return getPersistence().fetchByIconImageId(iconImageId);
256     }
257 
258     public static com.liferay.portal.model.Layout fetchByIconImageId(
259         long iconImageId, boolean retrieveFromCache)
260         throws com.liferay.portal.SystemException {
261         return getPersistence()
262                    .fetchByIconImageId(iconImageId, retrieveFromCache);
263     }
264 
265     public static java.util.List<com.liferay.portal.model.Layout> findByG_P(
266         long groupId, boolean privateLayout)
267         throws com.liferay.portal.SystemException {
268         return getPersistence().findByG_P(groupId, privateLayout);
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         throws com.liferay.portal.SystemException {
274         return getPersistence().findByG_P(groupId, privateLayout, start, end);
275     }
276 
277     public static java.util.List<com.liferay.portal.model.Layout> findByG_P(
278         long groupId, boolean privateLayout, int start, int end,
279         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
280         throws com.liferay.portal.SystemException {
281         return getPersistence()
282                    .findByG_P(groupId, privateLayout, start, end,
283             orderByComparator);
284     }
285 
286     public static com.liferay.portal.model.Layout findByG_P_First(
287         long groupId, boolean privateLayout,
288         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
289         throws com.liferay.portal.NoSuchLayoutException,
290             com.liferay.portal.SystemException {
291         return getPersistence()
292                    .findByG_P_First(groupId, privateLayout, orderByComparator);
293     }
294 
295     public static com.liferay.portal.model.Layout findByG_P_Last(long groupId,
296         boolean privateLayout,
297         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
298         throws com.liferay.portal.NoSuchLayoutException,
299             com.liferay.portal.SystemException {
300         return getPersistence()
301                    .findByG_P_Last(groupId, privateLayout, orderByComparator);
302     }
303 
304     public static com.liferay.portal.model.Layout[] findByG_P_PrevAndNext(
305         long plid, long groupId, boolean privateLayout,
306         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307         throws com.liferay.portal.NoSuchLayoutException,
308             com.liferay.portal.SystemException {
309         return getPersistence()
310                    .findByG_P_PrevAndNext(plid, groupId, privateLayout,
311             orderByComparator);
312     }
313 
314     public static com.liferay.portal.model.Layout findByG_P_L(long groupId,
315         boolean privateLayout, long layoutId)
316         throws com.liferay.portal.NoSuchLayoutException,
317             com.liferay.portal.SystemException {
318         return getPersistence().findByG_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)
323         throws com.liferay.portal.SystemException {
324         return getPersistence().fetchByG_P_L(groupId, privateLayout, layoutId);
325     }
326 
327     public static com.liferay.portal.model.Layout fetchByG_P_L(long groupId,
328         boolean privateLayout, long layoutId, boolean retrieveFromCache)
329         throws com.liferay.portal.SystemException {
330         return getPersistence()
331                    .fetchByG_P_L(groupId, privateLayout, layoutId,
332             retrieveFromCache);
333     }
334 
335     public static java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
336         long groupId, boolean privateLayout, long parentLayoutId)
337         throws com.liferay.portal.SystemException {
338         return getPersistence()
339                    .findByG_P_P(groupId, privateLayout, parentLayoutId);
340     }
341 
342     public static java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
343         long groupId, boolean privateLayout, long parentLayoutId, int start,
344         int end) throws com.liferay.portal.SystemException {
345         return getPersistence()
346                    .findByG_P_P(groupId, privateLayout, parentLayoutId, start,
347             end);
348     }
349 
350     public static java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
351         long groupId, boolean privateLayout, long parentLayoutId, int start,
352         int end,
353         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
354         throws com.liferay.portal.SystemException {
355         return getPersistence()
356                    .findByG_P_P(groupId, privateLayout, parentLayoutId, start,
357             end, orderByComparator);
358     }
359 
360     public static com.liferay.portal.model.Layout findByG_P_P_First(
361         long groupId, boolean privateLayout, long parentLayoutId,
362         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
363         throws com.liferay.portal.NoSuchLayoutException,
364             com.liferay.portal.SystemException {
365         return getPersistence()
366                    .findByG_P_P_First(groupId, privateLayout, parentLayoutId,
367             orderByComparator);
368     }
369 
370     public static com.liferay.portal.model.Layout findByG_P_P_Last(
371         long groupId, boolean privateLayout, long parentLayoutId,
372         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
373         throws com.liferay.portal.NoSuchLayoutException,
374             com.liferay.portal.SystemException {
375         return getPersistence()
376                    .findByG_P_P_Last(groupId, privateLayout, parentLayoutId,
377             orderByComparator);
378     }
379 
380     public static com.liferay.portal.model.Layout[] findByG_P_P_PrevAndNext(
381         long plid, long groupId, boolean privateLayout, long parentLayoutId,
382         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
383         throws com.liferay.portal.NoSuchLayoutException,
384             com.liferay.portal.SystemException {
385         return getPersistence()
386                    .findByG_P_P_PrevAndNext(plid, groupId, privateLayout,
387             parentLayoutId, orderByComparator);
388     }
389 
390     public static com.liferay.portal.model.Layout findByG_P_F(long groupId,
391         boolean privateLayout, java.lang.String friendlyURL)
392         throws com.liferay.portal.NoSuchLayoutException,
393             com.liferay.portal.SystemException {
394         return getPersistence().findByG_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         throws com.liferay.portal.SystemException {
400         return getPersistence().fetchByG_P_F(groupId, privateLayout, friendlyURL);
401     }
402 
403     public static com.liferay.portal.model.Layout fetchByG_P_F(long groupId,
404         boolean privateLayout, java.lang.String friendlyURL,
405         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
406         return getPersistence()
407                    .fetchByG_P_F(groupId, privateLayout, friendlyURL,
408             retrieveFromCache);
409     }
410 
411     public static java.util.List<com.liferay.portal.model.Layout> findByG_P_T(
412         long groupId, boolean privateLayout, java.lang.String type)
413         throws com.liferay.portal.SystemException {
414         return getPersistence().findByG_P_T(groupId, privateLayout, type);
415     }
416 
417     public static java.util.List<com.liferay.portal.model.Layout> findByG_P_T(
418         long groupId, boolean privateLayout, java.lang.String type, int start,
419         int end) throws com.liferay.portal.SystemException {
420         return getPersistence()
421                    .findByG_P_T(groupId, privateLayout, type, start, end);
422     }
423 
424     public static java.util.List<com.liferay.portal.model.Layout> findByG_P_T(
425         long groupId, boolean privateLayout, java.lang.String type, int start,
426         int end,
427         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
428         throws com.liferay.portal.SystemException {
429         return getPersistence()
430                    .findByG_P_T(groupId, privateLayout, type, start, end,
431             orderByComparator);
432     }
433 
434     public static com.liferay.portal.model.Layout findByG_P_T_First(
435         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.SystemException {
439         return getPersistence()
440                    .findByG_P_T_First(groupId, privateLayout, type,
441             orderByComparator);
442     }
443 
444     public static com.liferay.portal.model.Layout findByG_P_T_Last(
445         long groupId, boolean privateLayout, java.lang.String type,
446         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
447         throws com.liferay.portal.NoSuchLayoutException,
448             com.liferay.portal.SystemException {
449         return getPersistence()
450                    .findByG_P_T_Last(groupId, privateLayout, type,
451             orderByComparator);
452     }
453 
454     public static com.liferay.portal.model.Layout[] findByG_P_T_PrevAndNext(
455         long plid, long groupId, boolean privateLayout, java.lang.String type,
456         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
457         throws com.liferay.portal.NoSuchLayoutException,
458             com.liferay.portal.SystemException {
459         return getPersistence()
460                    .findByG_P_T_PrevAndNext(plid, groupId, privateLayout, type,
461             orderByComparator);
462     }
463 
464     public static java.util.List<com.liferay.portal.model.Layout> findAll()
465         throws com.liferay.portal.SystemException {
466         return getPersistence().findAll();
467     }
468 
469     public static java.util.List<com.liferay.portal.model.Layout> findAll(
470         int start, int end) throws com.liferay.portal.SystemException {
471         return getPersistence().findAll(start, end);
472     }
473 
474     public static java.util.List<com.liferay.portal.model.Layout> findAll(
475         int start, int end,
476         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
477         throws com.liferay.portal.SystemException {
478         return getPersistence().findAll(start, end, orderByComparator);
479     }
480 
481     public static void removeByGroupId(long groupId)
482         throws com.liferay.portal.SystemException {
483         getPersistence().removeByGroupId(groupId);
484     }
485 
486     public static void removeByCompanyId(long companyId)
487         throws com.liferay.portal.SystemException {
488         getPersistence().removeByCompanyId(companyId);
489     }
490 
491     public static void removeByDLFolderId(long dlFolderId)
492         throws com.liferay.portal.NoSuchLayoutException,
493             com.liferay.portal.SystemException {
494         getPersistence().removeByDLFolderId(dlFolderId);
495     }
496 
497     public static void removeByIconImageId(long iconImageId)
498         throws com.liferay.portal.NoSuchLayoutException,
499             com.liferay.portal.SystemException {
500         getPersistence().removeByIconImageId(iconImageId);
501     }
502 
503     public static void removeByG_P(long groupId, boolean privateLayout)
504         throws com.liferay.portal.SystemException {
505         getPersistence().removeByG_P(groupId, privateLayout);
506     }
507 
508     public static void removeByG_P_L(long groupId, boolean privateLayout,
509         long layoutId)
510         throws com.liferay.portal.NoSuchLayoutException,
511             com.liferay.portal.SystemException {
512         getPersistence().removeByG_P_L(groupId, privateLayout, layoutId);
513     }
514 
515     public static void removeByG_P_P(long groupId, boolean privateLayout,
516         long parentLayoutId) throws com.liferay.portal.SystemException {
517         getPersistence().removeByG_P_P(groupId, privateLayout, parentLayoutId);
518     }
519 
520     public static void removeByG_P_F(long groupId, boolean privateLayout,
521         java.lang.String friendlyURL)
522         throws com.liferay.portal.NoSuchLayoutException,
523             com.liferay.portal.SystemException {
524         getPersistence().removeByG_P_F(groupId, privateLayout, friendlyURL);
525     }
526 
527     public static void removeByG_P_T(long groupId, boolean privateLayout,
528         java.lang.String type) throws com.liferay.portal.SystemException {
529         getPersistence().removeByG_P_T(groupId, privateLayout, type);
530     }
531 
532     public static void removeAll() throws com.liferay.portal.SystemException {
533         getPersistence().removeAll();
534     }
535 
536     public static int countByGroupId(long groupId)
537         throws com.liferay.portal.SystemException {
538         return getPersistence().countByGroupId(groupId);
539     }
540 
541     public static int countByCompanyId(long companyId)
542         throws com.liferay.portal.SystemException {
543         return getPersistence().countByCompanyId(companyId);
544     }
545 
546     public static int countByDLFolderId(long dlFolderId)
547         throws com.liferay.portal.SystemException {
548         return getPersistence().countByDLFolderId(dlFolderId);
549     }
550 
551     public static int countByIconImageId(long iconImageId)
552         throws com.liferay.portal.SystemException {
553         return getPersistence().countByIconImageId(iconImageId);
554     }
555 
556     public static int countByG_P(long groupId, boolean privateLayout)
557         throws com.liferay.portal.SystemException {
558         return getPersistence().countByG_P(groupId, privateLayout);
559     }
560 
561     public static int countByG_P_L(long groupId, boolean privateLayout,
562         long layoutId) throws com.liferay.portal.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) throws com.liferay.portal.SystemException {
568         return getPersistence()
569                    .countByG_P_P(groupId, privateLayout, parentLayoutId);
570     }
571 
572     public static int countByG_P_F(long groupId, boolean privateLayout,
573         java.lang.String friendlyURL) throws com.liferay.portal.SystemException {
574         return getPersistence().countByG_P_F(groupId, privateLayout, friendlyURL);
575     }
576 
577     public static int countByG_P_T(long groupId, boolean privateLayout,
578         java.lang.String type) throws com.liferay.portal.SystemException {
579         return getPersistence().countByG_P_T(groupId, privateLayout, type);
580     }
581 
582     public static int countAll() throws com.liferay.portal.SystemException {
583         return getPersistence().countAll();
584     }
585 
586     public static LayoutPersistence getPersistence() {
587         if (_persistence == null) {
588             _persistence = (LayoutPersistence)PortalBeanLocatorUtil.locate(LayoutPersistence.class.getName());
589 
590             ReferenceRegistry.registerReference(LayoutUtil.class, "_persistence");
591         }
592 
593         return _persistence;
594     }
595 
596     public void setPersistence(LayoutPersistence persistence) {
597         _persistence = persistence;
598 
599         ReferenceRegistry.registerReference(LayoutUtil.class, "_persistence");
600     }
601 
602     private static LayoutPersistence _persistence;
603 }