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