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