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