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