001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.LayoutSet;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the layout set service. This utility wraps {@link LayoutSetPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see LayoutSetPersistence
036     * @see LayoutSetPersistenceImpl
037     * @generated
038     */
039    public class LayoutSetUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(LayoutSet layoutSet) {
057                    getPersistence().clearCache(layoutSet);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<LayoutSet> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<LayoutSet> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<LayoutSet> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
098             */
099            public static LayoutSet remove(LayoutSet layoutSet)
100                    throws SystemException {
101                    return getPersistence().remove(layoutSet);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
106             */
107            public static LayoutSet update(LayoutSet layoutSet, boolean merge)
108                    throws SystemException {
109                    return getPersistence().update(layoutSet, merge);
110            }
111    
112            /**
113             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
114             */
115            public static LayoutSet update(LayoutSet layoutSet, boolean merge,
116                    ServiceContext serviceContext) throws SystemException {
117                    return getPersistence().update(layoutSet, merge, serviceContext);
118            }
119    
120            /**
121            * Caches the layout set in the entity cache if it is enabled.
122            *
123            * @param layoutSet the layout set
124            */
125            public static void cacheResult(com.liferay.portal.model.LayoutSet layoutSet) {
126                    getPersistence().cacheResult(layoutSet);
127            }
128    
129            /**
130            * Caches the layout sets in the entity cache if it is enabled.
131            *
132            * @param layoutSets the layout sets
133            */
134            public static void cacheResult(
135                    java.util.List<com.liferay.portal.model.LayoutSet> layoutSets) {
136                    getPersistence().cacheResult(layoutSets);
137            }
138    
139            /**
140            * Creates a new layout set with the primary key. Does not add the layout set to the database.
141            *
142            * @param layoutSetId the primary key for the new layout set
143            * @return the new layout set
144            */
145            public static com.liferay.portal.model.LayoutSet create(long layoutSetId) {
146                    return getPersistence().create(layoutSetId);
147            }
148    
149            /**
150            * Removes the layout set with the primary key from the database. Also notifies the appropriate model listeners.
151            *
152            * @param layoutSetId the primary key of the layout set
153            * @return the layout set that was removed
154            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
155            * @throws SystemException if a system exception occurred
156            */
157            public static com.liferay.portal.model.LayoutSet remove(long layoutSetId)
158                    throws com.liferay.portal.NoSuchLayoutSetException,
159                            com.liferay.portal.kernel.exception.SystemException {
160                    return getPersistence().remove(layoutSetId);
161            }
162    
163            public static com.liferay.portal.model.LayoutSet updateImpl(
164                    com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence().updateImpl(layoutSet, merge);
167            }
168    
169            /**
170            * Returns the layout set with the primary key or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found.
171            *
172            * @param layoutSetId the primary key of the layout set
173            * @return the layout set
174            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
175            * @throws SystemException if a system exception occurred
176            */
177            public static com.liferay.portal.model.LayoutSet findByPrimaryKey(
178                    long layoutSetId)
179                    throws com.liferay.portal.NoSuchLayoutSetException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return getPersistence().findByPrimaryKey(layoutSetId);
182            }
183    
184            /**
185            * Returns the layout set with the primary key or returns <code>null</code> if it could not be found.
186            *
187            * @param layoutSetId the primary key of the layout set
188            * @return the layout set, or <code>null</code> if a layout set with the primary key could not be found
189            * @throws SystemException if a system exception occurred
190            */
191            public static com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
192                    long layoutSetId)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return getPersistence().fetchByPrimaryKey(layoutSetId);
195            }
196    
197            /**
198            * Returns all the layout sets where groupId = &#63;.
199            *
200            * @param groupId the group ID
201            * @return the matching layout sets
202            * @throws SystemException if a system exception occurred
203            */
204            public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
205                    long groupId)
206                    throws com.liferay.portal.kernel.exception.SystemException {
207                    return getPersistence().findByGroupId(groupId);
208            }
209    
210            /**
211            * Returns a range of all the layout sets where groupId = &#63;.
212            *
213            * <p>
214            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
215            * </p>
216            *
217            * @param groupId the group ID
218            * @param start the lower bound of the range of layout sets
219            * @param end the upper bound of the range of layout sets (not inclusive)
220            * @return the range of matching layout sets
221            * @throws SystemException if a system exception occurred
222            */
223            public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
224                    long groupId, int start, int end)
225                    throws com.liferay.portal.kernel.exception.SystemException {
226                    return getPersistence().findByGroupId(groupId, start, end);
227            }
228    
229            /**
230            * Returns an ordered range of all the layout sets where groupId = &#63;.
231            *
232            * <p>
233            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
234            * </p>
235            *
236            * @param groupId the group ID
237            * @param start the lower bound of the range of layout sets
238            * @param end the upper bound of the range of layout sets (not inclusive)
239            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
240            * @return the ordered range of matching layout sets
241            * @throws SystemException if a system exception occurred
242            */
243            public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
244                    long groupId, int start, int end,
245                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return getPersistence()
248                                       .findByGroupId(groupId, start, end, orderByComparator);
249            }
250    
251            /**
252            * Returns the first layout set in the ordered set where groupId = &#63;.
253            *
254            * <p>
255            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
256            * </p>
257            *
258            * @param groupId the group ID
259            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
260            * @return the first matching layout set
261            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
262            * @throws SystemException if a system exception occurred
263            */
264            public static com.liferay.portal.model.LayoutSet findByGroupId_First(
265                    long groupId,
266                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267                    throws com.liferay.portal.NoSuchLayoutSetException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
270            }
271    
272            /**
273            * Returns the last layout set in the ordered set where groupId = &#63;.
274            *
275            * <p>
276            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
277            * </p>
278            *
279            * @param groupId the group ID
280            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
281            * @return the last matching layout set
282            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
283            * @throws SystemException if a system exception occurred
284            */
285            public static com.liferay.portal.model.LayoutSet findByGroupId_Last(
286                    long groupId,
287                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
288                    throws com.liferay.portal.NoSuchLayoutSetException,
289                            com.liferay.portal.kernel.exception.SystemException {
290                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
291            }
292    
293            /**
294            * Returns the layout sets before and after the current layout set in the ordered set where groupId = &#63;.
295            *
296            * <p>
297            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
298            * </p>
299            *
300            * @param layoutSetId the primary key of the current layout set
301            * @param groupId the group ID
302            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
303            * @return the previous, current, and next layout set
304            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
305            * @throws SystemException if a system exception occurred
306            */
307            public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
308                    long layoutSetId, long groupId,
309                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
310                    throws com.liferay.portal.NoSuchLayoutSetException,
311                            com.liferay.portal.kernel.exception.SystemException {
312                    return getPersistence()
313                                       .findByGroupId_PrevAndNext(layoutSetId, groupId,
314                            orderByComparator);
315            }
316    
317            /**
318            * Returns all the layout sets where layoutSetPrototypeUuid = &#63;.
319            *
320            * @param layoutSetPrototypeUuid the layout set prototype uuid
321            * @return the matching layout sets
322            * @throws SystemException if a system exception occurred
323            */
324            public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
325                    java.lang.String layoutSetPrototypeUuid)
326                    throws com.liferay.portal.kernel.exception.SystemException {
327                    return getPersistence()
328                                       .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
329            }
330    
331            /**
332            * Returns a range of all the layout sets where layoutSetPrototypeUuid = &#63;.
333            *
334            * <p>
335            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
336            * </p>
337            *
338            * @param layoutSetPrototypeUuid the layout set prototype uuid
339            * @param start the lower bound of the range of layout sets
340            * @param end the upper bound of the range of layout sets (not inclusive)
341            * @return the range of matching layout sets
342            * @throws SystemException if a system exception occurred
343            */
344            public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
345                    java.lang.String layoutSetPrototypeUuid, int start, int end)
346                    throws com.liferay.portal.kernel.exception.SystemException {
347                    return getPersistence()
348                                       .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid, start,
349                            end);
350            }
351    
352            /**
353            * Returns an ordered range of all the layout sets where layoutSetPrototypeUuid = &#63;.
354            *
355            * <p>
356            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
357            * </p>
358            *
359            * @param layoutSetPrototypeUuid the layout set prototype uuid
360            * @param start the lower bound of the range of layout sets
361            * @param end the upper bound of the range of layout sets (not inclusive)
362            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
363            * @return the ordered range of matching layout sets
364            * @throws SystemException if a system exception occurred
365            */
366            public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
367                    java.lang.String layoutSetPrototypeUuid, int start, int end,
368                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
369                    throws com.liferay.portal.kernel.exception.SystemException {
370                    return getPersistence()
371                                       .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid, start,
372                            end, orderByComparator);
373            }
374    
375            /**
376            * Returns the first layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
377            *
378            * <p>
379            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
380            * </p>
381            *
382            * @param layoutSetPrototypeUuid the layout set prototype uuid
383            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
384            * @return the first matching layout set
385            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
386            * @throws SystemException if a system exception occurred
387            */
388            public static com.liferay.portal.model.LayoutSet findByLayoutSetPrototypeUuid_First(
389                    java.lang.String layoutSetPrototypeUuid,
390                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
391                    throws com.liferay.portal.NoSuchLayoutSetException,
392                            com.liferay.portal.kernel.exception.SystemException {
393                    return getPersistence()
394                                       .findByLayoutSetPrototypeUuid_First(layoutSetPrototypeUuid,
395                            orderByComparator);
396            }
397    
398            /**
399            * Returns the last layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
400            *
401            * <p>
402            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
403            * </p>
404            *
405            * @param layoutSetPrototypeUuid the layout set prototype uuid
406            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
407            * @return the last matching layout set
408            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
409            * @throws SystemException if a system exception occurred
410            */
411            public static com.liferay.portal.model.LayoutSet findByLayoutSetPrototypeUuid_Last(
412                    java.lang.String layoutSetPrototypeUuid,
413                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
414                    throws com.liferay.portal.NoSuchLayoutSetException,
415                            com.liferay.portal.kernel.exception.SystemException {
416                    return getPersistence()
417                                       .findByLayoutSetPrototypeUuid_Last(layoutSetPrototypeUuid,
418                            orderByComparator);
419            }
420    
421            /**
422            * Returns the layout sets before and after the current layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
423            *
424            * <p>
425            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
426            * </p>
427            *
428            * @param layoutSetId the primary key of the current layout set
429            * @param layoutSetPrototypeUuid the layout set prototype uuid
430            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
431            * @return the previous, current, and next layout set
432            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
433            * @throws SystemException if a system exception occurred
434            */
435            public static com.liferay.portal.model.LayoutSet[] findByLayoutSetPrototypeUuid_PrevAndNext(
436                    long layoutSetId, java.lang.String layoutSetPrototypeUuid,
437                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
438                    throws com.liferay.portal.NoSuchLayoutSetException,
439                            com.liferay.portal.kernel.exception.SystemException {
440                    return getPersistence()
441                                       .findByLayoutSetPrototypeUuid_PrevAndNext(layoutSetId,
442                            layoutSetPrototypeUuid, orderByComparator);
443            }
444    
445            /**
446            * Returns the layout set where groupId = &#63; and privateLayout = &#63; or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found.
447            *
448            * @param groupId the group ID
449            * @param privateLayout the private layout
450            * @return the matching layout set
451            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
452            * @throws SystemException if a system exception occurred
453            */
454            public static com.liferay.portal.model.LayoutSet findByG_P(long groupId,
455                    boolean privateLayout)
456                    throws com.liferay.portal.NoSuchLayoutSetException,
457                            com.liferay.portal.kernel.exception.SystemException {
458                    return getPersistence().findByG_P(groupId, privateLayout);
459            }
460    
461            /**
462            * Returns the layout set where groupId = &#63; and privateLayout = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
463            *
464            * @param groupId the group ID
465            * @param privateLayout the private layout
466            * @return the matching layout set, or <code>null</code> if a matching layout set could not be found
467            * @throws SystemException if a system exception occurred
468            */
469            public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
470                    boolean privateLayout)
471                    throws com.liferay.portal.kernel.exception.SystemException {
472                    return getPersistence().fetchByG_P(groupId, privateLayout);
473            }
474    
475            /**
476            * Returns the layout set where groupId = &#63; and privateLayout = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
477            *
478            * @param groupId the group ID
479            * @param privateLayout the private layout
480            * @param retrieveFromCache whether to use the finder cache
481            * @return the matching layout set, or <code>null</code> if a matching layout set could not be found
482            * @throws SystemException if a system exception occurred
483            */
484            public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
485                    boolean privateLayout, boolean retrieveFromCache)
486                    throws com.liferay.portal.kernel.exception.SystemException {
487                    return getPersistence()
488                                       .fetchByG_P(groupId, privateLayout, retrieveFromCache);
489            }
490    
491            /**
492            * Returns all the layout sets.
493            *
494            * @return the layout sets
495            * @throws SystemException if a system exception occurred
496            */
497            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll()
498                    throws com.liferay.portal.kernel.exception.SystemException {
499                    return getPersistence().findAll();
500            }
501    
502            /**
503            * Returns a range of all the layout sets.
504            *
505            * <p>
506            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
507            * </p>
508            *
509            * @param start the lower bound of the range of layout sets
510            * @param end the upper bound of the range of layout sets (not inclusive)
511            * @return the range of layout sets
512            * @throws SystemException if a system exception occurred
513            */
514            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
515                    int start, int end)
516                    throws com.liferay.portal.kernel.exception.SystemException {
517                    return getPersistence().findAll(start, end);
518            }
519    
520            /**
521            * Returns an ordered range of all the layout sets.
522            *
523            * <p>
524            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
525            * </p>
526            *
527            * @param start the lower bound of the range of layout sets
528            * @param end the upper bound of the range of layout sets (not inclusive)
529            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
530            * @return the ordered range of layout sets
531            * @throws SystemException if a system exception occurred
532            */
533            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
534                    int start, int end,
535                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
536                    throws com.liferay.portal.kernel.exception.SystemException {
537                    return getPersistence().findAll(start, end, orderByComparator);
538            }
539    
540            /**
541            * Removes all the layout sets where groupId = &#63; from the database.
542            *
543            * @param groupId the group ID
544            * @throws SystemException if a system exception occurred
545            */
546            public static void removeByGroupId(long groupId)
547                    throws com.liferay.portal.kernel.exception.SystemException {
548                    getPersistence().removeByGroupId(groupId);
549            }
550    
551            /**
552            * Removes all the layout sets where layoutSetPrototypeUuid = &#63; from the database.
553            *
554            * @param layoutSetPrototypeUuid the layout set prototype uuid
555            * @throws SystemException if a system exception occurred
556            */
557            public static void removeByLayoutSetPrototypeUuid(
558                    java.lang.String layoutSetPrototypeUuid)
559                    throws com.liferay.portal.kernel.exception.SystemException {
560                    getPersistence().removeByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
561            }
562    
563            /**
564            * Removes the layout set where groupId = &#63; and privateLayout = &#63; from the database.
565            *
566            * @param groupId the group ID
567            * @param privateLayout the private layout
568            * @throws SystemException if a system exception occurred
569            */
570            public static void removeByG_P(long groupId, boolean privateLayout)
571                    throws com.liferay.portal.NoSuchLayoutSetException,
572                            com.liferay.portal.kernel.exception.SystemException {
573                    getPersistence().removeByG_P(groupId, privateLayout);
574            }
575    
576            /**
577            * Removes all the layout sets from the database.
578            *
579            * @throws SystemException if a system exception occurred
580            */
581            public static void removeAll()
582                    throws com.liferay.portal.kernel.exception.SystemException {
583                    getPersistence().removeAll();
584            }
585    
586            /**
587            * Returns the number of layout sets where groupId = &#63;.
588            *
589            * @param groupId the group ID
590            * @return the number of matching layout sets
591            * @throws SystemException if a system exception occurred
592            */
593            public static int countByGroupId(long groupId)
594                    throws com.liferay.portal.kernel.exception.SystemException {
595                    return getPersistence().countByGroupId(groupId);
596            }
597    
598            /**
599            * Returns the number of layout sets where layoutSetPrototypeUuid = &#63;.
600            *
601            * @param layoutSetPrototypeUuid the layout set prototype uuid
602            * @return the number of matching layout sets
603            * @throws SystemException if a system exception occurred
604            */
605            public static int countByLayoutSetPrototypeUuid(
606                    java.lang.String layoutSetPrototypeUuid)
607                    throws com.liferay.portal.kernel.exception.SystemException {
608                    return getPersistence()
609                                       .countByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
610            }
611    
612            /**
613            * Returns the number of layout sets where groupId = &#63; and privateLayout = &#63;.
614            *
615            * @param groupId the group ID
616            * @param privateLayout the private layout
617            * @return the number of matching layout sets
618            * @throws SystemException if a system exception occurred
619            */
620            public static int countByG_P(long groupId, boolean privateLayout)
621                    throws com.liferay.portal.kernel.exception.SystemException {
622                    return getPersistence().countByG_P(groupId, privateLayout);
623            }
624    
625            /**
626            * Returns the number of layout sets.
627            *
628            * @return the number of layout sets
629            * @throws SystemException if a system exception occurred
630            */
631            public static int countAll()
632                    throws com.liferay.portal.kernel.exception.SystemException {
633                    return getPersistence().countAll();
634            }
635    
636            public static LayoutSetPersistence getPersistence() {
637                    if (_persistence == null) {
638                            _persistence = (LayoutSetPersistence)PortalBeanLocatorUtil.locate(LayoutSetPersistence.class.getName());
639    
640                            ReferenceRegistry.registerReference(LayoutSetUtil.class,
641                                    "_persistence");
642                    }
643    
644                    return _persistence;
645            }
646    
647            public void setPersistence(LayoutSetPersistence persistence) {
648                    _persistence = persistence;
649    
650                    ReferenceRegistry.registerReference(LayoutSetUtil.class, "_persistence");
651            }
652    
653            private static LayoutSetPersistence _persistence;
654    }