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.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.OrgGroupRole;
020    
021    /**
022     * The persistence interface for the org group role service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see com.liferay.portal.service.persistence.impl.OrgGroupRolePersistenceImpl
030     * @see OrgGroupRoleUtil
031     * @generated
032     */
033    @ProviderType
034    public interface OrgGroupRolePersistence extends BasePersistence<OrgGroupRole> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * 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.
039             */
040    
041            /**
042            * Returns all the org group roles where groupId = &#63;.
043            *
044            * @param groupId the group ID
045            * @return the matching org group roles
046            */
047            public java.util.List<OrgGroupRole> findByGroupId(long groupId);
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 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.
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            */
061            public java.util.List<OrgGroupRole> findByGroupId(long groupId, int start,
062                    int end);
063    
064            /**
065            * Returns an ordered range of all the org group roles where groupId = &#63;.
066            *
067            * <p>
068            * 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.
069            * </p>
070            *
071            * @param groupId the group ID
072            * @param start the lower bound of the range of org group roles
073            * @param end the upper bound of the range of org group roles (not inclusive)
074            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
075            * @return the ordered range of matching org group roles
076            */
077            public java.util.List<OrgGroupRole> findByGroupId(long groupId, int start,
078                    int end,
079                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator);
080    
081            /**
082            * Returns an ordered range of all the org group roles where groupId = &#63;.
083            *
084            * <p>
085            * 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.
086            * </p>
087            *
088            * @param groupId the group ID
089            * @param start the lower bound of the range of org group roles
090            * @param end the upper bound of the range of org group roles (not inclusive)
091            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
092            * @param retrieveFromCache whether to retrieve from the finder cache
093            * @return the ordered range of matching org group roles
094            */
095            public java.util.List<OrgGroupRole> findByGroupId(long groupId, int start,
096                    int end,
097                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator,
098                    boolean retrieveFromCache);
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
106            * @throws NoSuchOrgGroupRoleException if a matching org group role could not be found
107            */
108            public OrgGroupRole findByGroupId_First(long groupId,
109                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator)
110                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException;
111    
112            /**
113            * Returns the first org group role in the ordered set where groupId = &#63;.
114            *
115            * @param groupId the group ID
116            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
117            * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found
118            */
119            public OrgGroupRole fetchByGroupId_First(long groupId,
120                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator);
121    
122            /**
123            * Returns the last org group role in the ordered set where groupId = &#63;.
124            *
125            * @param groupId the group ID
126            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
127            * @return the last matching org group role
128            * @throws NoSuchOrgGroupRoleException if a matching org group role could not be found
129            */
130            public OrgGroupRole findByGroupId_Last(long groupId,
131                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator)
132                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException;
133    
134            /**
135            * Returns the last org group role in the ordered set where groupId = &#63;.
136            *
137            * @param groupId the group ID
138            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
139            * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found
140            */
141            public OrgGroupRole fetchByGroupId_Last(long groupId,
142                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator);
143    
144            /**
145            * Returns the org group roles before and after the current org group role in the ordered set where groupId = &#63;.
146            *
147            * @param orgGroupRolePK the primary key of the current org group role
148            * @param groupId the group ID
149            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
150            * @return the previous, current, and next org group role
151            * @throws NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
152            */
153            public OrgGroupRole[] findByGroupId_PrevAndNext(
154                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
155                    long groupId,
156                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator)
157                    throws com.liferay.portal.exception.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 com.liferay.portal.exception.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 com.liferay.portal.exception.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                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
288                    long roleId,
289                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator)
290                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException;
291    
292            /**
293            * Removes all the org group roles where roleId = &#63; from the database.
294            *
295            * @param roleId the role ID
296            */
297            public void removeByRoleId(long roleId);
298    
299            /**
300            * Returns the number of org group roles where roleId = &#63;.
301            *
302            * @param roleId the role ID
303            * @return the number of matching org group roles
304            */
305            public int countByRoleId(long roleId);
306    
307            /**
308            * Caches the org group role in the entity cache if it is enabled.
309            *
310            * @param orgGroupRole the org group role
311            */
312            public void cacheResult(OrgGroupRole orgGroupRole);
313    
314            /**
315            * Caches the org group roles in the entity cache if it is enabled.
316            *
317            * @param orgGroupRoles the org group roles
318            */
319            public void cacheResult(java.util.List<OrgGroupRole> orgGroupRoles);
320    
321            /**
322            * Creates a new org group role with the primary key. Does not add the org group role to the database.
323            *
324            * @param orgGroupRolePK the primary key for the new org group role
325            * @return the new org group role
326            */
327            public OrgGroupRole create(
328                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK);
329    
330            /**
331            * Removes the org group role with the primary key from the database. Also notifies the appropriate model listeners.
332            *
333            * @param orgGroupRolePK the primary key of the org group role
334            * @return the org group role that was removed
335            * @throws NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
336            */
337            public OrgGroupRole remove(
338                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
339                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException;
340    
341            public OrgGroupRole updateImpl(OrgGroupRole orgGroupRole);
342    
343            /**
344            * Returns the org group role with the primary key or throws a {@link NoSuchOrgGroupRoleException} if it could not be found.
345            *
346            * @param orgGroupRolePK the primary key of the org group role
347            * @return the org group role
348            * @throws NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
349            */
350            public OrgGroupRole findByPrimaryKey(
351                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
352                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException;
353    
354            /**
355            * Returns the org group role with the primary key or returns <code>null</code> if it could not be found.
356            *
357            * @param orgGroupRolePK the primary key of the org group role
358            * @return the org group role, or <code>null</code> if a org group role with the primary key could not be found
359            */
360            public OrgGroupRole fetchByPrimaryKey(
361                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK);
362    
363            @Override
364            public java.util.Map<java.io.Serializable, OrgGroupRole> fetchByPrimaryKeys(
365                    java.util.Set<java.io.Serializable> primaryKeys);
366    
367            /**
368            * Returns all the org group roles.
369            *
370            * @return the org group roles
371            */
372            public java.util.List<OrgGroupRole> findAll();
373    
374            /**
375            * Returns a range of all the org group roles.
376            *
377            * <p>
378            * 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.
379            * </p>
380            *
381            * @param start the lower bound of the range of org group roles
382            * @param end the upper bound of the range of org group roles (not inclusive)
383            * @return the range of org group roles
384            */
385            public java.util.List<OrgGroupRole> findAll(int start, int end);
386    
387            /**
388            * Returns an ordered range of all the org group roles.
389            *
390            * <p>
391            * 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.
392            * </p>
393            *
394            * @param start the lower bound of the range of org group roles
395            * @param end the upper bound of the range of org group roles (not inclusive)
396            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
397            * @return the ordered range of org group roles
398            */
399            public java.util.List<OrgGroupRole> findAll(int start, int end,
400                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator);
401    
402            /**
403            * Returns an ordered range of all the org group roles.
404            *
405            * <p>
406            * 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.
407            * </p>
408            *
409            * @param start the lower bound of the range of org group roles
410            * @param end the upper bound of the range of org group roles (not inclusive)
411            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
412            * @param retrieveFromCache whether to retrieve from the finder cache
413            * @return the ordered range of org group roles
414            */
415            public java.util.List<OrgGroupRole> findAll(int start, int end,
416                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator,
417                    boolean retrieveFromCache);
418    
419            /**
420            * Removes all the org group roles from the database.
421            */
422            public void removeAll();
423    
424            /**
425            * Returns the number of org group roles.
426            *
427            * @return the number of org group roles
428            */
429            public int countAll();
430    }