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