001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.LayoutPrototype;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * 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.
028     *
029     * <p>
030     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
031     * </p>
032     *
033     * <p>
034     * Caching information and settings can be found in <code>portal.properties</code>
035     * </p>
036     *
037     * @author Brian Wing Shun Chan
038     * @see LayoutPrototypePersistence
039     * @see LayoutPrototypePersistenceImpl
040     * @generated
041     */
042    public class LayoutPrototypeUtil {
043            /**
044             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
045             */
046            public static void clearCache() {
047                    getPersistence().clearCache();
048            }
049    
050            /**
051             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
052             */
053            public static void clearCache(LayoutPrototype layoutPrototype) {
054                    getPersistence().clearCache(layoutPrototype);
055            }
056    
057            /**
058             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
059             */
060            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
061                    throws SystemException {
062                    return getPersistence().countWithDynamicQuery(dynamicQuery);
063            }
064    
065            /**
066             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
067             */
068            public static List<LayoutPrototype> findWithDynamicQuery(
069                    DynamicQuery dynamicQuery) throws SystemException {
070                    return getPersistence().findWithDynamicQuery(dynamicQuery);
071            }
072    
073            /**
074             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
075             */
076            public static List<LayoutPrototype> findWithDynamicQuery(
077                    DynamicQuery dynamicQuery, int start, int end)
078                    throws SystemException {
079                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
080            }
081    
082            /**
083             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
084             */
085            public static List<LayoutPrototype> findWithDynamicQuery(
086                    DynamicQuery dynamicQuery, int start, int end,
087                    OrderByComparator orderByComparator) throws SystemException {
088                    return getPersistence()
089                                       .findWithDynamicQuery(dynamicQuery, start, end,
090                            orderByComparator);
091            }
092    
093            /**
094             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
095             */
096            public static LayoutPrototype remove(LayoutPrototype layoutPrototype)
097                    throws SystemException {
098                    return getPersistence().remove(layoutPrototype);
099            }
100    
101            /**
102             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
103             */
104            public static LayoutPrototype update(LayoutPrototype layoutPrototype,
105                    boolean merge) throws SystemException {
106                    return getPersistence().update(layoutPrototype, merge);
107            }
108    
109            /**
110             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
111             */
112            public static LayoutPrototype update(LayoutPrototype layoutPrototype,
113                    boolean merge, ServiceContext serviceContext) throws SystemException {
114                    return getPersistence().update(layoutPrototype, merge, serviceContext);
115            }
116    
117            /**
118            * Caches the layout prototype in the entity cache if it is enabled.
119            *
120            * @param layoutPrototype the layout prototype to cache
121            */
122            public static void cacheResult(
123                    com.liferay.portal.model.LayoutPrototype layoutPrototype) {
124                    getPersistence().cacheResult(layoutPrototype);
125            }
126    
127            /**
128            * Caches the layout prototypes in the entity cache if it is enabled.
129            *
130            * @param layoutPrototypes the layout prototypes to cache
131            */
132            public static void cacheResult(
133                    java.util.List<com.liferay.portal.model.LayoutPrototype> layoutPrototypes) {
134                    getPersistence().cacheResult(layoutPrototypes);
135            }
136    
137            /**
138            * Creates a new layout prototype with the primary key. Does not add the layout prototype to the database.
139            *
140            * @param layoutPrototypeId the primary key for the new layout prototype
141            * @return the new layout prototype
142            */
143            public static com.liferay.portal.model.LayoutPrototype create(
144                    long layoutPrototypeId) {
145                    return getPersistence().create(layoutPrototypeId);
146            }
147    
148            /**
149            * Removes the layout prototype with the primary key from the database. Also notifies the appropriate model listeners.
150            *
151            * @param layoutPrototypeId the primary key of the layout prototype to remove
152            * @return the layout prototype that was removed
153            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
154            * @throws SystemException if a system exception occurred
155            */
156            public static com.liferay.portal.model.LayoutPrototype remove(
157                    long layoutPrototypeId)
158                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
159                            com.liferay.portal.kernel.exception.SystemException {
160                    return getPersistence().remove(layoutPrototypeId);
161            }
162    
163            public static com.liferay.portal.model.LayoutPrototype updateImpl(
164                    com.liferay.portal.model.LayoutPrototype layoutPrototype, boolean merge)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence().updateImpl(layoutPrototype, merge);
167            }
168    
169            /**
170            * Finds the layout prototype with the primary key or throws a {@link com.liferay.portal.NoSuchLayoutPrototypeException} if it could not be found.
171            *
172            * @param layoutPrototypeId the primary key of the layout prototype to find
173            * @return the layout prototype
174            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
175            * @throws SystemException if a system exception occurred
176            */
177            public static com.liferay.portal.model.LayoutPrototype findByPrimaryKey(
178                    long layoutPrototypeId)
179                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return getPersistence().findByPrimaryKey(layoutPrototypeId);
182            }
183    
184            /**
185            * Finds the layout prototype with the primary key or returns <code>null</code> if it could not be found.
186            *
187            * @param layoutPrototypeId the primary key of the layout prototype to find
188            * @return the layout prototype, or <code>null</code> if a layout prototype with the primary key could not be found
189            * @throws SystemException if a system exception occurred
190            */
191            public static com.liferay.portal.model.LayoutPrototype fetchByPrimaryKey(
192                    long layoutPrototypeId)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return getPersistence().fetchByPrimaryKey(layoutPrototypeId);
195            }
196    
197            /**
198            * Finds all the layout prototypes where companyId = &#63;.
199            *
200            * @param companyId the company id to search with
201            * @return the matching layout prototypes
202            * @throws SystemException if a system exception occurred
203            */
204            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
205                    long companyId)
206                    throws com.liferay.portal.kernel.exception.SystemException {
207                    return getPersistence().findByCompanyId(companyId);
208            }
209    
210            /**
211            * Finds a range of all the layout prototypes where companyId = &#63;.
212            *
213            * <p>
214            * 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.
215            * </p>
216            *
217            * @param companyId the company id to search with
218            * @param start the lower bound of the range of layout prototypes to return
219            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
220            * @return the range of matching layout prototypes
221            * @throws SystemException if a system exception occurred
222            */
223            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
224                    long companyId, int start, int end)
225                    throws com.liferay.portal.kernel.exception.SystemException {
226                    return getPersistence().findByCompanyId(companyId, start, end);
227            }
228    
229            /**
230            * Finds an ordered range of all the layout prototypes where companyId = &#63;.
231            *
232            * <p>
233            * 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.
234            * </p>
235            *
236            * @param companyId the company id to search with
237            * @param start the lower bound of the range of layout prototypes to return
238            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
239            * @param orderByComparator the comparator to order the results by
240            * @return the ordered range of matching layout prototypes
241            * @throws SystemException if a system exception occurred
242            */
243            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
244                    long companyId, int start, int end,
245                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return getPersistence()
248                                       .findByCompanyId(companyId, start, end, orderByComparator);
249            }
250    
251            /**
252            * Finds the first layout prototype in the ordered set where companyId = &#63;.
253            *
254            * <p>
255            * 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.
256            * </p>
257            *
258            * @param companyId the company id to search with
259            * @param orderByComparator the comparator to order the set by
260            * @return the first matching layout prototype
261            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
262            * @throws SystemException if a system exception occurred
263            */
264            public static com.liferay.portal.model.LayoutPrototype findByCompanyId_First(
265                    long companyId,
266                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    return getPersistence()
270                                       .findByCompanyId_First(companyId, orderByComparator);
271            }
272    
273            /**
274            * Finds the last layout prototype in the ordered set where companyId = &#63;.
275            *
276            * <p>
277            * 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.
278            * </p>
279            *
280            * @param companyId the company id to search with
281            * @param orderByComparator the comparator to order the set by
282            * @return the last matching layout prototype
283            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
284            * @throws SystemException if a system exception occurred
285            */
286            public static com.liferay.portal.model.LayoutPrototype findByCompanyId_Last(
287                    long companyId,
288                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
289                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
290                            com.liferay.portal.kernel.exception.SystemException {
291                    return getPersistence()
292                                       .findByCompanyId_Last(companyId, orderByComparator);
293            }
294    
295            /**
296            * Finds the layout prototypes before and after the current layout prototype in the ordered set where companyId = &#63;.
297            *
298            * <p>
299            * 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.
300            * </p>
301            *
302            * @param layoutPrototypeId the primary key of the current layout prototype
303            * @param companyId the company id to search with
304            * @param orderByComparator the comparator to order the set by
305            * @return the previous, current, and next layout prototype
306            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
307            * @throws SystemException if a system exception occurred
308            */
309            public static com.liferay.portal.model.LayoutPrototype[] findByCompanyId_PrevAndNext(
310                    long layoutPrototypeId, long companyId,
311                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
312                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
313                            com.liferay.portal.kernel.exception.SystemException {
314                    return getPersistence()
315                                       .findByCompanyId_PrevAndNext(layoutPrototypeId, companyId,
316                            orderByComparator);
317            }
318    
319            /**
320            * Filters by the user's permissions and finds all the layout prototypes where companyId = &#63;.
321            *
322            * @param companyId the company id to search with
323            * @return the matching layout prototypes that the user has permission to view
324            * @throws SystemException if a system exception occurred
325            */
326            public static java.util.List<com.liferay.portal.model.LayoutPrototype> filterFindByCompanyId(
327                    long companyId)
328                    throws com.liferay.portal.kernel.exception.SystemException {
329                    return getPersistence().filterFindByCompanyId(companyId);
330            }
331    
332            /**
333            * Filters by the user's permissions and finds a range of all the layout prototypes where companyId = &#63;.
334            *
335            * <p>
336            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
337            * </p>
338            *
339            * @param companyId the company id to search with
340            * @param start the lower bound of the range of layout prototypes to return
341            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
342            * @return the range of matching layout prototypes that the user has permission to view
343            * @throws SystemException if a system exception occurred
344            */
345            public static java.util.List<com.liferay.portal.model.LayoutPrototype> filterFindByCompanyId(
346                    long companyId, int start, int end)
347                    throws com.liferay.portal.kernel.exception.SystemException {
348                    return getPersistence().filterFindByCompanyId(companyId, start, end);
349            }
350    
351            /**
352            * Filters by the user's permissions and finds an ordered range of all the layout prototypes where companyId = &#63;.
353            *
354            * <p>
355            * 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.
356            * </p>
357            *
358            * @param companyId the company id to search with
359            * @param start the lower bound of the range of layout prototypes to return
360            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
361            * @param orderByComparator the comparator to order the results by
362            * @return the ordered range of matching layout prototypes that the user has permission to view
363            * @throws SystemException if a system exception occurred
364            */
365            public static java.util.List<com.liferay.portal.model.LayoutPrototype> filterFindByCompanyId(
366                    long companyId, int start, int end,
367                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
368                    throws com.liferay.portal.kernel.exception.SystemException {
369                    return getPersistence()
370                                       .filterFindByCompanyId(companyId, start, end,
371                            orderByComparator);
372            }
373    
374            /**
375            * Finds all the layout prototypes where companyId = &#63; and active = &#63;.
376            *
377            * @param companyId the company id to search with
378            * @param active the active to search with
379            * @return the matching layout prototypes
380            * @throws SystemException if a system exception occurred
381            */
382            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
383                    long companyId, boolean active)
384                    throws com.liferay.portal.kernel.exception.SystemException {
385                    return getPersistence().findByC_A(companyId, active);
386            }
387    
388            /**
389            * Finds a range of all the layout prototypes where companyId = &#63; and active = &#63;.
390            *
391            * <p>
392            * 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.
393            * </p>
394            *
395            * @param companyId the company id to search with
396            * @param active the active to search with
397            * @param start the lower bound of the range of layout prototypes to return
398            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
399            * @return the range of matching layout prototypes
400            * @throws SystemException if a system exception occurred
401            */
402            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
403                    long companyId, boolean active, int start, int end)
404                    throws com.liferay.portal.kernel.exception.SystemException {
405                    return getPersistence().findByC_A(companyId, active, start, end);
406            }
407    
408            /**
409            * Finds an ordered range of all the layout prototypes where companyId = &#63; and active = &#63;.
410            *
411            * <p>
412            * 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.
413            * </p>
414            *
415            * @param companyId the company id to search with
416            * @param active the active to search with
417            * @param start the lower bound of the range of layout prototypes to return
418            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
419            * @param orderByComparator the comparator to order the results by
420            * @return the ordered range of matching layout prototypes
421            * @throws SystemException if a system exception occurred
422            */
423            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
424                    long companyId, boolean active, int start, int end,
425                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
426                    throws com.liferay.portal.kernel.exception.SystemException {
427                    return getPersistence()
428                                       .findByC_A(companyId, active, start, end, orderByComparator);
429            }
430    
431            /**
432            * Finds the first layout prototype in the ordered set where companyId = &#63; and active = &#63;.
433            *
434            * <p>
435            * 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.
436            * </p>
437            *
438            * @param companyId the company id to search with
439            * @param active the active to search with
440            * @param orderByComparator the comparator to order the set by
441            * @return the first matching layout prototype
442            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
443            * @throws SystemException if a system exception occurred
444            */
445            public static com.liferay.portal.model.LayoutPrototype findByC_A_First(
446                    long companyId, boolean active,
447                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
448                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
449                            com.liferay.portal.kernel.exception.SystemException {
450                    return getPersistence()
451                                       .findByC_A_First(companyId, active, orderByComparator);
452            }
453    
454            /**
455            * Finds the last layout prototype in the ordered set where companyId = &#63; and active = &#63;.
456            *
457            * <p>
458            * 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.
459            * </p>
460            *
461            * @param companyId the company id to search with
462            * @param active the active to search with
463            * @param orderByComparator the comparator to order the set by
464            * @return the last matching layout prototype
465            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
466            * @throws SystemException if a system exception occurred
467            */
468            public static com.liferay.portal.model.LayoutPrototype findByC_A_Last(
469                    long companyId, boolean active,
470                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
471                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
472                            com.liferay.portal.kernel.exception.SystemException {
473                    return getPersistence()
474                                       .findByC_A_Last(companyId, active, orderByComparator);
475            }
476    
477            /**
478            * Finds the layout prototypes before and after the current layout prototype in the ordered set where companyId = &#63; and active = &#63;.
479            *
480            * <p>
481            * 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.
482            * </p>
483            *
484            * @param layoutPrototypeId the primary key of the current layout prototype
485            * @param companyId the company id to search with
486            * @param active the active to search with
487            * @param orderByComparator the comparator to order the set by
488            * @return the previous, current, and next layout prototype
489            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
490            * @throws SystemException if a system exception occurred
491            */
492            public static com.liferay.portal.model.LayoutPrototype[] findByC_A_PrevAndNext(
493                    long layoutPrototypeId, long companyId, boolean active,
494                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
495                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
496                            com.liferay.portal.kernel.exception.SystemException {
497                    return getPersistence()
498                                       .findByC_A_PrevAndNext(layoutPrototypeId, companyId, active,
499                            orderByComparator);
500            }
501    
502            /**
503            * Filters by the user's permissions and finds all the layout prototypes where companyId = &#63; and active = &#63;.
504            *
505            * @param companyId the company id to search with
506            * @param active the active to search with
507            * @return the matching layout prototypes that the user has permission to view
508            * @throws SystemException if a system exception occurred
509            */
510            public static java.util.List<com.liferay.portal.model.LayoutPrototype> filterFindByC_A(
511                    long companyId, boolean active)
512                    throws com.liferay.portal.kernel.exception.SystemException {
513                    return getPersistence().filterFindByC_A(companyId, active);
514            }
515    
516            /**
517            * Filters by the user's permissions and finds a range of all the layout prototypes where companyId = &#63; and active = &#63;.
518            *
519            * <p>
520            * 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.
521            * </p>
522            *
523            * @param companyId the company id to search with
524            * @param active the active to search with
525            * @param start the lower bound of the range of layout prototypes to return
526            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
527            * @return the range of matching layout prototypes that the user has permission to view
528            * @throws SystemException if a system exception occurred
529            */
530            public static java.util.List<com.liferay.portal.model.LayoutPrototype> filterFindByC_A(
531                    long companyId, boolean active, int start, int end)
532                    throws com.liferay.portal.kernel.exception.SystemException {
533                    return getPersistence().filterFindByC_A(companyId, active, start, end);
534            }
535    
536            /**
537            * Filters by the user's permissions and finds an ordered range of all the layout prototypes where companyId = &#63; and active = &#63;.
538            *
539            * <p>
540            * 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.
541            * </p>
542            *
543            * @param companyId the company id to search with
544            * @param active the active to search with
545            * @param start the lower bound of the range of layout prototypes to return
546            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
547            * @param orderByComparator the comparator to order the results by
548            * @return the ordered range of matching layout prototypes that the user has permission to view
549            * @throws SystemException if a system exception occurred
550            */
551            public static java.util.List<com.liferay.portal.model.LayoutPrototype> filterFindByC_A(
552                    long companyId, boolean active, int start, int end,
553                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
554                    throws com.liferay.portal.kernel.exception.SystemException {
555                    return getPersistence()
556                                       .filterFindByC_A(companyId, active, start, end,
557                            orderByComparator);
558            }
559    
560            /**
561            * Finds all the layout prototypes.
562            *
563            * @return the layout prototypes
564            * @throws SystemException if a system exception occurred
565            */
566            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll()
567                    throws com.liferay.portal.kernel.exception.SystemException {
568                    return getPersistence().findAll();
569            }
570    
571            /**
572            * Finds a range of all the layout prototypes.
573            *
574            * <p>
575            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
576            * </p>
577            *
578            * @param start the lower bound of the range of layout prototypes to return
579            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
580            * @return the range of layout prototypes
581            * @throws SystemException if a system exception occurred
582            */
583            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
584                    int start, int end)
585                    throws com.liferay.portal.kernel.exception.SystemException {
586                    return getPersistence().findAll(start, end);
587            }
588    
589            /**
590            * Finds an ordered range of all the layout prototypes.
591            *
592            * <p>
593            * 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.
594            * </p>
595            *
596            * @param start the lower bound of the range of layout prototypes to return
597            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
598            * @param orderByComparator the comparator to order the results by
599            * @return the ordered range of layout prototypes
600            * @throws SystemException if a system exception occurred
601            */
602            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
603                    int start, int end,
604                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
605                    throws com.liferay.portal.kernel.exception.SystemException {
606                    return getPersistence().findAll(start, end, orderByComparator);
607            }
608    
609            /**
610            * Removes all the layout prototypes where companyId = &#63; from the database.
611            *
612            * @param companyId the company id to search with
613            * @throws SystemException if a system exception occurred
614            */
615            public static void removeByCompanyId(long companyId)
616                    throws com.liferay.portal.kernel.exception.SystemException {
617                    getPersistence().removeByCompanyId(companyId);
618            }
619    
620            /**
621            * Removes all the layout prototypes where companyId = &#63; and active = &#63; from the database.
622            *
623            * @param companyId the company id to search with
624            * @param active the active to search with
625            * @throws SystemException if a system exception occurred
626            */
627            public static void removeByC_A(long companyId, boolean active)
628                    throws com.liferay.portal.kernel.exception.SystemException {
629                    getPersistence().removeByC_A(companyId, active);
630            }
631    
632            /**
633            * Removes all the layout prototypes from the database.
634            *
635            * @throws SystemException if a system exception occurred
636            */
637            public static void removeAll()
638                    throws com.liferay.portal.kernel.exception.SystemException {
639                    getPersistence().removeAll();
640            }
641    
642            /**
643            * Counts all the layout prototypes where companyId = &#63;.
644            *
645            * @param companyId the company id to search with
646            * @return the number of matching layout prototypes
647            * @throws SystemException if a system exception occurred
648            */
649            public static int countByCompanyId(long companyId)
650                    throws com.liferay.portal.kernel.exception.SystemException {
651                    return getPersistence().countByCompanyId(companyId);
652            }
653    
654            /**
655            * Filters by the user's permissions and counts all the layout prototypes where companyId = &#63;.
656            *
657            * @param companyId the company id to search with
658            * @return the number of matching layout prototypes that the user has permission to view
659            * @throws SystemException if a system exception occurred
660            */
661            public static int filterCountByCompanyId(long companyId)
662                    throws com.liferay.portal.kernel.exception.SystemException {
663                    return getPersistence().filterCountByCompanyId(companyId);
664            }
665    
666            /**
667            * Counts all the layout prototypes where companyId = &#63; and active = &#63;.
668            *
669            * @param companyId the company id to search with
670            * @param active the active to search with
671            * @return the number of matching layout prototypes
672            * @throws SystemException if a system exception occurred
673            */
674            public static int countByC_A(long companyId, boolean active)
675                    throws com.liferay.portal.kernel.exception.SystemException {
676                    return getPersistence().countByC_A(companyId, active);
677            }
678    
679            /**
680            * Filters by the user's permissions and counts all the layout prototypes where companyId = &#63; and active = &#63;.
681            *
682            * @param companyId the company id to search with
683            * @param active the active to search with
684            * @return the number of matching layout prototypes that the user has permission to view
685            * @throws SystemException if a system exception occurred
686            */
687            public static int filterCountByC_A(long companyId, boolean active)
688                    throws com.liferay.portal.kernel.exception.SystemException {
689                    return getPersistence().filterCountByC_A(companyId, active);
690            }
691    
692            /**
693            * Counts all the layout prototypes.
694            *
695            * @return the number of layout prototypes
696            * @throws SystemException if a system exception occurred
697            */
698            public static int countAll()
699                    throws com.liferay.portal.kernel.exception.SystemException {
700                    return getPersistence().countAll();
701            }
702    
703            public static LayoutPrototypePersistence getPersistence() {
704                    if (_persistence == null) {
705                            _persistence = (LayoutPrototypePersistence)PortalBeanLocatorUtil.locate(LayoutPrototypePersistence.class.getName());
706                    }
707    
708                    return _persistence;
709            }
710    
711            public void setPersistence(LayoutPrototypePersistence persistence) {
712                    _persistence = persistence;
713            }
714    
715            private static LayoutPrototypePersistence _persistence;
716    }