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