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