001    /**
002     * Copyright (c) 2000-2012 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#update(com.liferay.portal.model.BaseModel)
098             */
099            public static LayoutSet update(LayoutSet layoutSet)
100                    throws SystemException {
101                    return getPersistence().update(layoutSet);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static LayoutSet update(LayoutSet layoutSet,
108                    ServiceContext serviceContext) throws SystemException {
109                    return getPersistence().update(layoutSet, serviceContext);
110            }
111    
112            /**
113            * Caches the layout set in the entity cache if it is enabled.
114            *
115            * @param layoutSet the layout set
116            */
117            public static void cacheResult(com.liferay.portal.model.LayoutSet layoutSet) {
118                    getPersistence().cacheResult(layoutSet);
119            }
120    
121            /**
122            * Caches the layout sets in the entity cache if it is enabled.
123            *
124            * @param layoutSets the layout sets
125            */
126            public static void cacheResult(
127                    java.util.List<com.liferay.portal.model.LayoutSet> layoutSets) {
128                    getPersistence().cacheResult(layoutSets);
129            }
130    
131            /**
132            * Creates a new layout set with the primary key. Does not add the layout set to the database.
133            *
134            * @param layoutSetId the primary key for the new layout set
135            * @return the new layout set
136            */
137            public static com.liferay.portal.model.LayoutSet create(long layoutSetId) {
138                    return getPersistence().create(layoutSetId);
139            }
140    
141            /**
142            * Removes the layout set with the primary key from the database. Also notifies the appropriate model listeners.
143            *
144            * @param layoutSetId the primary key of the layout set
145            * @return the layout set that was removed
146            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
147            * @throws SystemException if a system exception occurred
148            */
149            public static com.liferay.portal.model.LayoutSet remove(long layoutSetId)
150                    throws com.liferay.portal.NoSuchLayoutSetException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    return getPersistence().remove(layoutSetId);
153            }
154    
155            public static com.liferay.portal.model.LayoutSet updateImpl(
156                    com.liferay.portal.model.LayoutSet layoutSet)
157                    throws com.liferay.portal.kernel.exception.SystemException {
158                    return getPersistence().updateImpl(layoutSet);
159            }
160    
161            /**
162            * Returns the layout set with the primary key or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found.
163            *
164            * @param layoutSetId the primary key of the layout set
165            * @return the layout set
166            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
167            * @throws SystemException if a system exception occurred
168            */
169            public static com.liferay.portal.model.LayoutSet findByPrimaryKey(
170                    long layoutSetId)
171                    throws com.liferay.portal.NoSuchLayoutSetException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return getPersistence().findByPrimaryKey(layoutSetId);
174            }
175    
176            /**
177            * Returns the layout set with the primary key or returns <code>null</code> if it could not be found.
178            *
179            * @param layoutSetId the primary key of the layout set
180            * @return the layout set, or <code>null</code> if a layout set with the primary key could not be found
181            * @throws SystemException if a system exception occurred
182            */
183            public static com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
184                    long layoutSetId)
185                    throws com.liferay.portal.kernel.exception.SystemException {
186                    return getPersistence().fetchByPrimaryKey(layoutSetId);
187            }
188    
189            /**
190            * Returns all the layout sets where groupId = &#63;.
191            *
192            * @param groupId the group ID
193            * @return the matching layout sets
194            * @throws SystemException if a system exception occurred
195            */
196            public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
197                    long groupId)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getPersistence().findByGroupId(groupId);
200            }
201    
202            /**
203            * Returns a range of all the layout sets where groupId = &#63;.
204            *
205            * <p>
206            * 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.
207            * </p>
208            *
209            * @param groupId the group ID
210            * @param start the lower bound of the range of layout sets
211            * @param end the upper bound of the range of layout sets (not inclusive)
212            * @return the range of matching layout sets
213            * @throws SystemException if a system exception occurred
214            */
215            public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
216                    long groupId, int start, int end)
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return getPersistence().findByGroupId(groupId, start, end);
219            }
220    
221            /**
222            * Returns an ordered range of all the layout sets where groupId = &#63;.
223            *
224            * <p>
225            * 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.
226            * </p>
227            *
228            * @param groupId the group ID
229            * @param start the lower bound of the range of layout sets
230            * @param end the upper bound of the range of layout sets (not inclusive)
231            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
232            * @return the ordered range of matching layout sets
233            * @throws SystemException if a system exception occurred
234            */
235            public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
236                    long groupId, int start, int end,
237                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
238                    throws com.liferay.portal.kernel.exception.SystemException {
239                    return getPersistence()
240                                       .findByGroupId(groupId, start, end, orderByComparator);
241            }
242    
243            /**
244            * Returns the first layout set in the ordered set where groupId = &#63;.
245            *
246            * @param groupId the group ID
247            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
248            * @return the first matching layout set
249            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
250            * @throws SystemException if a system exception occurred
251            */
252            public static com.liferay.portal.model.LayoutSet findByGroupId_First(
253                    long groupId,
254                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
255                    throws com.liferay.portal.NoSuchLayoutSetException,
256                            com.liferay.portal.kernel.exception.SystemException {
257                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
258            }
259    
260            /**
261            * Returns the first layout set in the ordered set where groupId = &#63;.
262            *
263            * @param groupId the group ID
264            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
265            * @return the first matching layout set, or <code>null</code> if a matching layout set could not be found
266            * @throws SystemException if a system exception occurred
267            */
268            public static com.liferay.portal.model.LayoutSet fetchByGroupId_First(
269                    long groupId,
270                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
271                    throws com.liferay.portal.kernel.exception.SystemException {
272                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
273            }
274    
275            /**
276            * Returns the last layout set in the ordered set where groupId = &#63;.
277            *
278            * @param groupId the group ID
279            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
280            * @return the last matching layout set
281            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
282            * @throws SystemException if a system exception occurred
283            */
284            public static com.liferay.portal.model.LayoutSet findByGroupId_Last(
285                    long groupId,
286                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
287                    throws com.liferay.portal.NoSuchLayoutSetException,
288                            com.liferay.portal.kernel.exception.SystemException {
289                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
290            }
291    
292            /**
293            * Returns the last layout set in the ordered set where groupId = &#63;.
294            *
295            * @param groupId the group ID
296            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
297            * @return the last matching layout set, or <code>null</code> if a matching layout set could not be found
298            * @throws SystemException if a system exception occurred
299            */
300            public static com.liferay.portal.model.LayoutSet fetchByGroupId_Last(
301                    long groupId,
302                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
303                    throws com.liferay.portal.kernel.exception.SystemException {
304                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
305            }
306    
307            /**
308            * Returns the layout sets before and after the current layout set in the ordered set where groupId = &#63;.
309            *
310            * @param layoutSetId the primary key of the current layout set
311            * @param groupId the group ID
312            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
313            * @return the previous, current, and next layout set
314            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
315            * @throws SystemException if a system exception occurred
316            */
317            public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
318                    long layoutSetId, long groupId,
319                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
320                    throws com.liferay.portal.NoSuchLayoutSetException,
321                            com.liferay.portal.kernel.exception.SystemException {
322                    return getPersistence()
323                                       .findByGroupId_PrevAndNext(layoutSetId, groupId,
324                            orderByComparator);
325            }
326    
327            /**
328            * Returns all the layout sets where layoutSetPrototypeUuid = &#63;.
329            *
330            * @param layoutSetPrototypeUuid the layout set prototype uuid
331            * @return the matching layout sets
332            * @throws SystemException if a system exception occurred
333            */
334            public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
335                    java.lang.String layoutSetPrototypeUuid)
336                    throws com.liferay.portal.kernel.exception.SystemException {
337                    return getPersistence()
338                                       .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
339            }
340    
341            /**
342            * Returns a range of all the layout sets where layoutSetPrototypeUuid = &#63;.
343            *
344            * <p>
345            * 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.
346            * </p>
347            *
348            * @param layoutSetPrototypeUuid the layout set prototype uuid
349            * @param start the lower bound of the range of layout sets
350            * @param end the upper bound of the range of layout sets (not inclusive)
351            * @return the range of matching layout sets
352            * @throws SystemException if a system exception occurred
353            */
354            public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
355                    java.lang.String layoutSetPrototypeUuid, int start, int end)
356                    throws com.liferay.portal.kernel.exception.SystemException {
357                    return getPersistence()
358                                       .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid, start,
359                            end);
360            }
361    
362            /**
363            * Returns an ordered range of all the layout sets where layoutSetPrototypeUuid = &#63;.
364            *
365            * <p>
366            * 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.
367            * </p>
368            *
369            * @param layoutSetPrototypeUuid the layout set prototype uuid
370            * @param start the lower bound of the range of layout sets
371            * @param end the upper bound of the range of layout sets (not inclusive)
372            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
373            * @return the ordered range of matching layout sets
374            * @throws SystemException if a system exception occurred
375            */
376            public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
377                    java.lang.String layoutSetPrototypeUuid, int start, int end,
378                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
379                    throws com.liferay.portal.kernel.exception.SystemException {
380                    return getPersistence()
381                                       .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid, start,
382                            end, orderByComparator);
383            }
384    
385            /**
386            * Returns the first layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
387            *
388            * @param layoutSetPrototypeUuid the layout set prototype uuid
389            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
390            * @return the first matching layout set
391            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
392            * @throws SystemException if a system exception occurred
393            */
394            public static com.liferay.portal.model.LayoutSet findByLayoutSetPrototypeUuid_First(
395                    java.lang.String layoutSetPrototypeUuid,
396                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
397                    throws com.liferay.portal.NoSuchLayoutSetException,
398                            com.liferay.portal.kernel.exception.SystemException {
399                    return getPersistence()
400                                       .findByLayoutSetPrototypeUuid_First(layoutSetPrototypeUuid,
401                            orderByComparator);
402            }
403    
404            /**
405            * Returns the first layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
406            *
407            * @param layoutSetPrototypeUuid the layout set prototype uuid
408            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
409            * @return the first matching layout set, or <code>null</code> if a matching layout set could not be found
410            * @throws SystemException if a system exception occurred
411            */
412            public static com.liferay.portal.model.LayoutSet fetchByLayoutSetPrototypeUuid_First(
413                    java.lang.String layoutSetPrototypeUuid,
414                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415                    throws com.liferay.portal.kernel.exception.SystemException {
416                    return getPersistence()
417                                       .fetchByLayoutSetPrototypeUuid_First(layoutSetPrototypeUuid,
418                            orderByComparator);
419            }
420    
421            /**
422            * Returns the last layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
423            *
424            * @param layoutSetPrototypeUuid the layout set prototype uuid
425            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
426            * @return the last matching layout set
427            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
428            * @throws SystemException if a system exception occurred
429            */
430            public static com.liferay.portal.model.LayoutSet findByLayoutSetPrototypeUuid_Last(
431                    java.lang.String layoutSetPrototypeUuid,
432                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
433                    throws com.liferay.portal.NoSuchLayoutSetException,
434                            com.liferay.portal.kernel.exception.SystemException {
435                    return getPersistence()
436                                       .findByLayoutSetPrototypeUuid_Last(layoutSetPrototypeUuid,
437                            orderByComparator);
438            }
439    
440            /**
441            * Returns the last layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
442            *
443            * @param layoutSetPrototypeUuid the layout set prototype uuid
444            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
445            * @return the last matching layout set, or <code>null</code> if a matching layout set could not be found
446            * @throws SystemException if a system exception occurred
447            */
448            public static com.liferay.portal.model.LayoutSet fetchByLayoutSetPrototypeUuid_Last(
449                    java.lang.String layoutSetPrototypeUuid,
450                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
451                    throws com.liferay.portal.kernel.exception.SystemException {
452                    return getPersistence()
453                                       .fetchByLayoutSetPrototypeUuid_Last(layoutSetPrototypeUuid,
454                            orderByComparator);
455            }
456    
457            /**
458            * Returns the layout sets before and after the current layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
459            *
460            * @param layoutSetId the primary key of the current layout set
461            * @param layoutSetPrototypeUuid the layout set prototype uuid
462            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
463            * @return the previous, current, and next layout set
464            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
465            * @throws SystemException if a system exception occurred
466            */
467            public static com.liferay.portal.model.LayoutSet[] findByLayoutSetPrototypeUuid_PrevAndNext(
468                    long layoutSetId, java.lang.String layoutSetPrototypeUuid,
469                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
470                    throws com.liferay.portal.NoSuchLayoutSetException,
471                            com.liferay.portal.kernel.exception.SystemException {
472                    return getPersistence()
473                                       .findByLayoutSetPrototypeUuid_PrevAndNext(layoutSetId,
474                            layoutSetPrototypeUuid, orderByComparator);
475            }
476    
477            /**
478            * Returns the layout set where groupId = &#63; and privateLayout = &#63; or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found.
479            *
480            * @param groupId the group ID
481            * @param privateLayout the private layout
482            * @return the matching layout set
483            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
484            * @throws SystemException if a system exception occurred
485            */
486            public static com.liferay.portal.model.LayoutSet findByG_P(long groupId,
487                    boolean privateLayout)
488                    throws com.liferay.portal.NoSuchLayoutSetException,
489                            com.liferay.portal.kernel.exception.SystemException {
490                    return getPersistence().findByG_P(groupId, privateLayout);
491            }
492    
493            /**
494            * 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.
495            *
496            * @param groupId the group ID
497            * @param privateLayout the private layout
498            * @return the matching layout set, or <code>null</code> if a matching layout set could not be found
499            * @throws SystemException if a system exception occurred
500            */
501            public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
502                    boolean privateLayout)
503                    throws com.liferay.portal.kernel.exception.SystemException {
504                    return getPersistence().fetchByG_P(groupId, privateLayout);
505            }
506    
507            /**
508            * 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.
509            *
510            * @param groupId the group ID
511            * @param privateLayout the private layout
512            * @param retrieveFromCache whether to use the finder cache
513            * @return the matching layout set, or <code>null</code> if a matching layout set could not be found
514            * @throws SystemException if a system exception occurred
515            */
516            public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
517                    boolean privateLayout, boolean retrieveFromCache)
518                    throws com.liferay.portal.kernel.exception.SystemException {
519                    return getPersistence()
520                                       .fetchByG_P(groupId, privateLayout, retrieveFromCache);
521            }
522    
523            /**
524            * Returns all the layout sets.
525            *
526            * @return the layout sets
527            * @throws SystemException if a system exception occurred
528            */
529            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll()
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    return getPersistence().findAll();
532            }
533    
534            /**
535            * Returns a range of all the layout sets.
536            *
537            * <p>
538            * 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.
539            * </p>
540            *
541            * @param start the lower bound of the range of layout sets
542            * @param end the upper bound of the range of layout sets (not inclusive)
543            * @return the range of layout sets
544            * @throws SystemException if a system exception occurred
545            */
546            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
547                    int start, int end)
548                    throws com.liferay.portal.kernel.exception.SystemException {
549                    return getPersistence().findAll(start, end);
550            }
551    
552            /**
553            * Returns an ordered range of all the layout sets.
554            *
555            * <p>
556            * 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.
557            * </p>
558            *
559            * @param start the lower bound of the range of layout sets
560            * @param end the upper bound of the range of layout sets (not inclusive)
561            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
562            * @return the ordered range of layout sets
563            * @throws SystemException if a system exception occurred
564            */
565            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
566                    int start, int end,
567                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
568                    throws com.liferay.portal.kernel.exception.SystemException {
569                    return getPersistence().findAll(start, end, orderByComparator);
570            }
571    
572            /**
573            * Removes all the layout sets where groupId = &#63; from the database.
574            *
575            * @param groupId the group ID
576            * @throws SystemException if a system exception occurred
577            */
578            public static void removeByGroupId(long groupId)
579                    throws com.liferay.portal.kernel.exception.SystemException {
580                    getPersistence().removeByGroupId(groupId);
581            }
582    
583            /**
584            * Removes all the layout sets where layoutSetPrototypeUuid = &#63; from the database.
585            *
586            * @param layoutSetPrototypeUuid the layout set prototype uuid
587            * @throws SystemException if a system exception occurred
588            */
589            public static void removeByLayoutSetPrototypeUuid(
590                    java.lang.String layoutSetPrototypeUuid)
591                    throws com.liferay.portal.kernel.exception.SystemException {
592                    getPersistence().removeByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
593            }
594    
595            /**
596            * Removes the layout set where groupId = &#63; and privateLayout = &#63; from the database.
597            *
598            * @param groupId the group ID
599            * @param privateLayout the private layout
600            * @return the layout set that was removed
601            * @throws SystemException if a system exception occurred
602            */
603            public static com.liferay.portal.model.LayoutSet removeByG_P(long groupId,
604                    boolean privateLayout)
605                    throws com.liferay.portal.NoSuchLayoutSetException,
606                            com.liferay.portal.kernel.exception.SystemException {
607                    return getPersistence().removeByG_P(groupId, privateLayout);
608            }
609    
610            /**
611            * Removes all the layout sets from the database.
612            *
613            * @throws SystemException if a system exception occurred
614            */
615            public static void removeAll()
616                    throws com.liferay.portal.kernel.exception.SystemException {
617                    getPersistence().removeAll();
618            }
619    
620            /**
621            * Returns the number of layout sets where groupId = &#63;.
622            *
623            * @param groupId the group ID
624            * @return the number of matching layout sets
625            * @throws SystemException if a system exception occurred
626            */
627            public static int countByGroupId(long groupId)
628                    throws com.liferay.portal.kernel.exception.SystemException {
629                    return getPersistence().countByGroupId(groupId);
630            }
631    
632            /**
633            * Returns the number of layout sets where layoutSetPrototypeUuid = &#63;.
634            *
635            * @param layoutSetPrototypeUuid the layout set prototype uuid
636            * @return the number of matching layout sets
637            * @throws SystemException if a system exception occurred
638            */
639            public static int countByLayoutSetPrototypeUuid(
640                    java.lang.String layoutSetPrototypeUuid)
641                    throws com.liferay.portal.kernel.exception.SystemException {
642                    return getPersistence()
643                                       .countByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
644            }
645    
646            /**
647            * Returns the number of layout sets where groupId = &#63; and privateLayout = &#63;.
648            *
649            * @param groupId the group ID
650            * @param privateLayout the private layout
651            * @return the number of matching layout sets
652            * @throws SystemException if a system exception occurred
653            */
654            public static int countByG_P(long groupId, boolean privateLayout)
655                    throws com.liferay.portal.kernel.exception.SystemException {
656                    return getPersistence().countByG_P(groupId, privateLayout);
657            }
658    
659            /**
660            * Returns the number of layout sets.
661            *
662            * @return the number of layout sets
663            * @throws SystemException if a system exception occurred
664            */
665            public static int countAll()
666                    throws com.liferay.portal.kernel.exception.SystemException {
667                    return getPersistence().countAll();
668            }
669    
670            public static LayoutSetPersistence getPersistence() {
671                    if (_persistence == null) {
672                            _persistence = (LayoutSetPersistence)PortalBeanLocatorUtil.locate(LayoutSetPersistence.class.getName());
673    
674                            ReferenceRegistry.registerReference(LayoutSetUtil.class,
675                                    "_persistence");
676                    }
677    
678                    return _persistence;
679            }
680    
681            /**
682             * @deprecated
683             */
684            public void setPersistence(LayoutSetPersistence persistence) {
685            }
686    
687            private static LayoutSetPersistence _persistence;
688    }