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.LayoutSetBranch;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the layout set branch service. This utility wraps {@link LayoutSetBranchPersistenceImpl} 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 LayoutSetBranchPersistence
036     * @see LayoutSetBranchPersistenceImpl
037     * @generated
038     */
039    public class LayoutSetBranchUtil {
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(LayoutSetBranch layoutSetBranch) {
057                    getPersistence().clearCache(layoutSetBranch);
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<LayoutSetBranch> 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<LayoutSetBranch> 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<LayoutSetBranch> 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 LayoutSetBranch update(LayoutSetBranch layoutSetBranch,
100                    boolean merge) throws SystemException {
101                    return getPersistence().update(layoutSetBranch, merge);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
106             */
107            public static LayoutSetBranch update(LayoutSetBranch layoutSetBranch,
108                    boolean merge, ServiceContext serviceContext) throws SystemException {
109                    return getPersistence().update(layoutSetBranch, merge, serviceContext);
110            }
111    
112            /**
113            * Caches the layout set branch in the entity cache if it is enabled.
114            *
115            * @param layoutSetBranch the layout set branch
116            */
117            public static void cacheResult(
118                    com.liferay.portal.model.LayoutSetBranch layoutSetBranch) {
119                    getPersistence().cacheResult(layoutSetBranch);
120            }
121    
122            /**
123            * Caches the layout set branchs in the entity cache if it is enabled.
124            *
125            * @param layoutSetBranchs the layout set branchs
126            */
127            public static void cacheResult(
128                    java.util.List<com.liferay.portal.model.LayoutSetBranch> layoutSetBranchs) {
129                    getPersistence().cacheResult(layoutSetBranchs);
130            }
131    
132            /**
133            * Creates a new layout set branch with the primary key. Does not add the layout set branch to the database.
134            *
135            * @param layoutSetBranchId the primary key for the new layout set branch
136            * @return the new layout set branch
137            */
138            public static com.liferay.portal.model.LayoutSetBranch create(
139                    long layoutSetBranchId) {
140                    return getPersistence().create(layoutSetBranchId);
141            }
142    
143            /**
144            * Removes the layout set branch with the primary key from the database. Also notifies the appropriate model listeners.
145            *
146            * @param layoutSetBranchId the primary key of the layout set branch
147            * @return the layout set branch that was removed
148            * @throws com.liferay.portal.NoSuchLayoutSetBranchException if a layout set branch with the primary key could not be found
149            * @throws SystemException if a system exception occurred
150            */
151            public static com.liferay.portal.model.LayoutSetBranch remove(
152                    long layoutSetBranchId)
153                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    return getPersistence().remove(layoutSetBranchId);
156            }
157    
158            public static com.liferay.portal.model.LayoutSetBranch updateImpl(
159                    com.liferay.portal.model.LayoutSetBranch layoutSetBranch, boolean merge)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getPersistence().updateImpl(layoutSetBranch, merge);
162            }
163    
164            /**
165            * Returns the layout set branch with the primary key or throws a {@link com.liferay.portal.NoSuchLayoutSetBranchException} if it could not be found.
166            *
167            * @param layoutSetBranchId the primary key of the layout set branch
168            * @return the layout set branch
169            * @throws com.liferay.portal.NoSuchLayoutSetBranchException if a layout set branch with the primary key could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public static com.liferay.portal.model.LayoutSetBranch findByPrimaryKey(
173                    long layoutSetBranchId)
174                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    return getPersistence().findByPrimaryKey(layoutSetBranchId);
177            }
178    
179            /**
180            * Returns the layout set branch with the primary key or returns <code>null</code> if it could not be found.
181            *
182            * @param layoutSetBranchId the primary key of the layout set branch
183            * @return the layout set branch, or <code>null</code> if a layout set branch with the primary key could not be found
184            * @throws SystemException if a system exception occurred
185            */
186            public static com.liferay.portal.model.LayoutSetBranch fetchByPrimaryKey(
187                    long layoutSetBranchId)
188                    throws com.liferay.portal.kernel.exception.SystemException {
189                    return getPersistence().fetchByPrimaryKey(layoutSetBranchId);
190            }
191    
192            /**
193            * Returns all the layout set branchs where groupId = &#63;.
194            *
195            * @param groupId the group ID
196            * @return the matching layout set branchs
197            * @throws SystemException if a system exception occurred
198            */
199            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> findByGroupId(
200                    long groupId)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return getPersistence().findByGroupId(groupId);
203            }
204    
205            /**
206            * Returns a range of all the layout set branchs where groupId = &#63;.
207            *
208            * <p>
209            * 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.
210            * </p>
211            *
212            * @param groupId the group ID
213            * @param start the lower bound of the range of layout set branchs
214            * @param end the upper bound of the range of layout set branchs (not inclusive)
215            * @return the range of matching layout set branchs
216            * @throws SystemException if a system exception occurred
217            */
218            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> findByGroupId(
219                    long groupId, int start, int end)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence().findByGroupId(groupId, start, end);
222            }
223    
224            /**
225            * Returns an ordered range of all the layout set branchs where groupId = &#63;.
226            *
227            * <p>
228            * 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.
229            * </p>
230            *
231            * @param groupId the group ID
232            * @param start the lower bound of the range of layout set branchs
233            * @param end the upper bound of the range of layout set branchs (not inclusive)
234            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
235            * @return the ordered range of matching layout set branchs
236            * @throws SystemException if a system exception occurred
237            */
238            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> findByGroupId(
239                    long groupId, int start, int end,
240                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
241                    throws com.liferay.portal.kernel.exception.SystemException {
242                    return getPersistence()
243                                       .findByGroupId(groupId, start, end, orderByComparator);
244            }
245    
246            /**
247            * Returns the first layout set branch in the ordered set where groupId = &#63;.
248            *
249            * <p>
250            * 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.
251            * </p>
252            *
253            * @param groupId the group ID
254            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
255            * @return the first matching layout set branch
256            * @throws com.liferay.portal.NoSuchLayoutSetBranchException if a matching layout set branch could not be found
257            * @throws SystemException if a system exception occurred
258            */
259            public static com.liferay.portal.model.LayoutSetBranch findByGroupId_First(
260                    long groupId,
261                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
262                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
263                            com.liferay.portal.kernel.exception.SystemException {
264                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
265            }
266    
267            /**
268            * Returns the last layout set branch in the ordered set where groupId = &#63;.
269            *
270            * <p>
271            * 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.
272            * </p>
273            *
274            * @param groupId the group ID
275            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
276            * @return the last matching layout set branch
277            * @throws com.liferay.portal.NoSuchLayoutSetBranchException if a matching layout set branch could not be found
278            * @throws SystemException if a system exception occurred
279            */
280            public static com.liferay.portal.model.LayoutSetBranch findByGroupId_Last(
281                    long groupId,
282                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
283                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
284                            com.liferay.portal.kernel.exception.SystemException {
285                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
286            }
287    
288            /**
289            * Returns the layout set branchs before and after the current layout set branch in the ordered set where groupId = &#63;.
290            *
291            * <p>
292            * 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.
293            * </p>
294            *
295            * @param layoutSetBranchId the primary key of the current layout set branch
296            * @param groupId the group ID
297            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
298            * @return the previous, current, and next layout set branch
299            * @throws com.liferay.portal.NoSuchLayoutSetBranchException if a layout set branch with the primary key could not be found
300            * @throws SystemException if a system exception occurred
301            */
302            public static com.liferay.portal.model.LayoutSetBranch[] findByGroupId_PrevAndNext(
303                    long layoutSetBranchId, long groupId,
304                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
305                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
306                            com.liferay.portal.kernel.exception.SystemException {
307                    return getPersistence()
308                                       .findByGroupId_PrevAndNext(layoutSetBranchId, groupId,
309                            orderByComparator);
310            }
311    
312            /**
313            * Returns all the layout set branchs that the user has permission to view where groupId = &#63;.
314            *
315            * @param groupId the group ID
316            * @return the matching layout set branchs that the user has permission to view
317            * @throws SystemException if a system exception occurred
318            */
319            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> filterFindByGroupId(
320                    long groupId)
321                    throws com.liferay.portal.kernel.exception.SystemException {
322                    return getPersistence().filterFindByGroupId(groupId);
323            }
324    
325            /**
326            * Returns a range of all the layout set branchs that the user has permission to view where groupId = &#63;.
327            *
328            * <p>
329            * 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.
330            * </p>
331            *
332            * @param groupId the group ID
333            * @param start the lower bound of the range of layout set branchs
334            * @param end the upper bound of the range of layout set branchs (not inclusive)
335            * @return the range of matching layout set branchs that the user has permission to view
336            * @throws SystemException if a system exception occurred
337            */
338            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> filterFindByGroupId(
339                    long groupId, int start, int end)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence().filterFindByGroupId(groupId, start, end);
342            }
343    
344            /**
345            * Returns an ordered range of all the layout set branchs that the user has permissions to view where groupId = &#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 groupId the group ID
352            * @param start the lower bound of the range of layout set branchs
353            * @param end the upper bound of the range of layout set branchs (not inclusive)
354            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
355            * @return the ordered range of matching layout set branchs that the user has permission to view
356            * @throws SystemException if a system exception occurred
357            */
358            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> filterFindByGroupId(
359                    long groupId, int start, int end,
360                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
361                    throws com.liferay.portal.kernel.exception.SystemException {
362                    return getPersistence()
363                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
364            }
365    
366            /**
367            * Returns the layout set branchs before and after the current layout set branch in the ordered set of layout set branchs that the user has permission to view where groupId = &#63;.
368            *
369            * @param layoutSetBranchId the primary key of the current layout set branch
370            * @param groupId the group ID
371            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
372            * @return the previous, current, and next layout set branch
373            * @throws com.liferay.portal.NoSuchLayoutSetBranchException if a layout set branch with the primary key could not be found
374            * @throws SystemException if a system exception occurred
375            */
376            public static com.liferay.portal.model.LayoutSetBranch[] filterFindByGroupId_PrevAndNext(
377                    long layoutSetBranchId, long groupId,
378                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
379                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
380                            com.liferay.portal.kernel.exception.SystemException {
381                    return getPersistence()
382                                       .filterFindByGroupId_PrevAndNext(layoutSetBranchId, groupId,
383                            orderByComparator);
384            }
385    
386            /**
387            * Returns all the layout set branchs where groupId = &#63; and privateLayout = &#63;.
388            *
389            * @param groupId the group ID
390            * @param privateLayout the private layout
391            * @return the matching layout set branchs
392            * @throws SystemException if a system exception occurred
393            */
394            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> findByG_P(
395                    long groupId, boolean privateLayout)
396                    throws com.liferay.portal.kernel.exception.SystemException {
397                    return getPersistence().findByG_P(groupId, privateLayout);
398            }
399    
400            /**
401            * Returns a range of all the layout set branchs where groupId = &#63; and privateLayout = &#63;.
402            *
403            * <p>
404            * 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.
405            * </p>
406            *
407            * @param groupId the group ID
408            * @param privateLayout the private layout
409            * @param start the lower bound of the range of layout set branchs
410            * @param end the upper bound of the range of layout set branchs (not inclusive)
411            * @return the range of matching layout set branchs
412            * @throws SystemException if a system exception occurred
413            */
414            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> findByG_P(
415                    long groupId, boolean privateLayout, int start, int end)
416                    throws com.liferay.portal.kernel.exception.SystemException {
417                    return getPersistence().findByG_P(groupId, privateLayout, start, end);
418            }
419    
420            /**
421            * Returns an ordered range of all the layout set branchs where groupId = &#63; and privateLayout = &#63;.
422            *
423            * <p>
424            * 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.
425            * </p>
426            *
427            * @param groupId the group ID
428            * @param privateLayout the private layout
429            * @param start the lower bound of the range of layout set branchs
430            * @param end the upper bound of the range of layout set branchs (not inclusive)
431            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
432            * @return the ordered range of matching layout set branchs
433            * @throws SystemException if a system exception occurred
434            */
435            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> findByG_P(
436                    long groupId, boolean privateLayout, int start, int end,
437                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
438                    throws com.liferay.portal.kernel.exception.SystemException {
439                    return getPersistence()
440                                       .findByG_P(groupId, privateLayout, start, end,
441                            orderByComparator);
442            }
443    
444            /**
445            * Returns the first layout set branch in the ordered set where groupId = &#63; and privateLayout = &#63;.
446            *
447            * <p>
448            * 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.
449            * </p>
450            *
451            * @param groupId the group ID
452            * @param privateLayout the private layout
453            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
454            * @return the first matching layout set branch
455            * @throws com.liferay.portal.NoSuchLayoutSetBranchException if a matching layout set branch could not be found
456            * @throws SystemException if a system exception occurred
457            */
458            public static com.liferay.portal.model.LayoutSetBranch findByG_P_First(
459                    long groupId, boolean privateLayout,
460                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
461                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
462                            com.liferay.portal.kernel.exception.SystemException {
463                    return getPersistence()
464                                       .findByG_P_First(groupId, privateLayout, orderByComparator);
465            }
466    
467            /**
468            * Returns the last layout set branch in the ordered set where groupId = &#63; and privateLayout = &#63;.
469            *
470            * <p>
471            * 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.
472            * </p>
473            *
474            * @param groupId the group ID
475            * @param privateLayout the private layout
476            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
477            * @return the last matching layout set branch
478            * @throws com.liferay.portal.NoSuchLayoutSetBranchException if a matching layout set branch could not be found
479            * @throws SystemException if a system exception occurred
480            */
481            public static com.liferay.portal.model.LayoutSetBranch findByG_P_Last(
482                    long groupId, boolean privateLayout,
483                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
484                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
485                            com.liferay.portal.kernel.exception.SystemException {
486                    return getPersistence()
487                                       .findByG_P_Last(groupId, privateLayout, orderByComparator);
488            }
489    
490            /**
491            * Returns the layout set branchs before and after the current layout set branch in the ordered set where groupId = &#63; and privateLayout = &#63;.
492            *
493            * <p>
494            * 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.
495            * </p>
496            *
497            * @param layoutSetBranchId the primary key of the current layout set branch
498            * @param groupId the group ID
499            * @param privateLayout the private layout
500            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
501            * @return the previous, current, and next layout set branch
502            * @throws com.liferay.portal.NoSuchLayoutSetBranchException if a layout set branch with the primary key could not be found
503            * @throws SystemException if a system exception occurred
504            */
505            public static com.liferay.portal.model.LayoutSetBranch[] findByG_P_PrevAndNext(
506                    long layoutSetBranchId, long groupId, boolean privateLayout,
507                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
508                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
509                            com.liferay.portal.kernel.exception.SystemException {
510                    return getPersistence()
511                                       .findByG_P_PrevAndNext(layoutSetBranchId, groupId,
512                            privateLayout, orderByComparator);
513            }
514    
515            /**
516            * Returns all the layout set branchs that the user has permission to view where groupId = &#63; and privateLayout = &#63;.
517            *
518            * @param groupId the group ID
519            * @param privateLayout the private layout
520            * @return the matching layout set branchs that the user has permission to view
521            * @throws SystemException if a system exception occurred
522            */
523            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> filterFindByG_P(
524                    long groupId, boolean privateLayout)
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    return getPersistence().filterFindByG_P(groupId, privateLayout);
527            }
528    
529            /**
530            * Returns a range of all the layout set branchs that the user has permission to view where groupId = &#63; and privateLayout = &#63;.
531            *
532            * <p>
533            * 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.
534            * </p>
535            *
536            * @param groupId the group ID
537            * @param privateLayout the private layout
538            * @param start the lower bound of the range of layout set branchs
539            * @param end the upper bound of the range of layout set branchs (not inclusive)
540            * @return the range of matching layout set branchs that the user has permission to view
541            * @throws SystemException if a system exception occurred
542            */
543            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> filterFindByG_P(
544                    long groupId, boolean privateLayout, int start, int end)
545                    throws com.liferay.portal.kernel.exception.SystemException {
546                    return getPersistence()
547                                       .filterFindByG_P(groupId, privateLayout, start, end);
548            }
549    
550            /**
551            * Returns an ordered range of all the layout set branchs that the user has permissions to view where groupId = &#63; and privateLayout = &#63;.
552            *
553            * <p>
554            * 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.
555            * </p>
556            *
557            * @param groupId the group ID
558            * @param privateLayout the private layout
559            * @param start the lower bound of the range of layout set branchs
560            * @param end the upper bound of the range of layout set branchs (not inclusive)
561            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
562            * @return the ordered range of matching layout set branchs that the user has permission to view
563            * @throws SystemException if a system exception occurred
564            */
565            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> filterFindByG_P(
566                    long groupId, boolean privateLayout, int start, int end,
567                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
568                    throws com.liferay.portal.kernel.exception.SystemException {
569                    return getPersistence()
570                                       .filterFindByG_P(groupId, privateLayout, start, end,
571                            orderByComparator);
572            }
573    
574            /**
575            * Returns the layout set branchs before and after the current layout set branch in the ordered set of layout set branchs that the user has permission to view where groupId = &#63; and privateLayout = &#63;.
576            *
577            * @param layoutSetBranchId the primary key of the current layout set branch
578            * @param groupId the group ID
579            * @param privateLayout the private layout
580            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
581            * @return the previous, current, and next layout set branch
582            * @throws com.liferay.portal.NoSuchLayoutSetBranchException if a layout set branch with the primary key could not be found
583            * @throws SystemException if a system exception occurred
584            */
585            public static com.liferay.portal.model.LayoutSetBranch[] filterFindByG_P_PrevAndNext(
586                    long layoutSetBranchId, long groupId, boolean privateLayout,
587                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
588                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
589                            com.liferay.portal.kernel.exception.SystemException {
590                    return getPersistence()
591                                       .filterFindByG_P_PrevAndNext(layoutSetBranchId, groupId,
592                            privateLayout, orderByComparator);
593            }
594    
595            /**
596            * Returns the layout set branch where groupId = &#63; and privateLayout = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchLayoutSetBranchException} if it could not be found.
597            *
598            * @param groupId the group ID
599            * @param privateLayout the private layout
600            * @param name the name
601            * @return the matching layout set branch
602            * @throws com.liferay.portal.NoSuchLayoutSetBranchException if a matching layout set branch could not be found
603            * @throws SystemException if a system exception occurred
604            */
605            public static com.liferay.portal.model.LayoutSetBranch findByG_P_N(
606                    long groupId, boolean privateLayout, java.lang.String name)
607                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
608                            com.liferay.portal.kernel.exception.SystemException {
609                    return getPersistence().findByG_P_N(groupId, privateLayout, name);
610            }
611    
612            /**
613            * Returns the layout set branch where groupId = &#63; and privateLayout = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
614            *
615            * @param groupId the group ID
616            * @param privateLayout the private layout
617            * @param name the name
618            * @return the matching layout set branch, or <code>null</code> if a matching layout set branch could not be found
619            * @throws SystemException if a system exception occurred
620            */
621            public static com.liferay.portal.model.LayoutSetBranch fetchByG_P_N(
622                    long groupId, boolean privateLayout, java.lang.String name)
623                    throws com.liferay.portal.kernel.exception.SystemException {
624                    return getPersistence().fetchByG_P_N(groupId, privateLayout, name);
625            }
626    
627            /**
628            * Returns the layout set branch where groupId = &#63; and privateLayout = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
629            *
630            * @param groupId the group ID
631            * @param privateLayout the private layout
632            * @param name the name
633            * @param retrieveFromCache whether to use the finder cache
634            * @return the matching layout set branch, or <code>null</code> if a matching layout set branch could not be found
635            * @throws SystemException if a system exception occurred
636            */
637            public static com.liferay.portal.model.LayoutSetBranch fetchByG_P_N(
638                    long groupId, boolean privateLayout, java.lang.String name,
639                    boolean retrieveFromCache)
640                    throws com.liferay.portal.kernel.exception.SystemException {
641                    return getPersistence()
642                                       .fetchByG_P_N(groupId, privateLayout, name, retrieveFromCache);
643            }
644    
645            /**
646            * Returns all the layout set branchs.
647            *
648            * @return the layout set branchs
649            * @throws SystemException if a system exception occurred
650            */
651            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> findAll()
652                    throws com.liferay.portal.kernel.exception.SystemException {
653                    return getPersistence().findAll();
654            }
655    
656            /**
657            * Returns a range of all the layout set branchs.
658            *
659            * <p>
660            * 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.
661            * </p>
662            *
663            * @param start the lower bound of the range of layout set branchs
664            * @param end the upper bound of the range of layout set branchs (not inclusive)
665            * @return the range of layout set branchs
666            * @throws SystemException if a system exception occurred
667            */
668            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> findAll(
669                    int start, int end)
670                    throws com.liferay.portal.kernel.exception.SystemException {
671                    return getPersistence().findAll(start, end);
672            }
673    
674            /**
675            * Returns an ordered range of all the layout set branchs.
676            *
677            * <p>
678            * 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.
679            * </p>
680            *
681            * @param start the lower bound of the range of layout set branchs
682            * @param end the upper bound of the range of layout set branchs (not inclusive)
683            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
684            * @return the ordered range of layout set branchs
685            * @throws SystemException if a system exception occurred
686            */
687            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> findAll(
688                    int start, int end,
689                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
690                    throws com.liferay.portal.kernel.exception.SystemException {
691                    return getPersistence().findAll(start, end, orderByComparator);
692            }
693    
694            /**
695            * Removes all the layout set branchs where groupId = &#63; from the database.
696            *
697            * @param groupId the group ID
698            * @throws SystemException if a system exception occurred
699            */
700            public static void removeByGroupId(long groupId)
701                    throws com.liferay.portal.kernel.exception.SystemException {
702                    getPersistence().removeByGroupId(groupId);
703            }
704    
705            /**
706            * Removes all the layout set branchs where groupId = &#63; and privateLayout = &#63; from the database.
707            *
708            * @param groupId the group ID
709            * @param privateLayout the private layout
710            * @throws SystemException if a system exception occurred
711            */
712            public static void removeByG_P(long groupId, boolean privateLayout)
713                    throws com.liferay.portal.kernel.exception.SystemException {
714                    getPersistence().removeByG_P(groupId, privateLayout);
715            }
716    
717            /**
718            * Removes the layout set branch where groupId = &#63; and privateLayout = &#63; and name = &#63; from the database.
719            *
720            * @param groupId the group ID
721            * @param privateLayout the private layout
722            * @param name the name
723            * @throws SystemException if a system exception occurred
724            */
725            public static void removeByG_P_N(long groupId, boolean privateLayout,
726                    java.lang.String name)
727                    throws com.liferay.portal.NoSuchLayoutSetBranchException,
728                            com.liferay.portal.kernel.exception.SystemException {
729                    getPersistence().removeByG_P_N(groupId, privateLayout, name);
730            }
731    
732            /**
733            * Removes all the layout set branchs from the database.
734            *
735            * @throws SystemException if a system exception occurred
736            */
737            public static void removeAll()
738                    throws com.liferay.portal.kernel.exception.SystemException {
739                    getPersistence().removeAll();
740            }
741    
742            /**
743            * Returns the number of layout set branchs where groupId = &#63;.
744            *
745            * @param groupId the group ID
746            * @return the number of matching layout set branchs
747            * @throws SystemException if a system exception occurred
748            */
749            public static int countByGroupId(long groupId)
750                    throws com.liferay.portal.kernel.exception.SystemException {
751                    return getPersistence().countByGroupId(groupId);
752            }
753    
754            /**
755            * Returns the number of layout set branchs that the user has permission to view where groupId = &#63;.
756            *
757            * @param groupId the group ID
758            * @return the number of matching layout set branchs that the user has permission to view
759            * @throws SystemException if a system exception occurred
760            */
761            public static int filterCountByGroupId(long groupId)
762                    throws com.liferay.portal.kernel.exception.SystemException {
763                    return getPersistence().filterCountByGroupId(groupId);
764            }
765    
766            /**
767            * Returns the number of layout set branchs where groupId = &#63; and privateLayout = &#63;.
768            *
769            * @param groupId the group ID
770            * @param privateLayout the private layout
771            * @return the number of matching layout set branchs
772            * @throws SystemException if a system exception occurred
773            */
774            public static int countByG_P(long groupId, boolean privateLayout)
775                    throws com.liferay.portal.kernel.exception.SystemException {
776                    return getPersistence().countByG_P(groupId, privateLayout);
777            }
778    
779            /**
780            * Returns the number of layout set branchs that the user has permission to view where groupId = &#63; and privateLayout = &#63;.
781            *
782            * @param groupId the group ID
783            * @param privateLayout the private layout
784            * @return the number of matching layout set branchs that the user has permission to view
785            * @throws SystemException if a system exception occurred
786            */
787            public static int filterCountByG_P(long groupId, boolean privateLayout)
788                    throws com.liferay.portal.kernel.exception.SystemException {
789                    return getPersistence().filterCountByG_P(groupId, privateLayout);
790            }
791    
792            /**
793            * Returns the number of layout set branchs where groupId = &#63; and privateLayout = &#63; and name = &#63;.
794            *
795            * @param groupId the group ID
796            * @param privateLayout the private layout
797            * @param name the name
798            * @return the number of matching layout set branchs
799            * @throws SystemException if a system exception occurred
800            */
801            public static int countByG_P_N(long groupId, boolean privateLayout,
802                    java.lang.String name)
803                    throws com.liferay.portal.kernel.exception.SystemException {
804                    return getPersistence().countByG_P_N(groupId, privateLayout, name);
805            }
806    
807            /**
808            * Returns the number of layout set branchs.
809            *
810            * @return the number of layout set branchs
811            * @throws SystemException if a system exception occurred
812            */
813            public static int countAll()
814                    throws com.liferay.portal.kernel.exception.SystemException {
815                    return getPersistence().countAll();
816            }
817    
818            public static LayoutSetBranchPersistence getPersistence() {
819                    if (_persistence == null) {
820                            _persistence = (LayoutSetBranchPersistence)PortalBeanLocatorUtil.locate(LayoutSetBranchPersistence.class.getName());
821    
822                            ReferenceRegistry.registerReference(LayoutSetBranchUtil.class,
823                                    "_persistence");
824                    }
825    
826                    return _persistence;
827            }
828    
829            public void setPersistence(LayoutSetBranchPersistence persistence) {
830                    _persistence = persistence;
831    
832                    ReferenceRegistry.registerReference(LayoutSetBranchUtil.class,
833                            "_persistence");
834            }
835    
836            private static LayoutSetBranchPersistence _persistence;
837    }