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