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                    com.liferay.portal.kernel.service.persistence.OrgGroupRolePK orgGroupRolePK,
156                    long groupId,
157                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator)
158                    throws NoSuchOrgGroupRoleException;
159    
160            /**
161            * Removes all the org group roles where groupId = &#63; from the database.
162            *
163            * @param groupId the group ID
164            */
165            public void removeByGroupId(long groupId);
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            */
173            public int countByGroupId(long groupId);
174    
175            /**
176            * Returns all the org group roles where roleId = &#63;.
177            *
178            * @param roleId the role ID
179            * @return the matching org group roles
180            */
181            public java.util.List<OrgGroupRole> findByRoleId(long roleId);
182    
183            /**
184            * Returns a range of all the org group roles where roleId = &#63;.
185            *
186            * <p>
187            * 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.
188            * </p>
189            *
190            * @param roleId the role ID
191            * @param start the lower bound of the range of org group roles
192            * @param end the upper bound of the range of org group roles (not inclusive)
193            * @return the range of matching org group roles
194            */
195            public java.util.List<OrgGroupRole> findByRoleId(long roleId, int start,
196                    int end);
197    
198            /**
199            * Returns an ordered range of all the org group roles where roleId = &#63;.
200            *
201            * <p>
202            * 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.
203            * </p>
204            *
205            * @param roleId the role ID
206            * @param start the lower bound of the range of org group roles
207            * @param end the upper bound of the range of org group roles (not inclusive)
208            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
209            * @return the ordered range of matching org group roles
210            */
211            public java.util.List<OrgGroupRole> findByRoleId(long roleId, int start,
212                    int end,
213                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator);
214    
215            /**
216            * Returns an ordered range of all the org group roles where roleId = &#63;.
217            *
218            * <p>
219            * 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.
220            * </p>
221            *
222            * @param roleId the role ID
223            * @param start the lower bound of the range of org group roles
224            * @param end the upper bound of the range of org group roles (not inclusive)
225            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
226            * @param retrieveFromCache whether to retrieve from the finder cache
227            * @return the ordered range of matching org group roles
228            */
229            public java.util.List<OrgGroupRole> findByRoleId(long roleId, int start,
230                    int end,
231                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator,
232                    boolean retrieveFromCache);
233    
234            /**
235            * Returns the first org group role in the ordered set where roleId = &#63;.
236            *
237            * @param roleId the role ID
238            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
239            * @return the first matching org group role
240            * @throws NoSuchOrgGroupRoleException if a matching org group role could not be found
241            */
242            public OrgGroupRole findByRoleId_First(long roleId,
243                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator)
244                    throws NoSuchOrgGroupRoleException;
245    
246            /**
247            * Returns the first org group role in the ordered set where roleId = &#63;.
248            *
249            * @param roleId the role ID
250            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
251            * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found
252            */
253            public OrgGroupRole fetchByRoleId_First(long roleId,
254                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator);
255    
256            /**
257            * Returns the last org group role in the ordered set where roleId = &#63;.
258            *
259            * @param roleId the role ID
260            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
261            * @return the last matching org group role
262            * @throws NoSuchOrgGroupRoleException if a matching org group role could not be found
263            */
264            public OrgGroupRole findByRoleId_Last(long roleId,
265                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator)
266                    throws NoSuchOrgGroupRoleException;
267    
268            /**
269            * Returns the last org group role in the ordered set where roleId = &#63;.
270            *
271            * @param roleId the role ID
272            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
273            * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found
274            */
275            public OrgGroupRole fetchByRoleId_Last(long roleId,
276                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator);
277    
278            /**
279            * Returns the org group roles before and after the current org group role in the ordered set where roleId = &#63;.
280            *
281            * @param orgGroupRolePK the primary key of the current org group role
282            * @param roleId the role ID
283            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
284            * @return the previous, current, and next org group role
285            * @throws NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
286            */
287            public OrgGroupRole[] findByRoleId_PrevAndNext(
288                    com.liferay.portal.kernel.service.persistence.OrgGroupRolePK orgGroupRolePK,
289                    long roleId,
290                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator)
291                    throws NoSuchOrgGroupRoleException;
292    
293            /**
294            * Removes all the org group roles where roleId = &#63; from the database.
295            *
296            * @param roleId the role ID
297            */
298            public void removeByRoleId(long roleId);
299    
300            /**
301            * Returns the number of org group roles where roleId = &#63;.
302            *
303            * @param roleId the role ID
304            * @return the number of matching org group roles
305            */
306            public int countByRoleId(long roleId);
307    
308            /**
309            * Caches the org group role in the entity cache if it is enabled.
310            *
311            * @param orgGroupRole the org group role
312            */
313            public void cacheResult(OrgGroupRole orgGroupRole);
314    
315            /**
316            * Caches the org group roles in the entity cache if it is enabled.
317            *
318            * @param orgGroupRoles the org group roles
319            */
320            public void cacheResult(java.util.List<OrgGroupRole> orgGroupRoles);
321    
322            /**
323            * Creates a new org group role with the primary key. Does not add the org group role to the database.
324            *
325            * @param orgGroupRolePK the primary key for the new org group role
326            * @return the new org group role
327            */
328            public OrgGroupRole create(
329                    com.liferay.portal.kernel.service.persistence.OrgGroupRolePK orgGroupRolePK);
330    
331            /**
332            * Removes the org group role with the primary key from the database. Also notifies the appropriate model listeners.
333            *
334            * @param orgGroupRolePK the primary key of the org group role
335            * @return the org group role that was removed
336            * @throws NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
337            */
338            public OrgGroupRole remove(
339                    com.liferay.portal.kernel.service.persistence.OrgGroupRolePK orgGroupRolePK)
340                    throws NoSuchOrgGroupRoleException;
341    
342            public OrgGroupRole updateImpl(OrgGroupRole orgGroupRole);
343    
344            /**
345            * Returns the org group role with the primary key or throws a {@link NoSuchOrgGroupRoleException} if it could not be found.
346            *
347            * @param orgGroupRolePK the primary key of the org group role
348            * @return the org group role
349            * @throws NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
350            */
351            public OrgGroupRole findByPrimaryKey(
352                    com.liferay.portal.kernel.service.persistence.OrgGroupRolePK orgGroupRolePK)
353                    throws NoSuchOrgGroupRoleException;
354    
355            /**
356            * Returns the org group role with the primary key or returns <code>null</code> if it could not be found.
357            *
358            * @param orgGroupRolePK the primary key of the org group role
359            * @return the org group role, or <code>null</code> if a org group role with the primary key could not be found
360            */
361            public OrgGroupRole fetchByPrimaryKey(
362                    com.liferay.portal.kernel.service.persistence.OrgGroupRolePK orgGroupRolePK);
363    
364            @Override
365            public java.util.Map<java.io.Serializable, OrgGroupRole> fetchByPrimaryKeys(
366                    java.util.Set<java.io.Serializable> primaryKeys);
367    
368            /**
369            * Returns all the org group roles.
370            *
371            * @return the org group roles
372            */
373            public java.util.List<OrgGroupRole> findAll();
374    
375            /**
376            * Returns a range of all the org group roles.
377            *
378            * <p>
379            * 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.
380            * </p>
381            *
382            * @param start the lower bound of the range of org group roles
383            * @param end the upper bound of the range of org group roles (not inclusive)
384            * @return the range of org group roles
385            */
386            public java.util.List<OrgGroupRole> findAll(int start, int end);
387    
388            /**
389            * Returns an ordered range of all the org group roles.
390            *
391            * <p>
392            * 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.
393            * </p>
394            *
395            * @param start the lower bound of the range of org group roles
396            * @param end the upper bound of the range of org group roles (not inclusive)
397            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
398            * @return the ordered range of org group roles
399            */
400            public java.util.List<OrgGroupRole> findAll(int start, int end,
401                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator);
402    
403            /**
404            * Returns an ordered range of all the org group roles.
405            *
406            * <p>
407            * 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.
408            * </p>
409            *
410            * @param start the lower bound of the range of org group roles
411            * @param end the upper bound of the range of org group roles (not inclusive)
412            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
413            * @param retrieveFromCache whether to retrieve from the finder cache
414            * @return the ordered range of org group roles
415            */
416            public java.util.List<OrgGroupRole> findAll(int start, int end,
417                    com.liferay.portal.kernel.util.OrderByComparator<OrgGroupRole> orderByComparator,
418                    boolean retrieveFromCache);
419    
420            /**
421            * Removes all the org group roles from the database.
422            */
423            public void removeAll();
424    
425            /**
426            * Returns the number of org group roles.
427            *
428            * @return the number of org group roles
429            */
430            public int countAll();
431    }