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