001    /**
002     * Copyright (c) 2000-2012 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.LayoutSet;
018    
019    /**
020     * The persistence interface for the layout set service.
021     *
022     * <p>
023     * Caching information and settings can be found in <code>portal.properties</code>
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see LayoutSetPersistenceImpl
028     * @see LayoutSetUtil
029     * @generated
030     */
031    public interface LayoutSetPersistence extends BasePersistence<LayoutSet> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * Never modify or reference this interface directly. Always use {@link LayoutSetUtil} to access the layout set persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
036             */
037    
038            /**
039            * Caches the layout set in the entity cache if it is enabled.
040            *
041            * @param layoutSet the layout set
042            */
043            public void cacheResult(com.liferay.portal.model.LayoutSet layoutSet);
044    
045            /**
046            * Caches the layout sets in the entity cache if it is enabled.
047            *
048            * @param layoutSets the layout sets
049            */
050            public void cacheResult(
051                    java.util.List<com.liferay.portal.model.LayoutSet> layoutSets);
052    
053            /**
054            * Creates a new layout set with the primary key. Does not add the layout set to the database.
055            *
056            * @param layoutSetId the primary key for the new layout set
057            * @return the new layout set
058            */
059            public com.liferay.portal.model.LayoutSet create(long layoutSetId);
060    
061            /**
062            * Removes the layout set with the primary key from the database. Also notifies the appropriate model listeners.
063            *
064            * @param layoutSetId the primary key of the layout set
065            * @return the layout set that was removed
066            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
067            * @throws SystemException if a system exception occurred
068            */
069            public com.liferay.portal.model.LayoutSet remove(long layoutSetId)
070                    throws com.liferay.portal.NoSuchLayoutSetException,
071                            com.liferay.portal.kernel.exception.SystemException;
072    
073            public com.liferay.portal.model.LayoutSet updateImpl(
074                    com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
075                    throws com.liferay.portal.kernel.exception.SystemException;
076    
077            /**
078            * Returns the layout set with the primary key or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found.
079            *
080            * @param layoutSetId the primary key of the layout set
081            * @return the layout set
082            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
083            * @throws SystemException if a system exception occurred
084            */
085            public com.liferay.portal.model.LayoutSet findByPrimaryKey(long layoutSetId)
086                    throws com.liferay.portal.NoSuchLayoutSetException,
087                            com.liferay.portal.kernel.exception.SystemException;
088    
089            /**
090            * Returns the layout set with the primary key or returns <code>null</code> if it could not be found.
091            *
092            * @param layoutSetId the primary key of the layout set
093            * @return the layout set, or <code>null</code> if a layout set with the primary key could not be found
094            * @throws SystemException if a system exception occurred
095            */
096            public com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
097                    long layoutSetId)
098                    throws com.liferay.portal.kernel.exception.SystemException;
099    
100            /**
101            * Returns all the layout sets where groupId = &#63;.
102            *
103            * @param groupId the group ID
104            * @return the matching layout sets
105            * @throws SystemException if a system exception occurred
106            */
107            public java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
108                    long groupId)
109                    throws com.liferay.portal.kernel.exception.SystemException;
110    
111            /**
112            * Returns a range of all the layout sets where groupId = &#63;.
113            *
114            * <p>
115            * 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.
116            * </p>
117            *
118            * @param groupId the group ID
119            * @param start the lower bound of the range of layout sets
120            * @param end the upper bound of the range of layout sets (not inclusive)
121            * @return the range of matching layout sets
122            * @throws SystemException if a system exception occurred
123            */
124            public java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
125                    long groupId, int start, int end)
126                    throws com.liferay.portal.kernel.exception.SystemException;
127    
128            /**
129            * Returns an ordered range of all the layout sets where groupId = &#63;.
130            *
131            * <p>
132            * 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.
133            * </p>
134            *
135            * @param groupId the group ID
136            * @param start the lower bound of the range of layout sets
137            * @param end the upper bound of the range of layout sets (not inclusive)
138            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
139            * @return the ordered range of matching layout sets
140            * @throws SystemException if a system exception occurred
141            */
142            public java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
143                    long groupId, int start, int end,
144                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
145                    throws com.liferay.portal.kernel.exception.SystemException;
146    
147            /**
148            * Returns the first layout set in the ordered set where groupId = &#63;.
149            *
150            * <p>
151            * 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.
152            * </p>
153            *
154            * @param groupId the group ID
155            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
156            * @return the first matching layout set
157            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            public com.liferay.portal.model.LayoutSet findByGroupId_First(
161                    long groupId,
162                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163                    throws com.liferay.portal.NoSuchLayoutSetException,
164                            com.liferay.portal.kernel.exception.SystemException;
165    
166            /**
167            * Returns the last layout set in the ordered set where groupId = &#63;.
168            *
169            * <p>
170            * 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.
171            * </p>
172            *
173            * @param groupId the group ID
174            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
175            * @return the last matching layout set
176            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
177            * @throws SystemException if a system exception occurred
178            */
179            public com.liferay.portal.model.LayoutSet findByGroupId_Last(long groupId,
180                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181                    throws com.liferay.portal.NoSuchLayoutSetException,
182                            com.liferay.portal.kernel.exception.SystemException;
183    
184            /**
185            * Returns the layout sets before and after the current layout set in the ordered set where groupId = &#63;.
186            *
187            * <p>
188            * 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.
189            * </p>
190            *
191            * @param layoutSetId the primary key of the current layout set
192            * @param groupId the group ID
193            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
194            * @return the previous, current, and next layout set
195            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
196            * @throws SystemException if a system exception occurred
197            */
198            public com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
199                    long layoutSetId, long groupId,
200                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
201                    throws com.liferay.portal.NoSuchLayoutSetException,
202                            com.liferay.portal.kernel.exception.SystemException;
203    
204            /**
205            * Returns all the layout sets where layoutSetPrototypeUuid = &#63;.
206            *
207            * @param layoutSetPrototypeUuid the layout set prototype uuid
208            * @return the matching layout sets
209            * @throws SystemException if a system exception occurred
210            */
211            public java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
212                    java.lang.String layoutSetPrototypeUuid)
213                    throws com.liferay.portal.kernel.exception.SystemException;
214    
215            /**
216            * Returns a range of all the layout sets where layoutSetPrototypeUuid = &#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 layoutSetPrototypeUuid the layout set prototype uuid
223            * @param start the lower bound of the range of layout sets
224            * @param end the upper bound of the range of layout sets (not inclusive)
225            * @return the range of matching layout sets
226            * @throws SystemException if a system exception occurred
227            */
228            public java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
229                    java.lang.String layoutSetPrototypeUuid, int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException;
231    
232            /**
233            * Returns an ordered range of all the layout sets where layoutSetPrototypeUuid = &#63;.
234            *
235            * <p>
236            * 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.
237            * </p>
238            *
239            * @param layoutSetPrototypeUuid the layout set prototype uuid
240            * @param start the lower bound of the range of layout sets
241            * @param end the upper bound of the range of layout sets (not inclusive)
242            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
243            * @return the ordered range of matching layout sets
244            * @throws SystemException if a system exception occurred
245            */
246            public java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid(
247                    java.lang.String layoutSetPrototypeUuid, int start, int end,
248                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
249                    throws com.liferay.portal.kernel.exception.SystemException;
250    
251            /**
252            * Returns the first layout set in the ordered set where layoutSetPrototypeUuid = &#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 layoutSetPrototypeUuid the layout set prototype uuid
259            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
260            * @return the first matching layout set
261            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
262            * @throws SystemException if a system exception occurred
263            */
264            public com.liferay.portal.model.LayoutSet findByLayoutSetPrototypeUuid_First(
265                    java.lang.String layoutSetPrototypeUuid,
266                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267                    throws com.liferay.portal.NoSuchLayoutSetException,
268                            com.liferay.portal.kernel.exception.SystemException;
269    
270            /**
271            * Returns the last layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
272            *
273            * <p>
274            * 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.
275            * </p>
276            *
277            * @param layoutSetPrototypeUuid the layout set prototype uuid
278            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
279            * @return the last matching layout set
280            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
281            * @throws SystemException if a system exception occurred
282            */
283            public com.liferay.portal.model.LayoutSet findByLayoutSetPrototypeUuid_Last(
284                    java.lang.String layoutSetPrototypeUuid,
285                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
286                    throws com.liferay.portal.NoSuchLayoutSetException,
287                            com.liferay.portal.kernel.exception.SystemException;
288    
289            /**
290            * Returns the layout sets before and after the current layout set in the ordered set where layoutSetPrototypeUuid = &#63;.
291            *
292            * <p>
293            * 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.
294            * </p>
295            *
296            * @param layoutSetId the primary key of the current layout set
297            * @param layoutSetPrototypeUuid the layout set prototype uuid
298            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
299            * @return the previous, current, and next layout set
300            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
301            * @throws SystemException if a system exception occurred
302            */
303            public com.liferay.portal.model.LayoutSet[] findByLayoutSetPrototypeUuid_PrevAndNext(
304                    long layoutSetId, java.lang.String layoutSetPrototypeUuid,
305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
306                    throws com.liferay.portal.NoSuchLayoutSetException,
307                            com.liferay.portal.kernel.exception.SystemException;
308    
309            /**
310            * Returns the layout set where groupId = &#63; and privateLayout = &#63; or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found.
311            *
312            * @param groupId the group ID
313            * @param privateLayout the private layout
314            * @return the matching layout set
315            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
316            * @throws SystemException if a system exception occurred
317            */
318            public com.liferay.portal.model.LayoutSet findByG_P(long groupId,
319                    boolean privateLayout)
320                    throws com.liferay.portal.NoSuchLayoutSetException,
321                            com.liferay.portal.kernel.exception.SystemException;
322    
323            /**
324            * Returns the layout set where groupId = &#63; and privateLayout = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
325            *
326            * @param groupId the group ID
327            * @param privateLayout the private layout
328            * @return the matching layout set, or <code>null</code> if a matching layout set could not be found
329            * @throws SystemException if a system exception occurred
330            */
331            public com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
332                    boolean privateLayout)
333                    throws com.liferay.portal.kernel.exception.SystemException;
334    
335            /**
336            * Returns the layout set where groupId = &#63; and privateLayout = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
337            *
338            * @param groupId the group ID
339            * @param privateLayout the private layout
340            * @param retrieveFromCache whether to use the finder cache
341            * @return the matching layout set, or <code>null</code> if a matching layout set could not be found
342            * @throws SystemException if a system exception occurred
343            */
344            public com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
345                    boolean privateLayout, boolean retrieveFromCache)
346                    throws com.liferay.portal.kernel.exception.SystemException;
347    
348            /**
349            * Returns all the layout sets.
350            *
351            * @return the layout sets
352            * @throws SystemException if a system exception occurred
353            */
354            public java.util.List<com.liferay.portal.model.LayoutSet> findAll()
355                    throws com.liferay.portal.kernel.exception.SystemException;
356    
357            /**
358            * Returns a range of all the layout sets.
359            *
360            * <p>
361            * 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.
362            * </p>
363            *
364            * @param start the lower bound of the range of layout sets
365            * @param end the upper bound of the range of layout sets (not inclusive)
366            * @return the range of layout sets
367            * @throws SystemException if a system exception occurred
368            */
369            public java.util.List<com.liferay.portal.model.LayoutSet> findAll(
370                    int start, int end)
371                    throws com.liferay.portal.kernel.exception.SystemException;
372    
373            /**
374            * Returns an ordered range of all the layout sets.
375            *
376            * <p>
377            * 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.
378            * </p>
379            *
380            * @param start the lower bound of the range of layout sets
381            * @param end the upper bound of the range of layout sets (not inclusive)
382            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
383            * @return the ordered range of layout sets
384            * @throws SystemException if a system exception occurred
385            */
386            public java.util.List<com.liferay.portal.model.LayoutSet> findAll(
387                    int start, int end,
388                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
389                    throws com.liferay.portal.kernel.exception.SystemException;
390    
391            /**
392            * Removes all the layout sets where groupId = &#63; from the database.
393            *
394            * @param groupId the group ID
395            * @throws SystemException if a system exception occurred
396            */
397            public void removeByGroupId(long groupId)
398                    throws com.liferay.portal.kernel.exception.SystemException;
399    
400            /**
401            * Removes all the layout sets where layoutSetPrototypeUuid = &#63; from the database.
402            *
403            * @param layoutSetPrototypeUuid the layout set prototype uuid
404            * @throws SystemException if a system exception occurred
405            */
406            public void removeByLayoutSetPrototypeUuid(
407                    java.lang.String layoutSetPrototypeUuid)
408                    throws com.liferay.portal.kernel.exception.SystemException;
409    
410            /**
411            * Removes the layout set where groupId = &#63; and privateLayout = &#63; from the database.
412            *
413            * @param groupId the group ID
414            * @param privateLayout the private layout
415            * @throws SystemException if a system exception occurred
416            */
417            public void removeByG_P(long groupId, boolean privateLayout)
418                    throws com.liferay.portal.NoSuchLayoutSetException,
419                            com.liferay.portal.kernel.exception.SystemException;
420    
421            /**
422            * Removes all the layout sets from the database.
423            *
424            * @throws SystemException if a system exception occurred
425            */
426            public void removeAll()
427                    throws com.liferay.portal.kernel.exception.SystemException;
428    
429            /**
430            * Returns the number of layout sets where groupId = &#63;.
431            *
432            * @param groupId the group ID
433            * @return the number of matching layout sets
434            * @throws SystemException if a system exception occurred
435            */
436            public int countByGroupId(long groupId)
437                    throws com.liferay.portal.kernel.exception.SystemException;
438    
439            /**
440            * Returns the number of layout sets where layoutSetPrototypeUuid = &#63;.
441            *
442            * @param layoutSetPrototypeUuid the layout set prototype uuid
443            * @return the number of matching layout sets
444            * @throws SystemException if a system exception occurred
445            */
446            public int countByLayoutSetPrototypeUuid(
447                    java.lang.String layoutSetPrototypeUuid)
448                    throws com.liferay.portal.kernel.exception.SystemException;
449    
450            /**
451            * Returns the number of layout sets where groupId = &#63; and privateLayout = &#63;.
452            *
453            * @param groupId the group ID
454            * @param privateLayout the private layout
455            * @return the number of matching layout sets
456            * @throws SystemException if a system exception occurred
457            */
458            public int countByG_P(long groupId, boolean privateLayout)
459                    throws com.liferay.portal.kernel.exception.SystemException;
460    
461            /**
462            * Returns the number of layout sets.
463            *
464            * @return the number of layout sets
465            * @throws SystemException if a system exception occurred
466            */
467            public int countAll()
468                    throws com.liferay.portal.kernel.exception.SystemException;
469    }