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