001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.exception.SystemException;
018    import com.liferay.portal.model.LayoutSet;
019    
020    /**
021     * The persistence interface for the layout set service.
022     *
023     * <p>
024     * Caching information and settings can be found in <code>portal.properties</code>
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see LayoutSetPersistenceImpl
029     * @see LayoutSetUtil
030     * @generated
031     */
032    public interface LayoutSetPersistence extends BasePersistence<LayoutSet> {
033            /*
034             * NOTE FOR DEVELOPERS:
035             *
036             * 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.
037             */
038    
039            /**
040            * Caches the layout set in the entity cache if it is enabled.
041            *
042            * @param layoutSet the layout set to cache
043            */
044            public void cacheResult(com.liferay.portal.model.LayoutSet layoutSet);
045    
046            /**
047            * Caches the layout sets in the entity cache if it is enabled.
048            *
049            * @param layoutSets the layout sets to cache
050            */
051            public void cacheResult(
052                    java.util.List<com.liferay.portal.model.LayoutSet> layoutSets);
053    
054            /**
055            * Creates a new layout set with the primary key. Does not add the layout set to the database.
056            *
057            * @param layoutSetId the primary key for the new layout set
058            * @return the new layout set
059            */
060            public com.liferay.portal.model.LayoutSet create(long layoutSetId);
061    
062            /**
063            * Removes the layout set with the primary key from the database. Also notifies the appropriate model listeners.
064            *
065            * @param layoutSetId the primary key of the layout set to remove
066            * @return the layout set that was removed
067            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
068            * @throws SystemException if a system exception occurred
069            */
070            public com.liferay.portal.model.LayoutSet remove(long layoutSetId)
071                    throws com.liferay.portal.NoSuchLayoutSetException,
072                            com.liferay.portal.kernel.exception.SystemException;
073    
074            public com.liferay.portal.model.LayoutSet updateImpl(
075                    com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
076                    throws com.liferay.portal.kernel.exception.SystemException;
077    
078            /**
079            * Finds the layout set with the primary key or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found.
080            *
081            * @param layoutSetId the primary key of the layout set to find
082            * @return the layout set
083            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
084            * @throws SystemException if a system exception occurred
085            */
086            public com.liferay.portal.model.LayoutSet findByPrimaryKey(long layoutSetId)
087                    throws com.liferay.portal.NoSuchLayoutSetException,
088                            com.liferay.portal.kernel.exception.SystemException;
089    
090            /**
091            * Finds the layout set with the primary key or returns <code>null</code> if it could not be found.
092            *
093            * @param layoutSetId the primary key of the layout set to find
094            * @return the layout set, or <code>null</code> if a layout set with the primary key could not be found
095            * @throws SystemException if a system exception occurred
096            */
097            public com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
098                    long layoutSetId)
099                    throws com.liferay.portal.kernel.exception.SystemException;
100    
101            /**
102            * Finds all the layout sets where groupId = &#63;.
103            *
104            * @param groupId the group ID to search with
105            * @return the matching layout sets
106            * @throws SystemException if a system exception occurred
107            */
108            public java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
109                    long groupId)
110                    throws com.liferay.portal.kernel.exception.SystemException;
111    
112            /**
113            * Finds a range of all the layout sets where groupId = &#63;.
114            *
115            * <p>
116            * 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.
117            * </p>
118            *
119            * @param groupId the group ID to search with
120            * @param start the lower bound of the range of layout sets to return
121            * @param end the upper bound of the range of layout sets to return (not inclusive)
122            * @return the range of matching layout sets
123            * @throws SystemException if a system exception occurred
124            */
125            public java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
126                    long groupId, int start, int end)
127                    throws com.liferay.portal.kernel.exception.SystemException;
128    
129            /**
130            * Finds an ordered range of all the layout sets where groupId = &#63;.
131            *
132            * <p>
133            * 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.
134            * </p>
135            *
136            * @param groupId the group ID to search with
137            * @param start the lower bound of the range of layout sets to return
138            * @param end the upper bound of the range of layout sets to return (not inclusive)
139            * @param orderByComparator the comparator to order the results by
140            * @return the ordered range of matching layout sets
141            * @throws SystemException if a system exception occurred
142            */
143            public java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
144                    long groupId, int start, int end,
145                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
146                    throws com.liferay.portal.kernel.exception.SystemException;
147    
148            /**
149            * Finds the first layout set in the ordered set where groupId = &#63;.
150            *
151            * <p>
152            * 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.
153            * </p>
154            *
155            * @param groupId the group ID to search with
156            * @param orderByComparator the comparator to order the set by
157            * @return the first matching layout set
158            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
159            * @throws SystemException if a system exception occurred
160            */
161            public com.liferay.portal.model.LayoutSet findByGroupId_First(
162                    long groupId,
163                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164                    throws com.liferay.portal.NoSuchLayoutSetException,
165                            com.liferay.portal.kernel.exception.SystemException;
166    
167            /**
168            * Finds the last layout set in the ordered set where groupId = &#63;.
169            *
170            * <p>
171            * 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.
172            * </p>
173            *
174            * @param groupId the group ID to search with
175            * @param orderByComparator the comparator to order the set by
176            * @return the last matching layout set
177            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
178            * @throws SystemException if a system exception occurred
179            */
180            public com.liferay.portal.model.LayoutSet findByGroupId_Last(long groupId,
181                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182                    throws com.liferay.portal.NoSuchLayoutSetException,
183                            com.liferay.portal.kernel.exception.SystemException;
184    
185            /**
186            * Finds the layout sets before and after the current layout set in the ordered set where groupId = &#63;.
187            *
188            * <p>
189            * 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.
190            * </p>
191            *
192            * @param layoutSetId the primary key of the current layout set
193            * @param groupId the group ID to search with
194            * @param orderByComparator the comparator to order the set by
195            * @return the previous, current, and next layout set
196            * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found
197            * @throws SystemException if a system exception occurred
198            */
199            public com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
200                    long layoutSetId, long groupId,
201                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202                    throws com.liferay.portal.NoSuchLayoutSetException,
203                            com.liferay.portal.kernel.exception.SystemException;
204    
205            /**
206            * Finds the layout set where groupId = &#63; and privateLayout = &#63; or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found.
207            *
208            * @param groupId the group ID to search with
209            * @param privateLayout the private layout to search with
210            * @return the matching layout set
211            * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found
212            * @throws SystemException if a system exception occurred
213            */
214            public com.liferay.portal.model.LayoutSet findByG_P(long groupId,
215                    boolean privateLayout)
216                    throws com.liferay.portal.NoSuchLayoutSetException,
217                            com.liferay.portal.kernel.exception.SystemException;
218    
219            /**
220            * Finds the layout set where groupId = &#63; and privateLayout = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
221            *
222            * @param groupId the group ID to search with
223            * @param privateLayout the private layout to search with
224            * @return the matching layout set, or <code>null</code> if a matching layout set could not be found
225            * @throws SystemException if a system exception occurred
226            */
227            public com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
228                    boolean privateLayout)
229                    throws com.liferay.portal.kernel.exception.SystemException;
230    
231            /**
232            * Finds 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.
233            *
234            * @param groupId the group ID to search with
235            * @param privateLayout the private layout to search with
236            * @return the matching layout set, or <code>null</code> if a matching layout set could not be found
237            * @throws SystemException if a system exception occurred
238            */
239            public com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
240                    boolean privateLayout, boolean retrieveFromCache)
241                    throws com.liferay.portal.kernel.exception.SystemException;
242    
243            /**
244            * Finds all the layout sets.
245            *
246            * @return the layout sets
247            * @throws SystemException if a system exception occurred
248            */
249            public java.util.List<com.liferay.portal.model.LayoutSet> findAll()
250                    throws com.liferay.portal.kernel.exception.SystemException;
251    
252            /**
253            * Finds a range of all the layout sets.
254            *
255            * <p>
256            * 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.
257            * </p>
258            *
259            * @param start the lower bound of the range of layout sets to return
260            * @param end the upper bound of the range of layout sets to return (not inclusive)
261            * @return the range of layout sets
262            * @throws SystemException if a system exception occurred
263            */
264            public java.util.List<com.liferay.portal.model.LayoutSet> findAll(
265                    int start, int end)
266                    throws com.liferay.portal.kernel.exception.SystemException;
267    
268            /**
269            * Finds an ordered range of all the layout sets.
270            *
271            * <p>
272            * 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.
273            * </p>
274            *
275            * @param start the lower bound of the range of layout sets to return
276            * @param end the upper bound of the range of layout sets to return (not inclusive)
277            * @param orderByComparator the comparator to order the results by
278            * @return the ordered range of layout sets
279            * @throws SystemException if a system exception occurred
280            */
281            public java.util.List<com.liferay.portal.model.LayoutSet> findAll(
282                    int start, int end,
283                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
284                    throws com.liferay.portal.kernel.exception.SystemException;
285    
286            /**
287            * Removes all the layout sets where groupId = &#63; from the database.
288            *
289            * @param groupId the group ID to search with
290            * @throws SystemException if a system exception occurred
291            */
292            public void removeByGroupId(long groupId)
293                    throws com.liferay.portal.kernel.exception.SystemException;
294    
295            /**
296            * Removes the layout set where groupId = &#63; and privateLayout = &#63; from the database.
297            *
298            * @param groupId the group ID to search with
299            * @param privateLayout the private layout to search with
300            * @throws SystemException if a system exception occurred
301            */
302            public void removeByG_P(long groupId, boolean privateLayout)
303                    throws com.liferay.portal.NoSuchLayoutSetException,
304                            com.liferay.portal.kernel.exception.SystemException;
305    
306            /**
307            * Removes all the layout sets from the database.
308            *
309            * @throws SystemException if a system exception occurred
310            */
311            public void removeAll()
312                    throws com.liferay.portal.kernel.exception.SystemException;
313    
314            /**
315            * Counts all the layout sets where groupId = &#63;.
316            *
317            * @param groupId the group ID to search with
318            * @return the number of matching layout sets
319            * @throws SystemException if a system exception occurred
320            */
321            public int countByGroupId(long groupId)
322                    throws com.liferay.portal.kernel.exception.SystemException;
323    
324            /**
325            * Counts all the layout sets where groupId = &#63; and privateLayout = &#63;.
326            *
327            * @param groupId the group ID to search with
328            * @param privateLayout the private layout to search with
329            * @return the number of matching layout sets
330            * @throws SystemException if a system exception occurred
331            */
332            public int countByG_P(long groupId, boolean privateLayout)
333                    throws com.liferay.portal.kernel.exception.SystemException;
334    
335            /**
336            * Counts all the layout sets.
337            *
338            * @return the number of layout sets
339            * @throws SystemException if a system exception occurred
340            */
341            public int countAll()
342                    throws com.liferay.portal.kernel.exception.SystemException;
343    
344            public LayoutSet remove(LayoutSet layoutSet) throws SystemException;
345    }