001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.model.LayoutBranch;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the layout branch service. This utility wraps {@link com.liferay.portal.service.persistence.impl.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.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see LayoutBranchPersistence
037     * @see com.liferay.portal.service.persistence.impl.LayoutBranchPersistenceImpl
038     * @generated
039     */
040    @ProviderType
041    public class LayoutBranchUtil {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
046             */
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
050             */
051            public static void clearCache() {
052                    getPersistence().clearCache();
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
057             */
058            public static void clearCache(LayoutBranch layoutBranch) {
059                    getPersistence().clearCache(layoutBranch);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<LayoutBranch> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<LayoutBranch> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end) {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<LayoutBranch> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator<LayoutBranch> orderByComparator) {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
098             */
099            public static LayoutBranch update(LayoutBranch layoutBranch) {
100                    return getPersistence().update(layoutBranch);
101            }
102    
103            /**
104             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
105             */
106            public static LayoutBranch update(LayoutBranch layoutBranch,
107                    ServiceContext serviceContext) {
108                    return getPersistence().update(layoutBranch, serviceContext);
109            }
110    
111            /**
112            * Returns all the layout branchs where layoutSetBranchId = &#63;.
113            *
114            * @param layoutSetBranchId the layout set branch ID
115            * @return the matching layout branchs
116            */
117            public static List<LayoutBranch> findByLayoutSetBranchId(
118                    long layoutSetBranchId) {
119                    return getPersistence().findByLayoutSetBranchId(layoutSetBranchId);
120            }
121    
122            /**
123            * Returns a range of all the layout branchs where layoutSetBranchId = &#63;.
124            *
125            * <p>
126            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
127            * </p>
128            *
129            * @param layoutSetBranchId the layout set branch ID
130            * @param start the lower bound of the range of layout branchs
131            * @param end the upper bound of the range of layout branchs (not inclusive)
132            * @return the range of matching layout branchs
133            */
134            public static List<LayoutBranch> findByLayoutSetBranchId(
135                    long layoutSetBranchId, int start, int end) {
136                    return getPersistence()
137                                       .findByLayoutSetBranchId(layoutSetBranchId, start, end);
138            }
139    
140            /**
141            * Returns an ordered range of all the layout branchs where layoutSetBranchId = &#63;.
142            *
143            * <p>
144            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
145            * </p>
146            *
147            * @param layoutSetBranchId the layout set branch ID
148            * @param start the lower bound of the range of layout branchs
149            * @param end the upper bound of the range of layout branchs (not inclusive)
150            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
151            * @return the ordered range of matching layout branchs
152            */
153            public static List<LayoutBranch> findByLayoutSetBranchId(
154                    long layoutSetBranchId, int start, int end,
155                    OrderByComparator<LayoutBranch> orderByComparator) {
156                    return getPersistence()
157                                       .findByLayoutSetBranchId(layoutSetBranchId, start, end,
158                            orderByComparator);
159            }
160    
161            /**
162            * Returns an ordered range of all the layout branchs where layoutSetBranchId = &#63;.
163            *
164            * <p>
165            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
166            * </p>
167            *
168            * @param layoutSetBranchId the layout set branch ID
169            * @param start the lower bound of the range of layout branchs
170            * @param end the upper bound of the range of layout branchs (not inclusive)
171            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
172            * @param retrieveFromCache whether to retrieve from the finder cache
173            * @return the ordered range of matching layout branchs
174            */
175            public static List<LayoutBranch> findByLayoutSetBranchId(
176                    long layoutSetBranchId, int start, int end,
177                    OrderByComparator<LayoutBranch> orderByComparator,
178                    boolean retrieveFromCache) {
179                    return getPersistence()
180                                       .findByLayoutSetBranchId(layoutSetBranchId, start, end,
181                            orderByComparator, retrieveFromCache);
182            }
183    
184            /**
185            * Returns the first layout branch in the ordered set where layoutSetBranchId = &#63;.
186            *
187            * @param layoutSetBranchId the layout set branch ID
188            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
189            * @return the first matching layout branch
190            * @throws NoSuchLayoutBranchException if a matching layout branch could not be found
191            */
192            public static LayoutBranch findByLayoutSetBranchId_First(
193                    long layoutSetBranchId,
194                    OrderByComparator<LayoutBranch> orderByComparator)
195                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
196                    return getPersistence()
197                                       .findByLayoutSetBranchId_First(layoutSetBranchId,
198                            orderByComparator);
199            }
200    
201            /**
202            * Returns the first layout branch in the ordered set where layoutSetBranchId = &#63;.
203            *
204            * @param layoutSetBranchId the layout set branch ID
205            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
206            * @return the first matching layout branch, or <code>null</code> if a matching layout branch could not be found
207            */
208            public static LayoutBranch fetchByLayoutSetBranchId_First(
209                    long layoutSetBranchId,
210                    OrderByComparator<LayoutBranch> orderByComparator) {
211                    return getPersistence()
212                                       .fetchByLayoutSetBranchId_First(layoutSetBranchId,
213                            orderByComparator);
214            }
215    
216            /**
217            * Returns the last layout branch in the ordered set where layoutSetBranchId = &#63;.
218            *
219            * @param layoutSetBranchId the layout set branch ID
220            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
221            * @return the last matching layout branch
222            * @throws NoSuchLayoutBranchException if a matching layout branch could not be found
223            */
224            public static LayoutBranch findByLayoutSetBranchId_Last(
225                    long layoutSetBranchId,
226                    OrderByComparator<LayoutBranch> orderByComparator)
227                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
228                    return getPersistence()
229                                       .findByLayoutSetBranchId_Last(layoutSetBranchId,
230                            orderByComparator);
231            }
232    
233            /**
234            * Returns the last layout branch in the ordered set where layoutSetBranchId = &#63;.
235            *
236            * @param layoutSetBranchId the layout set branch ID
237            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
238            * @return the last matching layout branch, or <code>null</code> if a matching layout branch could not be found
239            */
240            public static LayoutBranch fetchByLayoutSetBranchId_Last(
241                    long layoutSetBranchId,
242                    OrderByComparator<LayoutBranch> orderByComparator) {
243                    return getPersistence()
244                                       .fetchByLayoutSetBranchId_Last(layoutSetBranchId,
245                            orderByComparator);
246            }
247    
248            /**
249            * Returns the layout branchs before and after the current layout branch in the ordered set where layoutSetBranchId = &#63;.
250            *
251            * @param layoutBranchId the primary key of the current layout branch
252            * @param layoutSetBranchId the layout set branch ID
253            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
254            * @return the previous, current, and next layout branch
255            * @throws NoSuchLayoutBranchException if a layout branch with the primary key could not be found
256            */
257            public static LayoutBranch[] findByLayoutSetBranchId_PrevAndNext(
258                    long layoutBranchId, long layoutSetBranchId,
259                    OrderByComparator<LayoutBranch> orderByComparator)
260                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
261                    return getPersistence()
262                                       .findByLayoutSetBranchId_PrevAndNext(layoutBranchId,
263                            layoutSetBranchId, orderByComparator);
264            }
265    
266            /**
267            * Removes all the layout branchs where layoutSetBranchId = &#63; from the database.
268            *
269            * @param layoutSetBranchId the layout set branch ID
270            */
271            public static void removeByLayoutSetBranchId(long layoutSetBranchId) {
272                    getPersistence().removeByLayoutSetBranchId(layoutSetBranchId);
273            }
274    
275            /**
276            * Returns the number of layout branchs where layoutSetBranchId = &#63;.
277            *
278            * @param layoutSetBranchId the layout set branch ID
279            * @return the number of matching layout branchs
280            */
281            public static int countByLayoutSetBranchId(long layoutSetBranchId) {
282                    return getPersistence().countByLayoutSetBranchId(layoutSetBranchId);
283            }
284    
285            /**
286            * Returns all the layout branchs where layoutSetBranchId = &#63; and plid = &#63;.
287            *
288            * @param layoutSetBranchId the layout set branch ID
289            * @param plid the plid
290            * @return the matching layout branchs
291            */
292            public static List<LayoutBranch> findByL_P(long layoutSetBranchId, long plid) {
293                    return getPersistence().findByL_P(layoutSetBranchId, plid);
294            }
295    
296            /**
297            * Returns a range of all the layout branchs where layoutSetBranchId = &#63; and plid = &#63;.
298            *
299            * <p>
300            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
301            * </p>
302            *
303            * @param layoutSetBranchId the layout set branch ID
304            * @param plid the plid
305            * @param start the lower bound of the range of layout branchs
306            * @param end the upper bound of the range of layout branchs (not inclusive)
307            * @return the range of matching layout branchs
308            */
309            public static List<LayoutBranch> findByL_P(long layoutSetBranchId,
310                    long plid, int start, int end) {
311                    return getPersistence().findByL_P(layoutSetBranchId, plid, start, end);
312            }
313    
314            /**
315            * Returns an ordered range of all the layout branchs where layoutSetBranchId = &#63; and plid = &#63;.
316            *
317            * <p>
318            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
319            * </p>
320            *
321            * @param layoutSetBranchId the layout set branch ID
322            * @param plid the plid
323            * @param start the lower bound of the range of layout branchs
324            * @param end the upper bound of the range of layout branchs (not inclusive)
325            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
326            * @return the ordered range of matching layout branchs
327            */
328            public static List<LayoutBranch> findByL_P(long layoutSetBranchId,
329                    long plid, int start, int end,
330                    OrderByComparator<LayoutBranch> orderByComparator) {
331                    return getPersistence()
332                                       .findByL_P(layoutSetBranchId, plid, start, end,
333                            orderByComparator);
334            }
335    
336            /**
337            * Returns an ordered range of all the layout branchs where layoutSetBranchId = &#63; and plid = &#63;.
338            *
339            * <p>
340            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
341            * </p>
342            *
343            * @param layoutSetBranchId the layout set branch ID
344            * @param plid the plid
345            * @param start the lower bound of the range of layout branchs
346            * @param end the upper bound of the range of layout branchs (not inclusive)
347            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
348            * @param retrieveFromCache whether to retrieve from the finder cache
349            * @return the ordered range of matching layout branchs
350            */
351            public static List<LayoutBranch> findByL_P(long layoutSetBranchId,
352                    long plid, int start, int end,
353                    OrderByComparator<LayoutBranch> orderByComparator,
354                    boolean retrieveFromCache) {
355                    return getPersistence()
356                                       .findByL_P(layoutSetBranchId, plid, start, end,
357                            orderByComparator, retrieveFromCache);
358            }
359    
360            /**
361            * Returns the first layout branch in the ordered set where layoutSetBranchId = &#63; and plid = &#63;.
362            *
363            * @param layoutSetBranchId the layout set branch ID
364            * @param plid the plid
365            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
366            * @return the first matching layout branch
367            * @throws NoSuchLayoutBranchException if a matching layout branch could not be found
368            */
369            public static LayoutBranch findByL_P_First(long layoutSetBranchId,
370                    long plid, OrderByComparator<LayoutBranch> orderByComparator)
371                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
372                    return getPersistence()
373                                       .findByL_P_First(layoutSetBranchId, plid, orderByComparator);
374            }
375    
376            /**
377            * Returns the first layout branch in the ordered set where layoutSetBranchId = &#63; and plid = &#63;.
378            *
379            * @param layoutSetBranchId the layout set branch ID
380            * @param plid the plid
381            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
382            * @return the first matching layout branch, or <code>null</code> if a matching layout branch could not be found
383            */
384            public static LayoutBranch fetchByL_P_First(long layoutSetBranchId,
385                    long plid, OrderByComparator<LayoutBranch> orderByComparator) {
386                    return getPersistence()
387                                       .fetchByL_P_First(layoutSetBranchId, plid, orderByComparator);
388            }
389    
390            /**
391            * Returns the last layout branch in the ordered set where layoutSetBranchId = &#63; and plid = &#63;.
392            *
393            * @param layoutSetBranchId the layout set branch ID
394            * @param plid the plid
395            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
396            * @return the last matching layout branch
397            * @throws NoSuchLayoutBranchException if a matching layout branch could not be found
398            */
399            public static LayoutBranch findByL_P_Last(long layoutSetBranchId,
400                    long plid, OrderByComparator<LayoutBranch> orderByComparator)
401                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
402                    return getPersistence()
403                                       .findByL_P_Last(layoutSetBranchId, plid, orderByComparator);
404            }
405    
406            /**
407            * Returns the last layout branch in the ordered set where layoutSetBranchId = &#63; and plid = &#63;.
408            *
409            * @param layoutSetBranchId the layout set branch ID
410            * @param plid the plid
411            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
412            * @return the last matching layout branch, or <code>null</code> if a matching layout branch could not be found
413            */
414            public static LayoutBranch fetchByL_P_Last(long layoutSetBranchId,
415                    long plid, OrderByComparator<LayoutBranch> orderByComparator) {
416                    return getPersistence()
417                                       .fetchByL_P_Last(layoutSetBranchId, plid, orderByComparator);
418            }
419    
420            /**
421            * Returns the layout branchs before and after the current layout branch in the ordered set where layoutSetBranchId = &#63; and plid = &#63;.
422            *
423            * @param layoutBranchId the primary key of the current layout branch
424            * @param layoutSetBranchId the layout set branch ID
425            * @param plid the plid
426            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
427            * @return the previous, current, and next layout branch
428            * @throws NoSuchLayoutBranchException if a layout branch with the primary key could not be found
429            */
430            public static LayoutBranch[] findByL_P_PrevAndNext(long layoutBranchId,
431                    long layoutSetBranchId, long plid,
432                    OrderByComparator<LayoutBranch> orderByComparator)
433                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
434                    return getPersistence()
435                                       .findByL_P_PrevAndNext(layoutBranchId, layoutSetBranchId,
436                            plid, orderByComparator);
437            }
438    
439            /**
440            * Removes all the layout branchs where layoutSetBranchId = &#63; and plid = &#63; from the database.
441            *
442            * @param layoutSetBranchId the layout set branch ID
443            * @param plid the plid
444            */
445            public static void removeByL_P(long layoutSetBranchId, long plid) {
446                    getPersistence().removeByL_P(layoutSetBranchId, plid);
447            }
448    
449            /**
450            * Returns the number of layout branchs where layoutSetBranchId = &#63; and plid = &#63;.
451            *
452            * @param layoutSetBranchId the layout set branch ID
453            * @param plid the plid
454            * @return the number of matching layout branchs
455            */
456            public static int countByL_P(long layoutSetBranchId, long plid) {
457                    return getPersistence().countByL_P(layoutSetBranchId, plid);
458            }
459    
460            /**
461            * Returns the layout branch where layoutSetBranchId = &#63; and plid = &#63; and name = &#63; or throws a {@link NoSuchLayoutBranchException} if it could not be found.
462            *
463            * @param layoutSetBranchId the layout set branch ID
464            * @param plid the plid
465            * @param name the name
466            * @return the matching layout branch
467            * @throws NoSuchLayoutBranchException if a matching layout branch could not be found
468            */
469            public static LayoutBranch findByL_P_N(long layoutSetBranchId, long plid,
470                    java.lang.String name)
471                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
472                    return getPersistence().findByL_P_N(layoutSetBranchId, plid, name);
473            }
474    
475            /**
476            * 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.
477            *
478            * @param layoutSetBranchId the layout set branch ID
479            * @param plid the plid
480            * @param name the name
481            * @return the matching layout branch, or <code>null</code> if a matching layout branch could not be found
482            */
483            public static LayoutBranch fetchByL_P_N(long layoutSetBranchId, long plid,
484                    java.lang.String name) {
485                    return getPersistence().fetchByL_P_N(layoutSetBranchId, plid, name);
486            }
487    
488            /**
489            * 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.
490            *
491            * @param layoutSetBranchId the layout set branch ID
492            * @param plid the plid
493            * @param name the name
494            * @param retrieveFromCache whether to retrieve from the finder cache
495            * @return the matching layout branch, or <code>null</code> if a matching layout branch could not be found
496            */
497            public static LayoutBranch fetchByL_P_N(long layoutSetBranchId, long plid,
498                    java.lang.String name, boolean retrieveFromCache) {
499                    return getPersistence()
500                                       .fetchByL_P_N(layoutSetBranchId, plid, name,
501                            retrieveFromCache);
502            }
503    
504            /**
505            * Removes the layout branch where layoutSetBranchId = &#63; and plid = &#63; and name = &#63; from the database.
506            *
507            * @param layoutSetBranchId the layout set branch ID
508            * @param plid the plid
509            * @param name the name
510            * @return the layout branch that was removed
511            */
512            public static LayoutBranch removeByL_P_N(long layoutSetBranchId, long plid,
513                    java.lang.String name)
514                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
515                    return getPersistence().removeByL_P_N(layoutSetBranchId, plid, name);
516            }
517    
518            /**
519            * Returns the number of layout branchs where layoutSetBranchId = &#63; and plid = &#63; and name = &#63;.
520            *
521            * @param layoutSetBranchId the layout set branch ID
522            * @param plid the plid
523            * @param name the name
524            * @return the number of matching layout branchs
525            */
526            public static int countByL_P_N(long layoutSetBranchId, long plid,
527                    java.lang.String name) {
528                    return getPersistence().countByL_P_N(layoutSetBranchId, plid, name);
529            }
530    
531            /**
532            * Returns all the layout branchs where layoutSetBranchId = &#63; and plid = &#63; and master = &#63;.
533            *
534            * @param layoutSetBranchId the layout set branch ID
535            * @param plid the plid
536            * @param master the master
537            * @return the matching layout branchs
538            */
539            public static List<LayoutBranch> findByL_P_M(long layoutSetBranchId,
540                    long plid, boolean master) {
541                    return getPersistence().findByL_P_M(layoutSetBranchId, plid, master);
542            }
543    
544            /**
545            * Returns a range of all the layout branchs where layoutSetBranchId = &#63; and plid = &#63; and master = &#63;.
546            *
547            * <p>
548            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
549            * </p>
550            *
551            * @param layoutSetBranchId the layout set branch ID
552            * @param plid the plid
553            * @param master the master
554            * @param start the lower bound of the range of layout branchs
555            * @param end the upper bound of the range of layout branchs (not inclusive)
556            * @return the range of matching layout branchs
557            */
558            public static List<LayoutBranch> findByL_P_M(long layoutSetBranchId,
559                    long plid, boolean master, int start, int end) {
560                    return getPersistence()
561                                       .findByL_P_M(layoutSetBranchId, plid, master, start, end);
562            }
563    
564            /**
565            * Returns an ordered range of all the layout branchs where layoutSetBranchId = &#63; and plid = &#63; and master = &#63;.
566            *
567            * <p>
568            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
569            * </p>
570            *
571            * @param layoutSetBranchId the layout set branch ID
572            * @param plid the plid
573            * @param master the master
574            * @param start the lower bound of the range of layout branchs
575            * @param end the upper bound of the range of layout branchs (not inclusive)
576            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
577            * @return the ordered range of matching layout branchs
578            */
579            public static List<LayoutBranch> findByL_P_M(long layoutSetBranchId,
580                    long plid, boolean master, int start, int end,
581                    OrderByComparator<LayoutBranch> orderByComparator) {
582                    return getPersistence()
583                                       .findByL_P_M(layoutSetBranchId, plid, master, start, end,
584                            orderByComparator);
585            }
586    
587            /**
588            * Returns an ordered range of all the layout branchs where layoutSetBranchId = &#63; and plid = &#63; and master = &#63;.
589            *
590            * <p>
591            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
592            * </p>
593            *
594            * @param layoutSetBranchId the layout set branch ID
595            * @param plid the plid
596            * @param master the master
597            * @param start the lower bound of the range of layout branchs
598            * @param end the upper bound of the range of layout branchs (not inclusive)
599            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
600            * @param retrieveFromCache whether to retrieve from the finder cache
601            * @return the ordered range of matching layout branchs
602            */
603            public static List<LayoutBranch> findByL_P_M(long layoutSetBranchId,
604                    long plid, boolean master, int start, int end,
605                    OrderByComparator<LayoutBranch> orderByComparator,
606                    boolean retrieveFromCache) {
607                    return getPersistence()
608                                       .findByL_P_M(layoutSetBranchId, plid, master, start, end,
609                            orderByComparator, retrieveFromCache);
610            }
611    
612            /**
613            * Returns the first layout branch in the ordered set where layoutSetBranchId = &#63; and plid = &#63; and master = &#63;.
614            *
615            * @param layoutSetBranchId the layout set branch ID
616            * @param plid the plid
617            * @param master the master
618            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
619            * @return the first matching layout branch
620            * @throws NoSuchLayoutBranchException if a matching layout branch could not be found
621            */
622            public static LayoutBranch findByL_P_M_First(long layoutSetBranchId,
623                    long plid, boolean master,
624                    OrderByComparator<LayoutBranch> orderByComparator)
625                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
626                    return getPersistence()
627                                       .findByL_P_M_First(layoutSetBranchId, plid, master,
628                            orderByComparator);
629            }
630    
631            /**
632            * Returns the first layout branch in the ordered set where layoutSetBranchId = &#63; and plid = &#63; and master = &#63;.
633            *
634            * @param layoutSetBranchId the layout set branch ID
635            * @param plid the plid
636            * @param master the master
637            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
638            * @return the first matching layout branch, or <code>null</code> if a matching layout branch could not be found
639            */
640            public static LayoutBranch fetchByL_P_M_First(long layoutSetBranchId,
641                    long plid, boolean master,
642                    OrderByComparator<LayoutBranch> orderByComparator) {
643                    return getPersistence()
644                                       .fetchByL_P_M_First(layoutSetBranchId, plid, master,
645                            orderByComparator);
646            }
647    
648            /**
649            * Returns the last layout branch in the ordered set where layoutSetBranchId = &#63; and plid = &#63; and master = &#63;.
650            *
651            * @param layoutSetBranchId the layout set branch ID
652            * @param plid the plid
653            * @param master the master
654            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
655            * @return the last matching layout branch
656            * @throws NoSuchLayoutBranchException if a matching layout branch could not be found
657            */
658            public static LayoutBranch findByL_P_M_Last(long layoutSetBranchId,
659                    long plid, boolean master,
660                    OrderByComparator<LayoutBranch> orderByComparator)
661                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
662                    return getPersistence()
663                                       .findByL_P_M_Last(layoutSetBranchId, plid, master,
664                            orderByComparator);
665            }
666    
667            /**
668            * Returns the last layout branch in the ordered set where layoutSetBranchId = &#63; and plid = &#63; and master = &#63;.
669            *
670            * @param layoutSetBranchId the layout set branch ID
671            * @param plid the plid
672            * @param master the master
673            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
674            * @return the last matching layout branch, or <code>null</code> if a matching layout branch could not be found
675            */
676            public static LayoutBranch fetchByL_P_M_Last(long layoutSetBranchId,
677                    long plid, boolean master,
678                    OrderByComparator<LayoutBranch> orderByComparator) {
679                    return getPersistence()
680                                       .fetchByL_P_M_Last(layoutSetBranchId, plid, master,
681                            orderByComparator);
682            }
683    
684            /**
685            * Returns the layout branchs before and after the current layout branch in the ordered set where layoutSetBranchId = &#63; and plid = &#63; and master = &#63;.
686            *
687            * @param layoutBranchId the primary key of the current layout branch
688            * @param layoutSetBranchId the layout set branch ID
689            * @param plid the plid
690            * @param master the master
691            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
692            * @return the previous, current, and next layout branch
693            * @throws NoSuchLayoutBranchException if a layout branch with the primary key could not be found
694            */
695            public static LayoutBranch[] findByL_P_M_PrevAndNext(long layoutBranchId,
696                    long layoutSetBranchId, long plid, boolean master,
697                    OrderByComparator<LayoutBranch> orderByComparator)
698                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
699                    return getPersistence()
700                                       .findByL_P_M_PrevAndNext(layoutBranchId, layoutSetBranchId,
701                            plid, master, orderByComparator);
702            }
703    
704            /**
705            * Removes all the layout branchs where layoutSetBranchId = &#63; and plid = &#63; and master = &#63; from the database.
706            *
707            * @param layoutSetBranchId the layout set branch ID
708            * @param plid the plid
709            * @param master the master
710            */
711            public static void removeByL_P_M(long layoutSetBranchId, long plid,
712                    boolean master) {
713                    getPersistence().removeByL_P_M(layoutSetBranchId, plid, master);
714            }
715    
716            /**
717            * Returns the number of layout branchs where layoutSetBranchId = &#63; and plid = &#63; and master = &#63;.
718            *
719            * @param layoutSetBranchId the layout set branch ID
720            * @param plid the plid
721            * @param master the master
722            * @return the number of matching layout branchs
723            */
724            public static int countByL_P_M(long layoutSetBranchId, long plid,
725                    boolean master) {
726                    return getPersistence().countByL_P_M(layoutSetBranchId, plid, master);
727            }
728    
729            /**
730            * Caches the layout branch in the entity cache if it is enabled.
731            *
732            * @param layoutBranch the layout branch
733            */
734            public static void cacheResult(LayoutBranch layoutBranch) {
735                    getPersistence().cacheResult(layoutBranch);
736            }
737    
738            /**
739            * Caches the layout branchs in the entity cache if it is enabled.
740            *
741            * @param layoutBranchs the layout branchs
742            */
743            public static void cacheResult(List<LayoutBranch> layoutBranchs) {
744                    getPersistence().cacheResult(layoutBranchs);
745            }
746    
747            /**
748            * Creates a new layout branch with the primary key. Does not add the layout branch to the database.
749            *
750            * @param layoutBranchId the primary key for the new layout branch
751            * @return the new layout branch
752            */
753            public static LayoutBranch create(long layoutBranchId) {
754                    return getPersistence().create(layoutBranchId);
755            }
756    
757            /**
758            * Removes the layout branch with the primary key from the database. Also notifies the appropriate model listeners.
759            *
760            * @param layoutBranchId the primary key of the layout branch
761            * @return the layout branch that was removed
762            * @throws NoSuchLayoutBranchException if a layout branch with the primary key could not be found
763            */
764            public static LayoutBranch remove(long layoutBranchId)
765                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
766                    return getPersistence().remove(layoutBranchId);
767            }
768    
769            public static LayoutBranch updateImpl(LayoutBranch layoutBranch) {
770                    return getPersistence().updateImpl(layoutBranch);
771            }
772    
773            /**
774            * Returns the layout branch with the primary key or throws a {@link NoSuchLayoutBranchException} if it could not be found.
775            *
776            * @param layoutBranchId the primary key of the layout branch
777            * @return the layout branch
778            * @throws NoSuchLayoutBranchException if a layout branch with the primary key could not be found
779            */
780            public static LayoutBranch findByPrimaryKey(long layoutBranchId)
781                    throws com.liferay.portal.exception.NoSuchLayoutBranchException {
782                    return getPersistence().findByPrimaryKey(layoutBranchId);
783            }
784    
785            /**
786            * Returns the layout branch with the primary key or returns <code>null</code> if it could not be found.
787            *
788            * @param layoutBranchId the primary key of the layout branch
789            * @return the layout branch, or <code>null</code> if a layout branch with the primary key could not be found
790            */
791            public static LayoutBranch fetchByPrimaryKey(long layoutBranchId) {
792                    return getPersistence().fetchByPrimaryKey(layoutBranchId);
793            }
794    
795            public static java.util.Map<java.io.Serializable, LayoutBranch> fetchByPrimaryKeys(
796                    java.util.Set<java.io.Serializable> primaryKeys) {
797                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
798            }
799    
800            /**
801            * Returns all the layout branchs.
802            *
803            * @return the layout branchs
804            */
805            public static List<LayoutBranch> findAll() {
806                    return getPersistence().findAll();
807            }
808    
809            /**
810            * Returns a range of all the layout branchs.
811            *
812            * <p>
813            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
814            * </p>
815            *
816            * @param start the lower bound of the range of layout branchs
817            * @param end the upper bound of the range of layout branchs (not inclusive)
818            * @return the range of layout branchs
819            */
820            public static List<LayoutBranch> findAll(int start, int end) {
821                    return getPersistence().findAll(start, end);
822            }
823    
824            /**
825            * Returns an ordered range of all the layout branchs.
826            *
827            * <p>
828            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
829            * </p>
830            *
831            * @param start the lower bound of the range of layout branchs
832            * @param end the upper bound of the range of layout branchs (not inclusive)
833            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
834            * @return the ordered range of layout branchs
835            */
836            public static List<LayoutBranch> findAll(int start, int end,
837                    OrderByComparator<LayoutBranch> orderByComparator) {
838                    return getPersistence().findAll(start, end, orderByComparator);
839            }
840    
841            /**
842            * Returns an ordered range of all the layout branchs.
843            *
844            * <p>
845            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link LayoutBranchModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
846            * </p>
847            *
848            * @param start the lower bound of the range of layout branchs
849            * @param end the upper bound of the range of layout branchs (not inclusive)
850            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
851            * @param retrieveFromCache whether to retrieve from the finder cache
852            * @return the ordered range of layout branchs
853            */
854            public static List<LayoutBranch> findAll(int start, int end,
855                    OrderByComparator<LayoutBranch> orderByComparator,
856                    boolean retrieveFromCache) {
857                    return getPersistence()
858                                       .findAll(start, end, orderByComparator, retrieveFromCache);
859            }
860    
861            /**
862            * Removes all the layout branchs from the database.
863            */
864            public static void removeAll() {
865                    getPersistence().removeAll();
866            }
867    
868            /**
869            * Returns the number of layout branchs.
870            *
871            * @return the number of layout branchs
872            */
873            public static int countAll() {
874                    return getPersistence().countAll();
875            }
876    
877            public static LayoutBranchPersistence getPersistence() {
878                    if (_persistence == null) {
879                            _persistence = (LayoutBranchPersistence)PortalBeanLocatorUtil.locate(LayoutBranchPersistence.class.getName());
880    
881                            ReferenceRegistry.registerReference(LayoutBranchUtil.class,
882                                    "_persistence");
883                    }
884    
885                    return _persistence;
886            }
887    
888            private static LayoutBranchPersistence _persistence;
889    }