1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <a href="LayoutUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class LayoutUtil {
32      public static com.liferay.portal.model.Layout create(long plid) {
33          return getPersistence().create(plid);
34      }
35  
36      public static com.liferay.portal.model.Layout remove(long plid)
37          throws com.liferay.portal.SystemException, 
38              com.liferay.portal.NoSuchLayoutException {
39          return getPersistence().remove(plid);
40      }
41  
42      public static com.liferay.portal.model.Layout remove(
43          com.liferay.portal.model.Layout layout)
44          throws com.liferay.portal.SystemException {
45          return getPersistence().remove(layout);
46      }
47  
48      public static com.liferay.portal.model.Layout update(
49          com.liferay.portal.model.Layout layout)
50          throws com.liferay.portal.SystemException {
51          return getPersistence().update(layout);
52      }
53  
54      public static com.liferay.portal.model.Layout update(
55          com.liferay.portal.model.Layout layout, boolean merge)
56          throws com.liferay.portal.SystemException {
57          return getPersistence().update(layout, merge);
58      }
59  
60      public static com.liferay.portal.model.Layout updateImpl(
61          com.liferay.portal.model.Layout layout, boolean merge)
62          throws com.liferay.portal.SystemException {
63          return getPersistence().updateImpl(layout, merge);
64      }
65  
66      public static com.liferay.portal.model.Layout findByPrimaryKey(long plid)
67          throws com.liferay.portal.SystemException, 
68              com.liferay.portal.NoSuchLayoutException {
69          return getPersistence().findByPrimaryKey(plid);
70      }
71  
72      public static com.liferay.portal.model.Layout fetchByPrimaryKey(long plid)
73          throws com.liferay.portal.SystemException {
74          return getPersistence().fetchByPrimaryKey(plid);
75      }
76  
77      public static java.util.List findByGroupId(long groupId)
78          throws com.liferay.portal.SystemException {
79          return getPersistence().findByGroupId(groupId);
80      }
81  
82      public static java.util.List findByGroupId(long groupId, int begin, int end)
83          throws com.liferay.portal.SystemException {
84          return getPersistence().findByGroupId(groupId, begin, end);
85      }
86  
87      public static java.util.List findByGroupId(long groupId, int begin,
88          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
89          throws com.liferay.portal.SystemException {
90          return getPersistence().findByGroupId(groupId, begin, end, obc);
91      }
92  
93      public static com.liferay.portal.model.Layout findByGroupId_First(
94          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException, 
96              com.liferay.portal.NoSuchLayoutException {
97          return getPersistence().findByGroupId_First(groupId, obc);
98      }
99  
100     public static com.liferay.portal.model.Layout findByGroupId_Last(
101         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException, 
103             com.liferay.portal.NoSuchLayoutException {
104         return getPersistence().findByGroupId_Last(groupId, obc);
105     }
106 
107     public static com.liferay.portal.model.Layout[] findByGroupId_PrevAndNext(
108         long plid, long groupId,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException, 
111             com.liferay.portal.NoSuchLayoutException {
112         return getPersistence().findByGroupId_PrevAndNext(plid, groupId, obc);
113     }
114 
115     public static java.util.List findByCompanyId(long companyId)
116         throws com.liferay.portal.SystemException {
117         return getPersistence().findByCompanyId(companyId);
118     }
119 
120     public static java.util.List findByCompanyId(long companyId, int begin,
121         int end) throws com.liferay.portal.SystemException {
122         return getPersistence().findByCompanyId(companyId, begin, end);
123     }
124 
125     public static java.util.List findByCompanyId(long companyId, int begin,
126         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.SystemException {
128         return getPersistence().findByCompanyId(companyId, begin, end, obc);
129     }
130 
131     public static com.liferay.portal.model.Layout findByCompanyId_First(
132         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException, 
134             com.liferay.portal.NoSuchLayoutException {
135         return getPersistence().findByCompanyId_First(companyId, obc);
136     }
137 
138     public static com.liferay.portal.model.Layout findByCompanyId_Last(
139         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException, 
141             com.liferay.portal.NoSuchLayoutException {
142         return getPersistence().findByCompanyId_Last(companyId, obc);
143     }
144 
145     public static com.liferay.portal.model.Layout[] findByCompanyId_PrevAndNext(
146         long plid, long companyId,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException, 
149             com.liferay.portal.NoSuchLayoutException {
150         return getPersistence().findByCompanyId_PrevAndNext(plid, companyId, obc);
151     }
152 
153     public static com.liferay.portal.model.Layout findByDLFolderId(
154         long dlFolderId)
155         throws com.liferay.portal.SystemException, 
156             com.liferay.portal.NoSuchLayoutException {
157         return getPersistence().findByDLFolderId(dlFolderId);
158     }
159 
160     public static com.liferay.portal.model.Layout fetchByDLFolderId(
161         long dlFolderId) throws com.liferay.portal.SystemException {
162         return getPersistence().fetchByDLFolderId(dlFolderId);
163     }
164 
165     public static com.liferay.portal.model.Layout findByIconImageId(
166         long iconImageId)
167         throws com.liferay.portal.SystemException, 
168             com.liferay.portal.NoSuchLayoutException {
169         return getPersistence().findByIconImageId(iconImageId);
170     }
171 
172     public static com.liferay.portal.model.Layout fetchByIconImageId(
173         long iconImageId) throws com.liferay.portal.SystemException {
174         return getPersistence().fetchByIconImageId(iconImageId);
175     }
176 
177     public static java.util.List findByG_P(long groupId, boolean privateLayout)
178         throws com.liferay.portal.SystemException {
179         return getPersistence().findByG_P(groupId, privateLayout);
180     }
181 
182     public static java.util.List findByG_P(long groupId, boolean privateLayout,
183         int begin, int end) throws com.liferay.portal.SystemException {
184         return getPersistence().findByG_P(groupId, privateLayout, begin, end);
185     }
186 
187     public static java.util.List findByG_P(long groupId, boolean privateLayout,
188         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.SystemException {
190         return getPersistence().findByG_P(groupId, privateLayout, begin, end,
191             obc);
192     }
193 
194     public static com.liferay.portal.model.Layout findByG_P_First(
195         long groupId, boolean privateLayout,
196         com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException, 
198             com.liferay.portal.NoSuchLayoutException {
199         return getPersistence().findByG_P_First(groupId, privateLayout, obc);
200     }
201 
202     public static com.liferay.portal.model.Layout findByG_P_Last(long groupId,
203         boolean privateLayout,
204         com.liferay.portal.kernel.util.OrderByComparator obc)
205         throws com.liferay.portal.SystemException, 
206             com.liferay.portal.NoSuchLayoutException {
207         return getPersistence().findByG_P_Last(groupId, privateLayout, obc);
208     }
209 
210     public static com.liferay.portal.model.Layout[] findByG_P_PrevAndNext(
211         long plid, long groupId, boolean privateLayout,
212         com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.SystemException, 
214             com.liferay.portal.NoSuchLayoutException {
215         return getPersistence().findByG_P_PrevAndNext(plid, groupId,
216             privateLayout, obc);
217     }
218 
219     public static com.liferay.portal.model.Layout findByG_P_L(long groupId,
220         boolean privateLayout, long layoutId)
221         throws com.liferay.portal.SystemException, 
222             com.liferay.portal.NoSuchLayoutException {
223         return getPersistence().findByG_P_L(groupId, privateLayout, layoutId);
224     }
225 
226     public static com.liferay.portal.model.Layout fetchByG_P_L(long groupId,
227         boolean privateLayout, long layoutId)
228         throws com.liferay.portal.SystemException {
229         return getPersistence().fetchByG_P_L(groupId, privateLayout, layoutId);
230     }
231 
232     public static java.util.List findByG_P_P(long groupId,
233         boolean privateLayout, long parentLayoutId)
234         throws com.liferay.portal.SystemException {
235         return getPersistence().findByG_P_P(groupId, privateLayout,
236             parentLayoutId);
237     }
238 
239     public static java.util.List findByG_P_P(long groupId,
240         boolean privateLayout, long parentLayoutId, int begin, int end)
241         throws com.liferay.portal.SystemException {
242         return getPersistence().findByG_P_P(groupId, privateLayout,
243             parentLayoutId, begin, end);
244     }
245 
246     public static java.util.List findByG_P_P(long groupId,
247         boolean privateLayout, long parentLayoutId, int begin, int end,
248         com.liferay.portal.kernel.util.OrderByComparator obc)
249         throws com.liferay.portal.SystemException {
250         return getPersistence().findByG_P_P(groupId, privateLayout,
251             parentLayoutId, begin, end, obc);
252     }
253 
254     public static com.liferay.portal.model.Layout findByG_P_P_First(
255         long groupId, boolean privateLayout, long parentLayoutId,
256         com.liferay.portal.kernel.util.OrderByComparator obc)
257         throws com.liferay.portal.SystemException, 
258             com.liferay.portal.NoSuchLayoutException {
259         return getPersistence().findByG_P_P_First(groupId, privateLayout,
260             parentLayoutId, obc);
261     }
262 
263     public static com.liferay.portal.model.Layout findByG_P_P_Last(
264         long groupId, boolean privateLayout, long parentLayoutId,
265         com.liferay.portal.kernel.util.OrderByComparator obc)
266         throws com.liferay.portal.SystemException, 
267             com.liferay.portal.NoSuchLayoutException {
268         return getPersistence().findByG_P_P_Last(groupId, privateLayout,
269             parentLayoutId, obc);
270     }
271 
272     public static com.liferay.portal.model.Layout[] findByG_P_P_PrevAndNext(
273         long plid, long groupId, boolean privateLayout, long parentLayoutId,
274         com.liferay.portal.kernel.util.OrderByComparator obc)
275         throws com.liferay.portal.SystemException, 
276             com.liferay.portal.NoSuchLayoutException {
277         return getPersistence().findByG_P_P_PrevAndNext(plid, groupId,
278             privateLayout, parentLayoutId, obc);
279     }
280 
281     public static com.liferay.portal.model.Layout findByG_P_F(long groupId,
282         boolean privateLayout, java.lang.String friendlyURL)
283         throws com.liferay.portal.SystemException, 
284             com.liferay.portal.NoSuchLayoutException {
285         return getPersistence().findByG_P_F(groupId, privateLayout, friendlyURL);
286     }
287 
288     public static com.liferay.portal.model.Layout fetchByG_P_F(long groupId,
289         boolean privateLayout, java.lang.String friendlyURL)
290         throws com.liferay.portal.SystemException {
291         return getPersistence().fetchByG_P_F(groupId, privateLayout, friendlyURL);
292     }
293 
294     public static java.util.List findWithDynamicQuery(
295         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
296         throws com.liferay.portal.SystemException {
297         return getPersistence().findWithDynamicQuery(queryInitializer);
298     }
299 
300     public static java.util.List findWithDynamicQuery(
301         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
302         int begin, int end) throws com.liferay.portal.SystemException {
303         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
304             end);
305     }
306 
307     public static java.util.List findAll()
308         throws com.liferay.portal.SystemException {
309         return getPersistence().findAll();
310     }
311 
312     public static java.util.List findAll(int begin, int end)
313         throws com.liferay.portal.SystemException {
314         return getPersistence().findAll(begin, end);
315     }
316 
317     public static java.util.List findAll(int begin, int end,
318         com.liferay.portal.kernel.util.OrderByComparator obc)
319         throws com.liferay.portal.SystemException {
320         return getPersistence().findAll(begin, end, obc);
321     }
322 
323     public static void removeByGroupId(long groupId)
324         throws com.liferay.portal.SystemException {
325         getPersistence().removeByGroupId(groupId);
326     }
327 
328     public static void removeByCompanyId(long companyId)
329         throws com.liferay.portal.SystemException {
330         getPersistence().removeByCompanyId(companyId);
331     }
332 
333     public static void removeByDLFolderId(long dlFolderId)
334         throws com.liferay.portal.SystemException, 
335             com.liferay.portal.NoSuchLayoutException {
336         getPersistence().removeByDLFolderId(dlFolderId);
337     }
338 
339     public static void removeByIconImageId(long iconImageId)
340         throws com.liferay.portal.SystemException, 
341             com.liferay.portal.NoSuchLayoutException {
342         getPersistence().removeByIconImageId(iconImageId);
343     }
344 
345     public static void removeByG_P(long groupId, boolean privateLayout)
346         throws com.liferay.portal.SystemException {
347         getPersistence().removeByG_P(groupId, privateLayout);
348     }
349 
350     public static void removeByG_P_L(long groupId, boolean privateLayout,
351         long layoutId)
352         throws com.liferay.portal.SystemException, 
353             com.liferay.portal.NoSuchLayoutException {
354         getPersistence().removeByG_P_L(groupId, privateLayout, layoutId);
355     }
356 
357     public static void removeByG_P_P(long groupId, boolean privateLayout,
358         long parentLayoutId) throws com.liferay.portal.SystemException {
359         getPersistence().removeByG_P_P(groupId, privateLayout, parentLayoutId);
360     }
361 
362     public static void removeByG_P_F(long groupId, boolean privateLayout,
363         java.lang.String friendlyURL)
364         throws com.liferay.portal.SystemException, 
365             com.liferay.portal.NoSuchLayoutException {
366         getPersistence().removeByG_P_F(groupId, privateLayout, friendlyURL);
367     }
368 
369     public static void removeAll() throws com.liferay.portal.SystemException {
370         getPersistence().removeAll();
371     }
372 
373     public static int countByGroupId(long groupId)
374         throws com.liferay.portal.SystemException {
375         return getPersistence().countByGroupId(groupId);
376     }
377 
378     public static int countByCompanyId(long companyId)
379         throws com.liferay.portal.SystemException {
380         return getPersistence().countByCompanyId(companyId);
381     }
382 
383     public static int countByDLFolderId(long dlFolderId)
384         throws com.liferay.portal.SystemException {
385         return getPersistence().countByDLFolderId(dlFolderId);
386     }
387 
388     public static int countByIconImageId(long iconImageId)
389         throws com.liferay.portal.SystemException {
390         return getPersistence().countByIconImageId(iconImageId);
391     }
392 
393     public static int countByG_P(long groupId, boolean privateLayout)
394         throws com.liferay.portal.SystemException {
395         return getPersistence().countByG_P(groupId, privateLayout);
396     }
397 
398     public static int countByG_P_L(long groupId, boolean privateLayout,
399         long layoutId) throws com.liferay.portal.SystemException {
400         return getPersistence().countByG_P_L(groupId, privateLayout, layoutId);
401     }
402 
403     public static int countByG_P_P(long groupId, boolean privateLayout,
404         long parentLayoutId) throws com.liferay.portal.SystemException {
405         return getPersistence().countByG_P_P(groupId, privateLayout,
406             parentLayoutId);
407     }
408 
409     public static int countByG_P_F(long groupId, boolean privateLayout,
410         java.lang.String friendlyURL) throws com.liferay.portal.SystemException {
411         return getPersistence().countByG_P_F(groupId, privateLayout, friendlyURL);
412     }
413 
414     public static int countAll() throws com.liferay.portal.SystemException {
415         return getPersistence().countAll();
416     }
417 
418     public static LayoutPersistence getPersistence() {
419         return _getUtil()._persistence;
420     }
421 
422     public void setPersistence(LayoutPersistence persistence) {
423         _persistence = persistence;
424     }
425 
426     private static LayoutUtil _getUtil() {
427         if (_util == null) {
428             _util = (LayoutUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
429         }
430 
431         return _util;
432     }
433 
434     private static final String _UTIL = LayoutUtil.class.getName();
435     private static LayoutUtil _util;
436     private LayoutPersistence _persistence;
437 }