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