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. 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            * Finds all the layout prototypes where companyId = &#63; and active = &#63;.
321            *
322            * @param companyId the company id to search with
323            * @param active the active to search with
324            * @return the matching layout prototypes
325            * @throws SystemException if a system exception occurred
326            */
327            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
328                    long companyId, boolean active)
329                    throws com.liferay.portal.kernel.exception.SystemException {
330                    return getPersistence().findByC_A(companyId, active);
331            }
332    
333            /**
334            * Finds a range of all the layout prototypes where companyId = &#63; and active = &#63;.
335            *
336            * <p>
337            * 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.
338            * </p>
339            *
340            * @param companyId the company id to search with
341            * @param active the active to search with
342            * @param start the lower bound of the range of layout prototypes to return
343            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
344            * @return the range of matching layout prototypes
345            * @throws SystemException if a system exception occurred
346            */
347            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
348                    long companyId, boolean active, int start, int end)
349                    throws com.liferay.portal.kernel.exception.SystemException {
350                    return getPersistence().findByC_A(companyId, active, start, end);
351            }
352    
353            /**
354            * Finds an ordered range of all the layout prototypes where companyId = &#63; and active = &#63;.
355            *
356            * <p>
357            * 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.
358            * </p>
359            *
360            * @param companyId the company id to search with
361            * @param active the active 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
366            * @throws SystemException if a system exception occurred
367            */
368            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
369                    long companyId, boolean active, int start, int end,
370                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
371                    throws com.liferay.portal.kernel.exception.SystemException {
372                    return getPersistence()
373                                       .findByC_A(companyId, active, start, end, orderByComparator);
374            }
375    
376            /**
377            * Finds the first layout prototype in the ordered set where companyId = &#63; and active = &#63;.
378            *
379            * <p>
380            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
381            * </p>
382            *
383            * @param companyId the company id to search with
384            * @param active the active to search with
385            * @param orderByComparator the comparator to order the set by
386            * @return the first matching layout prototype
387            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
388            * @throws SystemException if a system exception occurred
389            */
390            public static com.liferay.portal.model.LayoutPrototype findByC_A_First(
391                    long companyId, boolean active,
392                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
393                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
394                            com.liferay.portal.kernel.exception.SystemException {
395                    return getPersistence()
396                                       .findByC_A_First(companyId, active, orderByComparator);
397            }
398    
399            /**
400            * Finds the last layout prototype in the ordered set where companyId = &#63; and active = &#63;.
401            *
402            * <p>
403            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
404            * </p>
405            *
406            * @param companyId the company id to search with
407            * @param active the active to search with
408            * @param orderByComparator the comparator to order the set by
409            * @return the last matching layout prototype
410            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
411            * @throws SystemException if a system exception occurred
412            */
413            public static com.liferay.portal.model.LayoutPrototype findByC_A_Last(
414                    long companyId, boolean active,
415                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
416                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
417                            com.liferay.portal.kernel.exception.SystemException {
418                    return getPersistence()
419                                       .findByC_A_Last(companyId, active, orderByComparator);
420            }
421    
422            /**
423            * Finds the layout prototypes before and after the current layout prototype in the ordered set where companyId = &#63; and active = &#63;.
424            *
425            * <p>
426            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
427            * </p>
428            *
429            * @param layoutPrototypeId the primary key of the current layout prototype
430            * @param companyId the company id to search with
431            * @param active the active to search with
432            * @param orderByComparator the comparator to order the set by
433            * @return the previous, current, and next layout prototype
434            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
435            * @throws SystemException if a system exception occurred
436            */
437            public static com.liferay.portal.model.LayoutPrototype[] findByC_A_PrevAndNext(
438                    long layoutPrototypeId, long companyId, boolean active,
439                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
440                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
441                            com.liferay.portal.kernel.exception.SystemException {
442                    return getPersistence()
443                                       .findByC_A_PrevAndNext(layoutPrototypeId, companyId, active,
444                            orderByComparator);
445            }
446    
447            /**
448            * Finds all the layout prototypes.
449            *
450            * @return the layout prototypes
451            * @throws SystemException if a system exception occurred
452            */
453            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll()
454                    throws com.liferay.portal.kernel.exception.SystemException {
455                    return getPersistence().findAll();
456            }
457    
458            /**
459            * Finds a range of all the layout prototypes.
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 start the lower bound of the range of layout prototypes to return
466            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
467            * @return the range of layout prototypes
468            * @throws SystemException if a system exception occurred
469            */
470            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
471                    int start, int end)
472                    throws com.liferay.portal.kernel.exception.SystemException {
473                    return getPersistence().findAll(start, end);
474            }
475    
476            /**
477            * Finds an ordered range of all the layout prototypes.
478            *
479            * <p>
480            * 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.
481            * </p>
482            *
483            * @param start the lower bound of the range of layout prototypes to return
484            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
485            * @param orderByComparator the comparator to order the results by
486            * @return the ordered range of layout prototypes
487            * @throws SystemException if a system exception occurred
488            */
489            public static java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
490                    int start, int end,
491                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
492                    throws com.liferay.portal.kernel.exception.SystemException {
493                    return getPersistence().findAll(start, end, orderByComparator);
494            }
495    
496            /**
497            * Removes all the layout prototypes where companyId = &#63; from the database.
498            *
499            * @param companyId the company id to search with
500            * @throws SystemException if a system exception occurred
501            */
502            public static void removeByCompanyId(long companyId)
503                    throws com.liferay.portal.kernel.exception.SystemException {
504                    getPersistence().removeByCompanyId(companyId);
505            }
506    
507            /**
508            * Removes all the layout prototypes where companyId = &#63; and active = &#63; from the database.
509            *
510            * @param companyId the company id to search with
511            * @param active the active to search with
512            * @throws SystemException if a system exception occurred
513            */
514            public static void removeByC_A(long companyId, boolean active)
515                    throws com.liferay.portal.kernel.exception.SystemException {
516                    getPersistence().removeByC_A(companyId, active);
517            }
518    
519            /**
520            * Removes all the layout prototypes from the database.
521            *
522            * @throws SystemException if a system exception occurred
523            */
524            public static void removeAll()
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    getPersistence().removeAll();
527            }
528    
529            /**
530            * Counts all the layout prototypes where companyId = &#63;.
531            *
532            * @param companyId the company id to search with
533            * @return the number of matching layout prototypes
534            * @throws SystemException if a system exception occurred
535            */
536            public static int countByCompanyId(long companyId)
537                    throws com.liferay.portal.kernel.exception.SystemException {
538                    return getPersistence().countByCompanyId(companyId);
539            }
540    
541            /**
542            * Counts all the layout prototypes where companyId = &#63; and active = &#63;.
543            *
544            * @param companyId the company id to search with
545            * @param active the active to search with
546            * @return the number of matching layout prototypes
547            * @throws SystemException if a system exception occurred
548            */
549            public static int countByC_A(long companyId, boolean active)
550                    throws com.liferay.portal.kernel.exception.SystemException {
551                    return getPersistence().countByC_A(companyId, active);
552            }
553    
554            /**
555            * Counts all the layout prototypes.
556            *
557            * @return the number of layout prototypes
558            * @throws SystemException if a system exception occurred
559            */
560            public static int countAll()
561                    throws com.liferay.portal.kernel.exception.SystemException {
562                    return getPersistence().countAll();
563            }
564    
565            public static LayoutPrototypePersistence getPersistence() {
566                    if (_persistence == null) {
567                            _persistence = (LayoutPrototypePersistence)PortalBeanLocatorUtil.locate(LayoutPrototypePersistence.class.getName());
568                    }
569    
570                    return _persistence;
571            }
572    
573            public void setPersistence(LayoutPrototypePersistence persistence) {
574                    _persistence = persistence;
575            }
576    
577            private static LayoutPrototypePersistence _persistence;
578    }