001    /**
002     * Copyright (c) 2000-2010 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.
028     *
029     * <p>
030     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class.
031     * </p>
032     *
033     * @author Brian Wing Shun Chan
034     * @see LayoutPrototypePersistence
035     * @see LayoutPrototypePersistenceImpl
036     * @generated
037     */
038    public class LayoutPrototypeUtil {
039            /**
040             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
041             */
042            public static void clearCache() {
043                    getPersistence().clearCache();
044            }
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
048             */
049            public static void clearCache(LayoutPrototype layoutPrototype) {
050                    getPersistence().clearCache(layoutPrototype);
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
055             */
056            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
057                    throws SystemException {
058                    return getPersistence().countWithDynamicQuery(dynamicQuery);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
063             */
064            public static List<LayoutPrototype> findWithDynamicQuery(
065                    DynamicQuery dynamicQuery) throws SystemException {
066                    return getPersistence().findWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
071             */
072            public static List<LayoutPrototype> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery, int start, int end)
074                    throws SystemException {
075                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
076            }
077    
078            /**
079             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
080             */
081            public static List<LayoutPrototype> findWithDynamicQuery(
082                    DynamicQuery dynamicQuery, int start, int end,
083                    OrderByComparator orderByComparator) throws SystemException {
084                    return getPersistence()
085                                       .findWithDynamicQuery(dynamicQuery, start, end,
086                            orderByComparator);
087            }
088    
089            /**
090             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
091             */
092            public static LayoutPrototype remove(LayoutPrototype layoutPrototype)
093                    throws SystemException {
094                    return getPersistence().remove(layoutPrototype);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
099             */
100            public static LayoutPrototype update(LayoutPrototype layoutPrototype,
101                    boolean merge) throws SystemException {
102                    return getPersistence().update(layoutPrototype, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static LayoutPrototype update(LayoutPrototype layoutPrototype,
109                    boolean merge, ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(layoutPrototype, merge, serviceContext);
111            }
112    
113            /**
114            * Caches the layout prototype in the entity cache if it is enabled.
115            *
116            * @param layoutPrototype the layout prototype to cache
117            */
118            public static void cacheResult(
119                    com.liferay.portal.model.LayoutPrototype layoutPrototype) {
120                    getPersistence().cacheResult(layoutPrototype);
121            }
122    
123            /**
124            * Caches the layout prototypes in the entity cache if it is enabled.
125            *
126            * @param layoutPrototypes the layout prototypes to cache
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portal.model.LayoutPrototype> layoutPrototypes) {
130                    getPersistence().cacheResult(layoutPrototypes);
131            }
132    
133            /**
134            * Creates a new layout prototype with the primary key.
135            *
136            * @param layoutPrototypeId the primary key for the new layout prototype
137            * @return the new layout prototype
138            */
139            public static com.liferay.portal.model.LayoutPrototype create(
140                    long layoutPrototypeId) {
141                    return getPersistence().create(layoutPrototypeId);
142            }
143    
144            /**
145            * Removes the layout prototype with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param layoutPrototypeId the primary key of the layout prototype to remove
148            * @return the layout prototype that was removed
149            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portal.model.LayoutPrototype remove(
153                    long layoutPrototypeId)
154                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
155                            com.liferay.portal.kernel.exception.SystemException {
156                    return getPersistence().remove(layoutPrototypeId);
157            }
158    
159            public static com.liferay.portal.model.LayoutPrototype updateImpl(
160                    com.liferay.portal.model.LayoutPrototype layoutPrototype, boolean merge)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence().updateImpl(layoutPrototype, merge);
163            }
164    
165            /**
166            * Finds the layout prototype with the primary key or throws a {@link com.liferay.portal.NoSuchLayoutPrototypeException} if it could not be found.
167            *
168            * @param layoutPrototypeId the primary key of the layout prototype to find
169            * @return the layout prototype
170            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public static com.liferay.portal.model.LayoutPrototype findByPrimaryKey(
174                    long layoutPrototypeId)
175                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
176                            com.liferay.portal.kernel.exception.SystemException {
177                    return getPersistence().findByPrimaryKey(layoutPrototypeId);
178            }
179    
180            /**
181            * Finds the layout prototype with the primary key or returns <code>null</code> if it could not be found.
182            *
183            * @param layoutPrototypeId the primary key of the layout prototype to find
184            * @return the layout prototype, or <code>null</code> if a layout prototype with the primary key could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public static com.liferay.portal.model.LayoutPrototype fetchByPrimaryKey(
188                    long layoutPrototypeId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().fetchByPrimaryKey(layoutPrototypeId);
191            }
192    
193            /**
194            * Finds all the layout prototypes where companyId = &#63;.
195            *
196            * @param companyId the company id to search with
197            * @return the matching layout prototypes
198            * @throws SystemException if a system exception occurred
199            */
200            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
201                    long companyId)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().findByCompanyId(companyId);
204            }
205    
206            /**
207            * Finds a range of all the layout prototypes where companyId = &#63;.
208            *
209            * <p>
210            * 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.
211            * </p>
212            *
213            * @param companyId the company id to search with
214            * @param start the lower bound of the range of layout prototypes to return
215            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
216            * @return the range of matching layout prototypes
217            * @throws SystemException if a system exception occurred
218            */
219            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
220                    long companyId, int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getPersistence().findByCompanyId(companyId, start, end);
223            }
224    
225            /**
226            * Finds an ordered range of all the layout prototypes where companyId = &#63;.
227            *
228            * <p>
229            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
230            * </p>
231            *
232            * @param companyId the company id to search with
233            * @param start the lower bound of the range of layout prototypes to return
234            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
235            * @param orderByComparator the comparator to order the results by
236            * @return the ordered range of matching layout prototypes
237            * @throws SystemException if a system exception occurred
238            */
239            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
240                    long companyId, int start, int end,
241                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return getPersistence()
244                                       .findByCompanyId(companyId, start, end, orderByComparator);
245            }
246    
247            /**
248            * Finds the first layout prototype in the ordered set where companyId = &#63;.
249            *
250            * <p>
251            * 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.
252            * </p>
253            *
254            * @param companyId the company id to search with
255            * @param orderByComparator the comparator to order the set by
256            * @return the first matching layout prototype
257            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
258            * @throws SystemException if a system exception occurred
259            */
260            public static com.liferay.portal.model.LayoutPrototype findByCompanyId_First(
261                    long companyId,
262                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
263                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
264                            com.liferay.portal.kernel.exception.SystemException {
265                    return getPersistence()
266                                       .findByCompanyId_First(companyId, orderByComparator);
267            }
268    
269            /**
270            * Finds the last layout prototype in the ordered set where companyId = &#63;.
271            *
272            * <p>
273            * 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.
274            * </p>
275            *
276            * @param companyId the company id to search with
277            * @param orderByComparator the comparator to order the set by
278            * @return the last matching layout prototype
279            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
280            * @throws SystemException if a system exception occurred
281            */
282            public static com.liferay.portal.model.LayoutPrototype findByCompanyId_Last(
283                    long companyId,
284                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
286                            com.liferay.portal.kernel.exception.SystemException {
287                    return getPersistence()
288                                       .findByCompanyId_Last(companyId, orderByComparator);
289            }
290    
291            /**
292            * Finds the layout prototypes before and after the current layout prototype in the ordered set where companyId = &#63;.
293            *
294            * <p>
295            * 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.
296            * </p>
297            *
298            * @param layoutPrototypeId the primary key of the current layout prototype
299            * @param companyId the company id to search with
300            * @param orderByComparator the comparator to order the set by
301            * @return the previous, current, and next layout prototype
302            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
303            * @throws SystemException if a system exception occurred
304            */
305            public static com.liferay.portal.model.LayoutPrototype[] findByCompanyId_PrevAndNext(
306                    long layoutPrototypeId, long companyId,
307                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
308                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
309                            com.liferay.portal.kernel.exception.SystemException {
310                    return getPersistence()
311                                       .findByCompanyId_PrevAndNext(layoutPrototypeId, companyId,
312                            orderByComparator);
313            }
314    
315            /**
316            * Finds all the layout prototypes where companyId = &#63; and active = &#63;.
317            *
318            * @param companyId the company id to search with
319            * @param active the active to search with
320            * @return the matching layout prototypes
321            * @throws SystemException if a system exception occurred
322            */
323            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
324                    long companyId, boolean active)
325                    throws com.liferay.portal.kernel.exception.SystemException {
326                    return getPersistence().findByC_A(companyId, active);
327            }
328    
329            /**
330            * Finds a range of all the layout prototypes where companyId = &#63; and active = &#63;.
331            *
332            * <p>
333            * 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.
334            * </p>
335            *
336            * @param companyId the company id to search with
337            * @param active the active to search with
338            * @param start the lower bound of the range of layout prototypes to return
339            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
340            * @return the range of matching layout prototypes
341            * @throws SystemException if a system exception occurred
342            */
343            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
344                    long companyId, boolean active, int start, int end)
345                    throws com.liferay.portal.kernel.exception.SystemException {
346                    return getPersistence().findByC_A(companyId, active, start, end);
347            }
348    
349            /**
350            * Finds an ordered range of all the layout prototypes where companyId = &#63; and active = &#63;.
351            *
352            * <p>
353            * 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.
354            * </p>
355            *
356            * @param companyId the company id to search with
357            * @param active the active to search with
358            * @param start the lower bound of the range of layout prototypes to return
359            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
360            * @param orderByComparator the comparator to order the results by
361            * @return the ordered range of matching layout prototypes
362            * @throws SystemException if a system exception occurred
363            */
364            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
365                    long companyId, boolean active, int start, int end,
366                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
367                    throws com.liferay.portal.kernel.exception.SystemException {
368                    return getPersistence()
369                                       .findByC_A(companyId, active, start, end, orderByComparator);
370            }
371    
372            /**
373            * Finds the first layout prototype in the ordered set where companyId = &#63; and active = &#63;.
374            *
375            * <p>
376            * 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.
377            * </p>
378            *
379            * @param companyId the company id to search with
380            * @param active the active to search with
381            * @param orderByComparator the comparator to order the set by
382            * @return the first matching layout prototype
383            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
384            * @throws SystemException if a system exception occurred
385            */
386            public static com.liferay.portal.model.LayoutPrototype findByC_A_First(
387                    long companyId, boolean active,
388                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
389                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
390                            com.liferay.portal.kernel.exception.SystemException {
391                    return getPersistence()
392                                       .findByC_A_First(companyId, active, orderByComparator);
393            }
394    
395            /**
396            * Finds the last layout prototype in the ordered set where companyId = &#63; and active = &#63;.
397            *
398            * <p>
399            * 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.
400            * </p>
401            *
402            * @param companyId the company id to search with
403            * @param active the active to search with
404            * @param orderByComparator the comparator to order the set by
405            * @return the last matching layout prototype
406            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
407            * @throws SystemException if a system exception occurred
408            */
409            public static com.liferay.portal.model.LayoutPrototype findByC_A_Last(
410                    long companyId, boolean active,
411                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
412                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
413                            com.liferay.portal.kernel.exception.SystemException {
414                    return getPersistence()
415                                       .findByC_A_Last(companyId, active, orderByComparator);
416            }
417    
418            /**
419            * Finds the layout prototypes before and after the current layout prototype in the ordered set where companyId = &#63; and active = &#63;.
420            *
421            * <p>
422            * 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.
423            * </p>
424            *
425            * @param layoutPrototypeId the primary key of the current layout prototype
426            * @param companyId the company id to search with
427            * @param active the active to search with
428            * @param orderByComparator the comparator to order the set by
429            * @return the previous, current, and next layout prototype
430            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
431            * @throws SystemException if a system exception occurred
432            */
433            public static com.liferay.portal.model.LayoutPrototype[] findByC_A_PrevAndNext(
434                    long layoutPrototypeId, long companyId, boolean active,
435                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
436                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
437                            com.liferay.portal.kernel.exception.SystemException {
438                    return getPersistence()
439                                       .findByC_A_PrevAndNext(layoutPrototypeId, companyId, active,
440                            orderByComparator);
441            }
442    
443            /**
444            * Finds all the layout prototypes.
445            *
446            * @return the layout prototypes
447            * @throws SystemException if a system exception occurred
448            */
449            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll()
450                    throws com.liferay.portal.kernel.exception.SystemException {
451                    return getPersistence().findAll();
452            }
453    
454            /**
455            * Finds a range of all the layout prototypes.
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 start the lower bound of the range of layout prototypes to return
462            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
463            * @return the range of layout prototypes
464            * @throws SystemException if a system exception occurred
465            */
466            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
467                    int start, int end)
468                    throws com.liferay.portal.kernel.exception.SystemException {
469                    return getPersistence().findAll(start, end);
470            }
471    
472            /**
473            * Finds an ordered range of all the layout prototypes.
474            *
475            * <p>
476            * 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.
477            * </p>
478            *
479            * @param start the lower bound of the range of layout prototypes to return
480            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
481            * @param orderByComparator the comparator to order the results by
482            * @return the ordered range of layout prototypes
483            * @throws SystemException if a system exception occurred
484            */
485            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
486                    int start, int end,
487                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
488                    throws com.liferay.portal.kernel.exception.SystemException {
489                    return getPersistence().findAll(start, end, orderByComparator);
490            }
491    
492            /**
493            * Removes all the layout prototypes where companyId = &#63; from the database.
494            *
495            * @param companyId the company id to search with
496            * @throws SystemException if a system exception occurred
497            */
498            public static void removeByCompanyId(long companyId)
499                    throws com.liferay.portal.kernel.exception.SystemException {
500                    getPersistence().removeByCompanyId(companyId);
501            }
502    
503            /**
504            * Removes all the layout prototypes where companyId = &#63; and active = &#63; from the database.
505            *
506            * @param companyId the company id to search with
507            * @param active the active to search with
508            * @throws SystemException if a system exception occurred
509            */
510            public static void removeByC_A(long companyId, boolean active)
511                    throws com.liferay.portal.kernel.exception.SystemException {
512                    getPersistence().removeByC_A(companyId, active);
513            }
514    
515            /**
516            * Removes all the layout prototypes from the database.
517            *
518            * @throws SystemException if a system exception occurred
519            */
520            public static void removeAll()
521                    throws com.liferay.portal.kernel.exception.SystemException {
522                    getPersistence().removeAll();
523            }
524    
525            /**
526            * Counts all the layout prototypes where companyId = &#63;.
527            *
528            * @param companyId the company id to search with
529            * @return the number of matching layout prototypes
530            * @throws SystemException if a system exception occurred
531            */
532            public static int countByCompanyId(long companyId)
533                    throws com.liferay.portal.kernel.exception.SystemException {
534                    return getPersistence().countByCompanyId(companyId);
535            }
536    
537            /**
538            * Counts all the layout prototypes where companyId = &#63; and active = &#63;.
539            *
540            * @param companyId the company id to search with
541            * @param active the active to search with
542            * @return the number of matching layout prototypes
543            * @throws SystemException if a system exception occurred
544            */
545            public static int countByC_A(long companyId, boolean active)
546                    throws com.liferay.portal.kernel.exception.SystemException {
547                    return getPersistence().countByC_A(companyId, active);
548            }
549    
550            /**
551            * Counts all the layout prototypes.
552            *
553            * @return the number of layout prototypes
554            * @throws SystemException if a system exception occurred
555            */
556            public static int countAll()
557                    throws com.liferay.portal.kernel.exception.SystemException {
558                    return getPersistence().countAll();
559            }
560    
561            public static LayoutPrototypePersistence getPersistence() {
562                    if (_persistence == null) {
563                            _persistence = (LayoutPrototypePersistence)PortalBeanLocatorUtil.locate(LayoutPrototypePersistence.class.getName());
564                    }
565    
566                    return _persistence;
567            }
568    
569            public void setPersistence(LayoutPrototypePersistence persistence) {
570                    _persistence = persistence;
571            }
572    
573            private static LayoutPrototypePersistence _persistence;
574    }