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