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.model.LayoutPrototype;
018    
019    /**
020     * The persistence interface for the layout prototype service.
021     *
022     * <p>
023     * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface.
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see LayoutPrototypePersistenceImpl
028     * @see LayoutPrototypeUtil
029     * @generated
030     */
031    public interface LayoutPrototypePersistence extends BasePersistence<LayoutPrototype> {
032            /**
033            * Caches the layout prototype in the entity cache if it is enabled.
034            *
035            * @param layoutPrototype the layout prototype to cache
036            */
037            public void cacheResult(
038                    com.liferay.portal.model.LayoutPrototype layoutPrototype);
039    
040            /**
041            * Caches the layout prototypes in the entity cache if it is enabled.
042            *
043            * @param layoutPrototypes the layout prototypes to cache
044            */
045            public void cacheResult(
046                    java.util.List<com.liferay.portal.model.LayoutPrototype> layoutPrototypes);
047    
048            /**
049            * Creates a new layout prototype with the primary key.
050            *
051            * @param layoutPrototypeId the primary key for the new layout prototype
052            * @return the new layout prototype
053            */
054            public com.liferay.portal.model.LayoutPrototype create(
055                    long layoutPrototypeId);
056    
057            /**
058            * Removes the layout prototype with the primary key from the database. Also notifies the appropriate model listeners.
059            *
060            * @param layoutPrototypeId the primary key of the layout prototype to remove
061            * @return the layout prototype that was removed
062            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
063            * @throws SystemException if a system exception occurred
064            */
065            public com.liferay.portal.model.LayoutPrototype remove(
066                    long layoutPrototypeId)
067                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
068                            com.liferay.portal.kernel.exception.SystemException;
069    
070            public com.liferay.portal.model.LayoutPrototype updateImpl(
071                    com.liferay.portal.model.LayoutPrototype layoutPrototype, boolean merge)
072                    throws com.liferay.portal.kernel.exception.SystemException;
073    
074            /**
075            * Finds the layout prototype with the primary key or throws a {@link com.liferay.portal.NoSuchLayoutPrototypeException} if it could not be found.
076            *
077            * @param layoutPrototypeId the primary key of the layout prototype to find
078            * @return the layout prototype
079            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
080            * @throws SystemException if a system exception occurred
081            */
082            public com.liferay.portal.model.LayoutPrototype findByPrimaryKey(
083                    long layoutPrototypeId)
084                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
085                            com.liferay.portal.kernel.exception.SystemException;
086    
087            /**
088            * Finds the layout prototype with the primary key or returns <code>null</code> if it could not be found.
089            *
090            * @param layoutPrototypeId the primary key of the layout prototype to find
091            * @return the layout prototype, or <code>null</code> if a layout prototype with the primary key could not be found
092            * @throws SystemException if a system exception occurred
093            */
094            public com.liferay.portal.model.LayoutPrototype fetchByPrimaryKey(
095                    long layoutPrototypeId)
096                    throws com.liferay.portal.kernel.exception.SystemException;
097    
098            /**
099            * Finds all the layout prototypes where companyId = &#63;.
100            *
101            * @param companyId the company id to search with
102            * @return the matching layout prototypes
103            * @throws SystemException if a system exception occurred
104            */
105            public java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
106                    long companyId)
107                    throws com.liferay.portal.kernel.exception.SystemException;
108    
109            /**
110            * Finds a range of all the layout prototypes where companyId = &#63;.
111            *
112            * <p>
113            * 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.
114            * </p>
115            *
116            * @param companyId the company id to search with
117            * @param start the lower bound of the range of layout prototypes to return
118            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
119            * @return the range of matching layout prototypes
120            * @throws SystemException if a system exception occurred
121            */
122            public java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
123                    long companyId, int start, int end)
124                    throws com.liferay.portal.kernel.exception.SystemException;
125    
126            /**
127            * Finds an ordered range of all the layout prototypes where companyId = &#63;.
128            *
129            * <p>
130            * 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.
131            * </p>
132            *
133            * @param companyId the company id to search with
134            * @param start the lower bound of the range of layout prototypes to return
135            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
136            * @param orderByComparator the comparator to order the results by
137            * @return the ordered range of matching layout prototypes
138            * @throws SystemException if a system exception occurred
139            */
140            public java.util.List<com.liferay.portal.model.LayoutPrototype> findByCompanyId(
141                    long companyId, int start, int end,
142                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143                    throws com.liferay.portal.kernel.exception.SystemException;
144    
145            /**
146            * Finds the first layout prototype in the ordered set where companyId = &#63;.
147            *
148            * <p>
149            * 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.
150            * </p>
151            *
152            * @param companyId the company id to search with
153            * @param orderByComparator the comparator to order the set by
154            * @return the first matching layout prototype
155            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
156            * @throws SystemException if a system exception occurred
157            */
158            public com.liferay.portal.model.LayoutPrototype findByCompanyId_First(
159                    long companyId,
160                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
162                            com.liferay.portal.kernel.exception.SystemException;
163    
164            /**
165            * Finds the last layout prototype in the ordered set where companyId = &#63;.
166            *
167            * <p>
168            * 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.
169            * </p>
170            *
171            * @param companyId the company id to search with
172            * @param orderByComparator the comparator to order the set by
173            * @return the last matching layout prototype
174            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
175            * @throws SystemException if a system exception occurred
176            */
177            public com.liferay.portal.model.LayoutPrototype findByCompanyId_Last(
178                    long companyId,
179                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
181                            com.liferay.portal.kernel.exception.SystemException;
182    
183            /**
184            * Finds the layout prototypes before and after the current layout prototype in the ordered set where companyId = &#63;.
185            *
186            * <p>
187            * 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.
188            * </p>
189            *
190            * @param layoutPrototypeId the primary key of the current layout prototype
191            * @param companyId the company id to search with
192            * @param orderByComparator the comparator to order the set by
193            * @return the previous, current, and next layout prototype
194            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
195            * @throws SystemException if a system exception occurred
196            */
197            public com.liferay.portal.model.LayoutPrototype[] findByCompanyId_PrevAndNext(
198                    long layoutPrototypeId, long companyId,
199                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
200                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
201                            com.liferay.portal.kernel.exception.SystemException;
202    
203            /**
204            * Finds all the layout prototypes where companyId = &#63; and active = &#63;.
205            *
206            * @param companyId the company id to search with
207            * @param active the active to search with
208            * @return the matching layout prototypes
209            * @throws SystemException if a system exception occurred
210            */
211            public java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
212                    long companyId, boolean active)
213                    throws com.liferay.portal.kernel.exception.SystemException;
214    
215            /**
216            * Finds a range of all the layout prototypes where companyId = &#63; and active = &#63;.
217            *
218            * <p>
219            * 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.
220            * </p>
221            *
222            * @param companyId the company id to search with
223            * @param active the active to search with
224            * @param start the lower bound of the range of layout prototypes to return
225            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
226            * @return the range of matching layout prototypes
227            * @throws SystemException if a system exception occurred
228            */
229            public java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
230                    long companyId, boolean active, int start, int end)
231                    throws com.liferay.portal.kernel.exception.SystemException;
232    
233            /**
234            * Finds an ordered range of all the layout prototypes where companyId = &#63; and active = &#63;.
235            *
236            * <p>
237            * 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.
238            * </p>
239            *
240            * @param companyId the company id to search with
241            * @param active the active to search with
242            * @param start the lower bound of the range of layout prototypes to return
243            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
244            * @param orderByComparator the comparator to order the results by
245            * @return the ordered range of matching layout prototypes
246            * @throws SystemException if a system exception occurred
247            */
248            public java.util.List<com.liferay.portal.model.LayoutPrototype> findByC_A(
249                    long companyId, boolean active, int start, int end,
250                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251                    throws com.liferay.portal.kernel.exception.SystemException;
252    
253            /**
254            * Finds the first layout prototype in the ordered set where companyId = &#63; and active = &#63;.
255            *
256            * <p>
257            * 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.
258            * </p>
259            *
260            * @param companyId the company id to search with
261            * @param active the active to search with
262            * @param orderByComparator the comparator to order the set by
263            * @return the first matching layout prototype
264            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
265            * @throws SystemException if a system exception occurred
266            */
267            public com.liferay.portal.model.LayoutPrototype findByC_A_First(
268                    long companyId, boolean active,
269                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
270                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
271                            com.liferay.portal.kernel.exception.SystemException;
272    
273            /**
274            * Finds the last layout prototype in the ordered set where companyId = &#63; and active = &#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 active the active to search with
282            * @param orderByComparator the comparator to order the set by
283            * @return the last matching layout prototype
284            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a matching layout prototype could not be found
285            * @throws SystemException if a system exception occurred
286            */
287            public com.liferay.portal.model.LayoutPrototype findByC_A_Last(
288                    long companyId, boolean active,
289                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
290                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
291                            com.liferay.portal.kernel.exception.SystemException;
292    
293            /**
294            * Finds the layout prototypes before and after the current layout prototype in the ordered set where companyId = &#63; and active = &#63;.
295            *
296            * <p>
297            * 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.
298            * </p>
299            *
300            * @param layoutPrototypeId the primary key of the current layout prototype
301            * @param companyId the company id to search with
302            * @param active the active to search with
303            * @param orderByComparator the comparator to order the set by
304            * @return the previous, current, and next layout prototype
305            * @throws com.liferay.portal.NoSuchLayoutPrototypeException if a layout prototype with the primary key could not be found
306            * @throws SystemException if a system exception occurred
307            */
308            public com.liferay.portal.model.LayoutPrototype[] findByC_A_PrevAndNext(
309                    long layoutPrototypeId, long companyId, boolean active,
310                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
311                    throws com.liferay.portal.NoSuchLayoutPrototypeException,
312                            com.liferay.portal.kernel.exception.SystemException;
313    
314            /**
315            * Finds all the layout prototypes.
316            *
317            * @return the layout prototypes
318            * @throws SystemException if a system exception occurred
319            */
320            public java.util.List<com.liferay.portal.model.LayoutPrototype> findAll()
321                    throws com.liferay.portal.kernel.exception.SystemException;
322    
323            /**
324            * Finds a range of all the layout prototypes.
325            *
326            * <p>
327            * 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.
328            * </p>
329            *
330            * @param start the lower bound of the range of layout prototypes to return
331            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
332            * @return the range of layout prototypes
333            * @throws SystemException if a system exception occurred
334            */
335            public java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
336                    int start, int end)
337                    throws com.liferay.portal.kernel.exception.SystemException;
338    
339            /**
340            * Finds an ordered range of all the layout prototypes.
341            *
342            * <p>
343            * 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.
344            * </p>
345            *
346            * @param start the lower bound of the range of layout prototypes to return
347            * @param end the upper bound of the range of layout prototypes to return (not inclusive)
348            * @param orderByComparator the comparator to order the results by
349            * @return the ordered range of layout prototypes
350            * @throws SystemException if a system exception occurred
351            */
352            public java.util.List<com.liferay.portal.model.LayoutPrototype> findAll(
353                    int start, int end,
354                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
355                    throws com.liferay.portal.kernel.exception.SystemException;
356    
357            /**
358            * Removes all the layout prototypes where companyId = &#63; from the database.
359            *
360            * @param companyId the company id to search with
361            * @throws SystemException if a system exception occurred
362            */
363            public void removeByCompanyId(long companyId)
364                    throws com.liferay.portal.kernel.exception.SystemException;
365    
366            /**
367            * Removes all the layout prototypes where companyId = &#63; and active = &#63; from the database.
368            *
369            * @param companyId the company id to search with
370            * @param active the active to search with
371            * @throws SystemException if a system exception occurred
372            */
373            public void removeByC_A(long companyId, boolean active)
374                    throws com.liferay.portal.kernel.exception.SystemException;
375    
376            /**
377            * Removes all the layout prototypes from the database.
378            *
379            * @throws SystemException if a system exception occurred
380            */
381            public void removeAll()
382                    throws com.liferay.portal.kernel.exception.SystemException;
383    
384            /**
385            * Counts all the layout prototypes where companyId = &#63;.
386            *
387            * @param companyId the company id to search with
388            * @return the number of matching layout prototypes
389            * @throws SystemException if a system exception occurred
390            */
391            public int countByCompanyId(long companyId)
392                    throws com.liferay.portal.kernel.exception.SystemException;
393    
394            /**
395            * Counts all the layout prototypes where companyId = &#63; and active = &#63;.
396            *
397            * @param companyId the company id to search with
398            * @param active the active to search with
399            * @return the number of matching layout prototypes
400            * @throws SystemException if a system exception occurred
401            */
402            public int countByC_A(long companyId, boolean active)
403                    throws com.liferay.portal.kernel.exception.SystemException;
404    
405            /**
406            * Counts all the layout prototypes.
407            *
408            * @return the number of layout prototypes
409            * @throws SystemException if a system exception occurred
410            */
411            public int countAll()
412                    throws com.liferay.portal.kernel.exception.SystemException;
413    }