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