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