001    /**
002     * Copyright (c) 2000-2013 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            * @param groupId the group ID
154            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
155            * @return the first matching org group role
156            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
157            * @throws SystemException if a system exception occurred
158            */
159            public com.liferay.portal.model.OrgGroupRole findByGroupId_First(
160                    long groupId,
161                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
163                            com.liferay.portal.kernel.exception.SystemException;
164    
165            /**
166            * Returns the first org group role in the ordered set where groupId = &#63;.
167            *
168            * @param groupId the group ID
169            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
170            * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public com.liferay.portal.model.OrgGroupRole fetchByGroupId_First(
174                    long groupId,
175                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176                    throws com.liferay.portal.kernel.exception.SystemException;
177    
178            /**
179            * Returns the last org group role in the ordered set where groupId = &#63;.
180            *
181            * @param groupId the group ID
182            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
183            * @return the last matching org group role
184            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public com.liferay.portal.model.OrgGroupRole findByGroupId_Last(
188                    long groupId,
189                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
190                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
191                            com.liferay.portal.kernel.exception.SystemException;
192    
193            /**
194            * Returns the last org group role in the ordered set where groupId = &#63;.
195            *
196            * @param groupId the group ID
197            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
198            * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found
199            * @throws SystemException if a system exception occurred
200            */
201            public com.liferay.portal.model.OrgGroupRole fetchByGroupId_Last(
202                    long groupId,
203                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204                    throws com.liferay.portal.kernel.exception.SystemException;
205    
206            /**
207            * Returns the org group roles before and after the current org group role in the ordered set where groupId = &#63;.
208            *
209            * @param orgGroupRolePK the primary key of the current org group role
210            * @param groupId the group ID
211            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
212            * @return the previous, current, and next org group role
213            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
214            * @throws SystemException if a system exception occurred
215            */
216            public com.liferay.portal.model.OrgGroupRole[] findByGroupId_PrevAndNext(
217                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
218                    long groupId,
219                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
220                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
221                            com.liferay.portal.kernel.exception.SystemException;
222    
223            /**
224            * Returns all the org group roles where roleId = &#63;.
225            *
226            * @param roleId the role ID
227            * @return the 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) throws com.liferay.portal.kernel.exception.SystemException;
232    
233            /**
234            * Returns a range of all the org group roles where roleId = &#63;.
235            *
236            * <p>
237            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
238            * </p>
239            *
240            * @param roleId the role ID
241            * @param start the lower bound of the range of org group roles
242            * @param end the upper bound of the range of org group roles (not inclusive)
243            * @return the range of matching org group roles
244            * @throws SystemException if a system exception occurred
245            */
246            public java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
247                    long roleId, int start, int end)
248                    throws com.liferay.portal.kernel.exception.SystemException;
249    
250            /**
251            * Returns an ordered range of all the org group roles where roleId = &#63;.
252            *
253            * <p>
254            * 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.
255            * </p>
256            *
257            * @param roleId the role ID
258            * @param start the lower bound of the range of org group roles
259            * @param end the upper bound of the range of org group roles (not inclusive)
260            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
261            * @return the ordered range of matching org group roles
262            * @throws SystemException if a system exception occurred
263            */
264            public java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
265                    long roleId, int start, int end,
266                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267                    throws com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * Returns the first org group role in the ordered set where roleId = &#63;.
271            *
272            * @param roleId the role ID
273            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
274            * @return the first matching org group role
275            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
276            * @throws SystemException if a system exception occurred
277            */
278            public com.liferay.portal.model.OrgGroupRole findByRoleId_First(
279                    long roleId,
280                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
281                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
282                            com.liferay.portal.kernel.exception.SystemException;
283    
284            /**
285            * Returns the first org group role in the ordered set where roleId = &#63;.
286            *
287            * @param roleId the role ID
288            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
289            * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found
290            * @throws SystemException if a system exception occurred
291            */
292            public com.liferay.portal.model.OrgGroupRole fetchByRoleId_First(
293                    long roleId,
294                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
295                    throws com.liferay.portal.kernel.exception.SystemException;
296    
297            /**
298            * Returns the last org group role in the ordered set where roleId = &#63;.
299            *
300            * @param roleId the role ID
301            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
302            * @return the last matching org group role
303            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
304            * @throws SystemException if a system exception occurred
305            */
306            public com.liferay.portal.model.OrgGroupRole findByRoleId_Last(
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            * Returns the last org group role in the ordered set where roleId = &#63;.
314            *
315            * @param roleId the role ID
316            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
317            * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found
318            * @throws SystemException if a system exception occurred
319            */
320            public com.liferay.portal.model.OrgGroupRole fetchByRoleId_Last(
321                    long roleId,
322                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
323                    throws com.liferay.portal.kernel.exception.SystemException;
324    
325            /**
326            * Returns the org group roles before and after the current org group role in the ordered set where roleId = &#63;.
327            *
328            * @param orgGroupRolePK the primary key of the current org group role
329            * @param roleId the role ID
330            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
331            * @return the previous, current, and next org group role
332            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
333            * @throws SystemException if a system exception occurred
334            */
335            public com.liferay.portal.model.OrgGroupRole[] findByRoleId_PrevAndNext(
336                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
337                    long roleId,
338                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
339                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
340                            com.liferay.portal.kernel.exception.SystemException;
341    
342            /**
343            * Returns all the org group roles.
344            *
345            * @return the org group roles
346            * @throws SystemException if a system exception occurred
347            */
348            public java.util.List<com.liferay.portal.model.OrgGroupRole> findAll()
349                    throws com.liferay.portal.kernel.exception.SystemException;
350    
351            /**
352            * Returns a range of all the org group roles.
353            *
354            * <p>
355            * 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.
356            * </p>
357            *
358            * @param start the lower bound of the range of org group roles
359            * @param end the upper bound of the range of org group roles (not inclusive)
360            * @return the range of org group roles
361            * @throws SystemException if a system exception occurred
362            */
363            public java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
364                    int start, int end)
365                    throws com.liferay.portal.kernel.exception.SystemException;
366    
367            /**
368            * Returns an ordered range of all the org group roles.
369            *
370            * <p>
371            * 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.
372            * </p>
373            *
374            * @param start the lower bound of the range of org group roles
375            * @param end the upper bound of the range of org group roles (not inclusive)
376            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
377            * @return the ordered range of org group roles
378            * @throws SystemException if a system exception occurred
379            */
380            public java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
381                    int start, int end,
382                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
383                    throws com.liferay.portal.kernel.exception.SystemException;
384    
385            /**
386            * Removes all the org group roles where groupId = &#63; from the database.
387            *
388            * @param groupId the group ID
389            * @throws SystemException if a system exception occurred
390            */
391            public void removeByGroupId(long groupId)
392                    throws com.liferay.portal.kernel.exception.SystemException;
393    
394            /**
395            * Removes all the org group roles where roleId = &#63; from the database.
396            *
397            * @param roleId the role ID
398            * @throws SystemException if a system exception occurred
399            */
400            public void removeByRoleId(long roleId)
401                    throws com.liferay.portal.kernel.exception.SystemException;
402    
403            /**
404            * Removes all the org group roles from the database.
405            *
406            * @throws SystemException if a system exception occurred
407            */
408            public void removeAll()
409                    throws com.liferay.portal.kernel.exception.SystemException;
410    
411            /**
412            * Returns the number of org group roles where groupId = &#63;.
413            *
414            * @param groupId the group ID
415            * @return the number of matching org group roles
416            * @throws SystemException if a system exception occurred
417            */
418            public int countByGroupId(long groupId)
419                    throws com.liferay.portal.kernel.exception.SystemException;
420    
421            /**
422            * Returns the number of org group roles where roleId = &#63;.
423            *
424            * @param roleId the role ID
425            * @return the number of matching org group roles
426            * @throws SystemException if a system exception occurred
427            */
428            public int countByRoleId(long roleId)
429                    throws com.liferay.portal.kernel.exception.SystemException;
430    
431            /**
432            * Returns the number of org group roles.
433            *
434            * @return the number of org group roles
435            * @throws SystemException if a system exception occurred
436            */
437            public int countAll()
438                    throws com.liferay.portal.kernel.exception.SystemException;
439    }