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