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, boolean)
098             */
099            public static LayoutSet update(LayoutSet layoutSet, boolean merge)
100                    throws SystemException {
101                    return getPersistence().update(layoutSet, merge);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
106             */
107            public static LayoutSet update(LayoutSet layoutSet, boolean merge,
108                    ServiceContext serviceContext) throws SystemException {
109                    return getPersistence().update(layoutSet, merge, 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, boolean merge)
157                    throws com.liferay.portal.kernel.exception.SystemException {
158                    return getPersistence().updateImpl(layoutSet, merge);
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            * <p>
247            * 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.
248            * </p>
249            *
250            * @param groupId the group ID
251            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
252            * @return the first matching layout set
253            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
254            * @throws SystemException if a system exception occurred
255            */
256            public static com.liferay.portal.model.LayoutSet findByGroupId_First(
257                    long groupId,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.NoSuchLayoutSetException,
260                            com.liferay.portal.kernel.exception.SystemException {
261                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
262            }
263    
264            /**
265            * Returns the last layout set in the ordered set where groupId = &#63;.
266            *
267            * <p>
268            * 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.
269            * </p>
270            *
271            * @param groupId the group ID
272            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
273            * @return the last matching layout set
274            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
275            * @throws SystemException if a system exception occurred
276            */
277            public static com.liferay.portal.model.LayoutSet findByGroupId_Last(
278                    long groupId,
279                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
280                    throws com.liferay.portal.NoSuchLayoutSetException,
281                            com.liferay.portal.kernel.exception.SystemException {
282                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
283            }
284    
285            /**
286            * Returns the layout sets before and after the current layout set in the ordered set where groupId = &#63;.
287            *
288            * <p>
289            * 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.
290            * </p>
291            *
292            * @param layoutSetId the primary key of the current layout set
293            * @param groupId the group ID
294            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
295            * @return the previous, current, and next layout set
296            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
297            * @throws SystemException if a system exception occurred
298            */
299            public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
300                    long layoutSetId, long groupId,
301                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
302                    throws com.liferay.portal.NoSuchLayoutSetException,
303                            com.liferay.portal.kernel.exception.SystemException {
304                    return getPersistence()
305                                       .findByGroupId_PrevAndNext(layoutSetId, groupId,
306                            orderByComparator);
307            }
308    
309            /**
310            * Returns all the layout sets where layoutSetPrototypeUuid = &#63;.
311            *
312            * @param layoutSetPrototypeUuid the layout set prototype uuid
313            * @return the matching layout sets
314            * @throws SystemException if a system exception occurred
315            */
316            public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
317                    java.lang.String layoutSetPrototypeUuid)
318                    throws com.liferay.portal.kernel.exception.SystemException {
319                    return getPersistence()
320                                       .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
321            }
322    
323            /**
324            * Returns a range of all the layout sets where layoutSetPrototypeUuid = &#63;.
325            *
326            * <p>
327            * 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.
328            * </p>
329            *
330            * @param layoutSetPrototypeUuid the layout set prototype uuid
331            * @param start the lower bound of the range of layout sets
332            * @param end the upper bound of the range of layout sets (not inclusive)
333            * @return the range of matching layout sets
334            * @throws SystemException if a system exception occurred
335            */
336            public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
337                    java.lang.String layoutSetPrototypeUuid, int start, int end)
338                    throws com.liferay.portal.kernel.exception.SystemException {
339                    return getPersistence()
340                                       .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid, start,
341                            end);
342            }
343    
344            /**
345            * Returns an ordered range of all the layout sets where layoutSetPrototypeUuid = &#63;.
346            *
347            * <p>
348            * 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.
349            * </p>
350            *
351            * @param layoutSetPrototypeUuid the layout set prototype uuid
352            * @param start the lower bound of the range of layout sets
353            * @param end the upper bound of the range of layout sets (not inclusive)
354            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
355            * @return the ordered range of matching layout sets
356            * @throws SystemException if a system exception occurred
357            */
358            public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
359                    java.lang.String layoutSetPrototypeUuid, int start, int end,
360                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
361                    throws com.liferay.portal.kernel.exception.SystemException {
362                    return getPersistence()
363                                       .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid, start,
364                            end, orderByComparator);
365            }
366    
367            /**
368            * Returns the first layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
369            *
370            * <p>
371            * 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.
372            * </p>
373            *
374            * @param layoutSetPrototypeUuid the layout set prototype uuid
375            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
376            * @return the first matching layout set
377            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
378            * @throws SystemException if a system exception occurred
379            */
380            public static com.liferay.portal.model.LayoutSet findByLayoutSetPrototypeUuid_First(
381                    java.lang.String layoutSetPrototypeUuid,
382                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
383                    throws com.liferay.portal.NoSuchLayoutSetException,
384                            com.liferay.portal.kernel.exception.SystemException {
385                    return getPersistence()
386                                       .findByLayoutSetPrototypeUuid_First(layoutSetPrototypeUuid,
387                            orderByComparator);
388            }
389    
390            /**
391            * Returns the last layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
392            *
393            * <p>
394            * 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.
395            * </p>
396            *
397            * @param layoutSetPrototypeUuid the layout set prototype uuid
398            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
399            * @return the last matching layout set
400            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
401            * @throws SystemException if a system exception occurred
402            */
403            public static com.liferay.portal.model.LayoutSet findByLayoutSetPrototypeUuid_Last(
404                    java.lang.String layoutSetPrototypeUuid,
405                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
406                    throws com.liferay.portal.NoSuchLayoutSetException,
407                            com.liferay.portal.kernel.exception.SystemException {
408                    return getPersistence()
409                                       .findByLayoutSetPrototypeUuid_Last(layoutSetPrototypeUuid,
410                            orderByComparator);
411            }
412    
413            /**
414            * Returns the layout sets before and after the current layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
415            *
416            * <p>
417            * 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.
418            * </p>
419            *
420            * @param layoutSetId the primary key of the current layout set
421            * @param layoutSetPrototypeUuid the layout set prototype uuid
422            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
423            * @return the previous, current, and next layout set
424            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
425            * @throws SystemException if a system exception occurred
426            */
427            public static com.liferay.portal.model.LayoutSet[] findByLayoutSetPrototypeUuid_PrevAndNext(
428                    long layoutSetId, java.lang.String layoutSetPrototypeUuid,
429                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
430                    throws com.liferay.portal.NoSuchLayoutSetException,
431                            com.liferay.portal.kernel.exception.SystemException {
432                    return getPersistence()
433                                       .findByLayoutSetPrototypeUuid_PrevAndNext(layoutSetId,
434                            layoutSetPrototypeUuid, orderByComparator);
435            }
436    
437            /**
438            * Returns the layout set where groupId = &#63; and privateLayout = &#63; or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found.
439            *
440            * @param groupId the group ID
441            * @param privateLayout the private layout
442            * @return the matching layout set
443            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
444            * @throws SystemException if a system exception occurred
445            */
446            public static com.liferay.portal.model.LayoutSet findByG_P(long groupId,
447                    boolean privateLayout)
448                    throws com.liferay.portal.NoSuchLayoutSetException,
449                            com.liferay.portal.kernel.exception.SystemException {
450                    return getPersistence().findByG_P(groupId, privateLayout);
451            }
452    
453            /**
454            * 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.
455            *
456            * @param groupId the group ID
457            * @param privateLayout the private layout
458            * @return the matching layout set, or <code>null</code> if a matching layout set could not be found
459            * @throws SystemException if a system exception occurred
460            */
461            public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
462                    boolean privateLayout)
463                    throws com.liferay.portal.kernel.exception.SystemException {
464                    return getPersistence().fetchByG_P(groupId, privateLayout);
465            }
466    
467            /**
468            * 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.
469            *
470            * @param groupId the group ID
471            * @param privateLayout the private layout
472            * @param retrieveFromCache whether to use the finder cache
473            * @return the matching layout set, or <code>null</code> if a matching layout set could not be found
474            * @throws SystemException if a system exception occurred
475            */
476            public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
477                    boolean privateLayout, boolean retrieveFromCache)
478                    throws com.liferay.portal.kernel.exception.SystemException {
479                    return getPersistence()
480                                       .fetchByG_P(groupId, privateLayout, retrieveFromCache);
481            }
482    
483            /**
484            * Returns all the layout sets.
485            *
486            * @return the layout sets
487            * @throws SystemException if a system exception occurred
488            */
489            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll()
490                    throws com.liferay.portal.kernel.exception.SystemException {
491                    return getPersistence().findAll();
492            }
493    
494            /**
495            * Returns a range of all the layout sets.
496            *
497            * <p>
498            * 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.
499            * </p>
500            *
501            * @param start the lower bound of the range of layout sets
502            * @param end the upper bound of the range of layout sets (not inclusive)
503            * @return the range of layout sets
504            * @throws SystemException if a system exception occurred
505            */
506            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
507                    int start, int end)
508                    throws com.liferay.portal.kernel.exception.SystemException {
509                    return getPersistence().findAll(start, end);
510            }
511    
512            /**
513            * Returns an ordered range of all the layout sets.
514            *
515            * <p>
516            * 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.
517            * </p>
518            *
519            * @param start the lower bound of the range of layout sets
520            * @param end the upper bound of the range of layout sets (not inclusive)
521            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
522            * @return the ordered range of layout sets
523            * @throws SystemException if a system exception occurred
524            */
525            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
526                    int start, int end,
527                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
528                    throws com.liferay.portal.kernel.exception.SystemException {
529                    return getPersistence().findAll(start, end, orderByComparator);
530            }
531    
532            /**
533            * Removes all the layout sets where groupId = &#63; from the database.
534            *
535            * @param groupId the group ID
536            * @throws SystemException if a system exception occurred
537            */
538            public static void removeByGroupId(long groupId)
539                    throws com.liferay.portal.kernel.exception.SystemException {
540                    getPersistence().removeByGroupId(groupId);
541            }
542    
543            /**
544            * Removes all the layout sets where layoutSetPrototypeUuid = &#63; from the database.
545            *
546            * @param layoutSetPrototypeUuid the layout set prototype uuid
547            * @throws SystemException if a system exception occurred
548            */
549            public static void removeByLayoutSetPrototypeUuid(
550                    java.lang.String layoutSetPrototypeUuid)
551                    throws com.liferay.portal.kernel.exception.SystemException {
552                    getPersistence().removeByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
553            }
554    
555            /**
556            * Removes the layout set where groupId = &#63; and privateLayout = &#63; from the database.
557            *
558            * @param groupId the group ID
559            * @param privateLayout the private layout
560            * @throws SystemException if a system exception occurred
561            */
562            public static void removeByG_P(long groupId, boolean privateLayout)
563                    throws com.liferay.portal.NoSuchLayoutSetException,
564                            com.liferay.portal.kernel.exception.SystemException {
565                    getPersistence().removeByG_P(groupId, privateLayout);
566            }
567    
568            /**
569            * Removes all the layout sets from the database.
570            *
571            * @throws SystemException if a system exception occurred
572            */
573            public static void removeAll()
574                    throws com.liferay.portal.kernel.exception.SystemException {
575                    getPersistence().removeAll();
576            }
577    
578            /**
579            * Returns the number of layout sets where groupId = &#63;.
580            *
581            * @param groupId the group ID
582            * @return the number of matching layout sets
583            * @throws SystemException if a system exception occurred
584            */
585            public static int countByGroupId(long groupId)
586                    throws com.liferay.portal.kernel.exception.SystemException {
587                    return getPersistence().countByGroupId(groupId);
588            }
589    
590            /**
591            * Returns the number of layout sets where layoutSetPrototypeUuid = &#63;.
592            *
593            * @param layoutSetPrototypeUuid the layout set prototype uuid
594            * @return the number of matching layout sets
595            * @throws SystemException if a system exception occurred
596            */
597            public static int countByLayoutSetPrototypeUuid(
598                    java.lang.String layoutSetPrototypeUuid)
599                    throws com.liferay.portal.kernel.exception.SystemException {
600                    return getPersistence()
601                                       .countByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
602            }
603    
604            /**
605            * Returns the number of layout sets where groupId = &#63; and privateLayout = &#63;.
606            *
607            * @param groupId the group ID
608            * @param privateLayout the private layout
609            * @return the number of matching layout sets
610            * @throws SystemException if a system exception occurred
611            */
612            public static int countByG_P(long groupId, boolean privateLayout)
613                    throws com.liferay.portal.kernel.exception.SystemException {
614                    return getPersistence().countByG_P(groupId, privateLayout);
615            }
616    
617            /**
618            * Returns the number of layout sets.
619            *
620            * @return the number of layout sets
621            * @throws SystemException if a system exception occurred
622            */
623            public static int countAll()
624                    throws com.liferay.portal.kernel.exception.SystemException {
625                    return getPersistence().countAll();
626            }
627    
628            public static LayoutSetPersistence getPersistence() {
629                    if (_persistence == null) {
630                            _persistence = (LayoutSetPersistence)PortalBeanLocatorUtil.locate(LayoutSetPersistence.class.getName());
631    
632                            ReferenceRegistry.registerReference(LayoutSetUtil.class,
633                                    "_persistence");
634                    }
635    
636                    return _persistence;
637            }
638    
639            public void setPersistence(LayoutSetPersistence persistence) {
640                    _persistence = persistence;
641    
642                    ReferenceRegistry.registerReference(LayoutSetUtil.class, "_persistence");
643            }
644    
645            private static LayoutSetPersistence _persistence;
646    }