001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.exception.SystemException;
018    import com.liferay.portal.model.Role;
019    
020    /**
021     * The persistence interface for the 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 RolePersistenceImpl
029     * @see RoleUtil
030     * @generated
031     */
032    public interface RolePersistence extends BasePersistence<Role> {
033            /*
034             * NOTE FOR DEVELOPERS:
035             *
036             * Never modify or reference this interface directly. Always use {@link RoleUtil} to access the role persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
037             */
038    
039            /**
040            * Caches the role in the entity cache if it is enabled.
041            *
042            * @param role the role
043            */
044            public void cacheResult(com.liferay.portal.model.Role role);
045    
046            /**
047            * Caches the roles in the entity cache if it is enabled.
048            *
049            * @param roles the roles
050            */
051            public void cacheResult(java.util.List<com.liferay.portal.model.Role> roles);
052    
053            /**
054            * Creates a new role with the primary key. Does not add the role to the database.
055            *
056            * @param roleId the primary key for the new role
057            * @return the new role
058            */
059            public com.liferay.portal.model.Role create(long roleId);
060    
061            /**
062            * Removes the role with the primary key from the database. Also notifies the appropriate model listeners.
063            *
064            * @param roleId the primary key of the role
065            * @return the role that was removed
066            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
067            * @throws SystemException if a system exception occurred
068            */
069            public com.liferay.portal.model.Role remove(long roleId)
070                    throws com.liferay.portal.NoSuchRoleException,
071                            com.liferay.portal.kernel.exception.SystemException;
072    
073            public com.liferay.portal.model.Role updateImpl(
074                    com.liferay.portal.model.Role role, boolean merge)
075                    throws com.liferay.portal.kernel.exception.SystemException;
076    
077            /**
078            * Returns the role with the primary key or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found.
079            *
080            * @param roleId the primary key of the role
081            * @return the role
082            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
083            * @throws SystemException if a system exception occurred
084            */
085            public com.liferay.portal.model.Role findByPrimaryKey(long roleId)
086                    throws com.liferay.portal.NoSuchRoleException,
087                            com.liferay.portal.kernel.exception.SystemException;
088    
089            /**
090            * Returns the role with the primary key or returns <code>null</code> if it could not be found.
091            *
092            * @param roleId the primary key of the role
093            * @return the role, or <code>null</code> if a role with the primary key could not be found
094            * @throws SystemException if a system exception occurred
095            */
096            public com.liferay.portal.model.Role fetchByPrimaryKey(long roleId)
097                    throws com.liferay.portal.kernel.exception.SystemException;
098    
099            /**
100            * Returns all the roles where companyId = &#63;.
101            *
102            * @param companyId the company ID
103            * @return the matching roles
104            * @throws SystemException if a system exception occurred
105            */
106            public java.util.List<com.liferay.portal.model.Role> findByCompanyId(
107                    long companyId)
108                    throws com.liferay.portal.kernel.exception.SystemException;
109    
110            /**
111            * Returns a range of all the roles where companyId = &#63;.
112            *
113            * <p>
114            * 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.
115            * </p>
116            *
117            * @param companyId the company ID
118            * @param start the lower bound of the range of roles
119            * @param end the upper bound of the range of roles (not inclusive)
120            * @return the range of matching roles
121            * @throws SystemException if a system exception occurred
122            */
123            public java.util.List<com.liferay.portal.model.Role> findByCompanyId(
124                    long companyId, int start, int end)
125                    throws com.liferay.portal.kernel.exception.SystemException;
126    
127            /**
128            * Returns an ordered range of all the roles where companyId = &#63;.
129            *
130            * <p>
131            * 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.
132            * </p>
133            *
134            * @param companyId the company ID
135            * @param start the lower bound of the range of roles
136            * @param end the upper bound of the range of roles (not inclusive)
137            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
138            * @return the ordered range of matching roles
139            * @throws SystemException if a system exception occurred
140            */
141            public java.util.List<com.liferay.portal.model.Role> findByCompanyId(
142                    long companyId, int start, int end,
143                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
144                    throws com.liferay.portal.kernel.exception.SystemException;
145    
146            /**
147            * Returns the first role in the ordered set where companyId = &#63;.
148            *
149            * <p>
150            * 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.
151            * </p>
152            *
153            * @param companyId the company ID
154            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
155            * @return the first matching role
156            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
157            * @throws SystemException if a system exception occurred
158            */
159            public com.liferay.portal.model.Role findByCompanyId_First(long companyId,
160                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161                    throws com.liferay.portal.NoSuchRoleException,
162                            com.liferay.portal.kernel.exception.SystemException;
163    
164            /**
165            * Returns the last role in the ordered set where companyId = &#63;.
166            *
167            * <p>
168            * 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.
169            * </p>
170            *
171            * @param companyId the company ID
172            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
173            * @return the last matching role
174            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
175            * @throws SystemException if a system exception occurred
176            */
177            public com.liferay.portal.model.Role findByCompanyId_Last(long companyId,
178                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
179                    throws com.liferay.portal.NoSuchRoleException,
180                            com.liferay.portal.kernel.exception.SystemException;
181    
182            /**
183            * Returns the roles before and after the current role in the ordered set where companyId = &#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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
187            * </p>
188            *
189            * @param roleId the primary key of the current role
190            * @param companyId the company ID
191            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
192            * @return the previous, current, and next role
193            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
194            * @throws SystemException if a system exception occurred
195            */
196            public com.liferay.portal.model.Role[] findByCompanyId_PrevAndNext(
197                    long roleId, long companyId,
198                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
199                    throws com.liferay.portal.NoSuchRoleException,
200                            com.liferay.portal.kernel.exception.SystemException;
201    
202            /**
203            * Returns all the roles that the user has permission to view where companyId = &#63;.
204            *
205            * @param companyId the company ID
206            * @return the matching roles that the user has permission to view
207            * @throws SystemException if a system exception occurred
208            */
209            public java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
210                    long companyId)
211                    throws com.liferay.portal.kernel.exception.SystemException;
212    
213            /**
214            * Returns a range of all the roles that the user has permission to view where companyId = &#63;.
215            *
216            * <p>
217            * 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.
218            * </p>
219            *
220            * @param companyId the company ID
221            * @param start the lower bound of the range of roles
222            * @param end the upper bound of the range of roles (not inclusive)
223            * @return the range of matching roles that the user has permission to view
224            * @throws SystemException if a system exception occurred
225            */
226            public java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
227                    long companyId, int start, int end)
228                    throws com.liferay.portal.kernel.exception.SystemException;
229    
230            /**
231            * Returns an ordered range of all the roles that the user has permissions to view where companyId = &#63;.
232            *
233            * <p>
234            * 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.
235            * </p>
236            *
237            * @param companyId the company ID
238            * @param start the lower bound of the range of roles
239            * @param end the upper bound of the range of roles (not inclusive)
240            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
241            * @return the ordered range of matching roles that the user has permission to view
242            * @throws SystemException if a system exception occurred
243            */
244            public java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
245                    long companyId, int start, int end,
246                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
247                    throws com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where companyId = &#63;.
251            *
252            * @param roleId the primary key of the current role
253            * @param companyId the company ID
254            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
255            * @return the previous, current, and next role
256            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
257            * @throws SystemException if a system exception occurred
258            */
259            public com.liferay.portal.model.Role[] filterFindByCompanyId_PrevAndNext(
260                    long roleId, long companyId,
261                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
262                    throws com.liferay.portal.NoSuchRoleException,
263                            com.liferay.portal.kernel.exception.SystemException;
264    
265            /**
266            * Returns all the roles where name = &#63;.
267            *
268            * @param name the name
269            * @return the matching roles
270            * @throws SystemException if a system exception occurred
271            */
272            public java.util.List<com.liferay.portal.model.Role> findByName(
273                    java.lang.String name)
274                    throws com.liferay.portal.kernel.exception.SystemException;
275    
276            /**
277            * Returns a range of all the roles where name = &#63;.
278            *
279            * <p>
280            * 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.
281            * </p>
282            *
283            * @param name the name
284            * @param start the lower bound of the range of roles
285            * @param end the upper bound of the range of roles (not inclusive)
286            * @return the range of matching roles
287            * @throws SystemException if a system exception occurred
288            */
289            public java.util.List<com.liferay.portal.model.Role> findByName(
290                    java.lang.String name, int start, int end)
291                    throws com.liferay.portal.kernel.exception.SystemException;
292    
293            /**
294            * Returns an ordered range of all the roles where name = &#63;.
295            *
296            * <p>
297            * 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.
298            * </p>
299            *
300            * @param name the name
301            * @param start the lower bound of the range of roles
302            * @param end the upper bound of the range of roles (not inclusive)
303            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
304            * @return the ordered range of matching roles
305            * @throws SystemException if a system exception occurred
306            */
307            public java.util.List<com.liferay.portal.model.Role> findByName(
308                    java.lang.String name, int start, int end,
309                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
310                    throws com.liferay.portal.kernel.exception.SystemException;
311    
312            /**
313            * Returns the first role in the ordered set where name = &#63;.
314            *
315            * <p>
316            * 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.
317            * </p>
318            *
319            * @param name the name
320            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
321            * @return the first matching role
322            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
323            * @throws SystemException if a system exception occurred
324            */
325            public com.liferay.portal.model.Role findByName_First(
326                    java.lang.String name,
327                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
328                    throws com.liferay.portal.NoSuchRoleException,
329                            com.liferay.portal.kernel.exception.SystemException;
330    
331            /**
332            * Returns the last role in the ordered set where name = &#63;.
333            *
334            * <p>
335            * 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.
336            * </p>
337            *
338            * @param name the name
339            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
340            * @return the last matching role
341            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
342            * @throws SystemException if a system exception occurred
343            */
344            public com.liferay.portal.model.Role findByName_Last(
345                    java.lang.String name,
346                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
347                    throws com.liferay.portal.NoSuchRoleException,
348                            com.liferay.portal.kernel.exception.SystemException;
349    
350            /**
351            * Returns the roles before and after the current role in the ordered set where name = &#63;.
352            *
353            * <p>
354            * 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.
355            * </p>
356            *
357            * @param roleId the primary key of the current role
358            * @param name the name
359            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
360            * @return the previous, current, and next role
361            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
362            * @throws SystemException if a system exception occurred
363            */
364            public com.liferay.portal.model.Role[] findByName_PrevAndNext(long roleId,
365                    java.lang.String name,
366                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
367                    throws com.liferay.portal.NoSuchRoleException,
368                            com.liferay.portal.kernel.exception.SystemException;
369    
370            /**
371            * Returns all the roles that the user has permission to view where name = &#63;.
372            *
373            * @param name the name
374            * @return the matching roles that the user has permission to view
375            * @throws SystemException if a system exception occurred
376            */
377            public java.util.List<com.liferay.portal.model.Role> filterFindByName(
378                    java.lang.String name)
379                    throws com.liferay.portal.kernel.exception.SystemException;
380    
381            /**
382            * Returns a range of all the roles that the user has permission to view where name = &#63;.
383            *
384            * <p>
385            * 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.
386            * </p>
387            *
388            * @param name the name
389            * @param start the lower bound of the range of roles
390            * @param end the upper bound of the range of roles (not inclusive)
391            * @return the range of matching roles that the user has permission to view
392            * @throws SystemException if a system exception occurred
393            */
394            public java.util.List<com.liferay.portal.model.Role> filterFindByName(
395                    java.lang.String name, int start, int end)
396                    throws com.liferay.portal.kernel.exception.SystemException;
397    
398            /**
399            * Returns an ordered range of all the roles that the user has permissions to view where name = &#63;.
400            *
401            * <p>
402            * 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.
403            * </p>
404            *
405            * @param name the name
406            * @param start the lower bound of the range of roles
407            * @param end the upper bound of the range of roles (not inclusive)
408            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
409            * @return the ordered range of matching roles that the user has permission to view
410            * @throws SystemException if a system exception occurred
411            */
412            public java.util.List<com.liferay.portal.model.Role> filterFindByName(
413                    java.lang.String name, int start, int end,
414                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415                    throws com.liferay.portal.kernel.exception.SystemException;
416    
417            /**
418            * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where name = &#63;.
419            *
420            * @param roleId the primary key of the current role
421            * @param name the name
422            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
423            * @return the previous, current, and next role
424            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
425            * @throws SystemException if a system exception occurred
426            */
427            public com.liferay.portal.model.Role[] filterFindByName_PrevAndNext(
428                    long roleId, java.lang.String name,
429                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
430                    throws com.liferay.portal.NoSuchRoleException,
431                            com.liferay.portal.kernel.exception.SystemException;
432    
433            /**
434            * Returns all the roles where subtype = &#63;.
435            *
436            * @param subtype the subtype
437            * @return the matching roles
438            * @throws SystemException if a system exception occurred
439            */
440            public java.util.List<com.liferay.portal.model.Role> findBySubtype(
441                    java.lang.String subtype)
442                    throws com.liferay.portal.kernel.exception.SystemException;
443    
444            /**
445            * Returns a range of all the roles where subtype = &#63;.
446            *
447            * <p>
448            * 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.
449            * </p>
450            *
451            * @param subtype the subtype
452            * @param start the lower bound of the range of roles
453            * @param end the upper bound of the range of roles (not inclusive)
454            * @return the range of matching roles
455            * @throws SystemException if a system exception occurred
456            */
457            public java.util.List<com.liferay.portal.model.Role> findBySubtype(
458                    java.lang.String subtype, int start, int end)
459                    throws com.liferay.portal.kernel.exception.SystemException;
460    
461            /**
462            * Returns an ordered range of all the roles where subtype = &#63;.
463            *
464            * <p>
465            * 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.
466            * </p>
467            *
468            * @param subtype the subtype
469            * @param start the lower bound of the range of roles
470            * @param end the upper bound of the range of roles (not inclusive)
471            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
472            * @return the ordered range of matching roles
473            * @throws SystemException if a system exception occurred
474            */
475            public java.util.List<com.liferay.portal.model.Role> findBySubtype(
476                    java.lang.String subtype, int start, int end,
477                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
478                    throws com.liferay.portal.kernel.exception.SystemException;
479    
480            /**
481            * Returns the first role in the ordered set where subtype = &#63;.
482            *
483            * <p>
484            * 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.
485            * </p>
486            *
487            * @param subtype the subtype
488            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
489            * @return the first matching role
490            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
491            * @throws SystemException if a system exception occurred
492            */
493            public com.liferay.portal.model.Role findBySubtype_First(
494                    java.lang.String subtype,
495                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
496                    throws com.liferay.portal.NoSuchRoleException,
497                            com.liferay.portal.kernel.exception.SystemException;
498    
499            /**
500            * Returns the last role in the ordered set where subtype = &#63;.
501            *
502            * <p>
503            * 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.
504            * </p>
505            *
506            * @param subtype the subtype
507            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
508            * @return the last matching role
509            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
510            * @throws SystemException if a system exception occurred
511            */
512            public com.liferay.portal.model.Role findBySubtype_Last(
513                    java.lang.String subtype,
514                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
515                    throws com.liferay.portal.NoSuchRoleException,
516                            com.liferay.portal.kernel.exception.SystemException;
517    
518            /**
519            * Returns the roles before and after the current role in the ordered set where subtype = &#63;.
520            *
521            * <p>
522            * 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.
523            * </p>
524            *
525            * @param roleId the primary key of the current role
526            * @param subtype the subtype
527            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
528            * @return the previous, current, and next role
529            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
530            * @throws SystemException if a system exception occurred
531            */
532            public com.liferay.portal.model.Role[] findBySubtype_PrevAndNext(
533                    long roleId, java.lang.String subtype,
534                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
535                    throws com.liferay.portal.NoSuchRoleException,
536                            com.liferay.portal.kernel.exception.SystemException;
537    
538            /**
539            * Returns all the roles that the user has permission to view where subtype = &#63;.
540            *
541            * @param subtype the subtype
542            * @return the matching roles that the user has permission to view
543            * @throws SystemException if a system exception occurred
544            */
545            public java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
546                    java.lang.String subtype)
547                    throws com.liferay.portal.kernel.exception.SystemException;
548    
549            /**
550            * Returns a range of all the roles that the user has permission to view where subtype = &#63;.
551            *
552            * <p>
553            * 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.
554            * </p>
555            *
556            * @param subtype the subtype
557            * @param start the lower bound of the range of roles
558            * @param end the upper bound of the range of roles (not inclusive)
559            * @return the range of matching roles that the user has permission to view
560            * @throws SystemException if a system exception occurred
561            */
562            public java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
563                    java.lang.String subtype, int start, int end)
564                    throws com.liferay.portal.kernel.exception.SystemException;
565    
566            /**
567            * Returns an ordered range of all the roles that the user has permissions to view where subtype = &#63;.
568            *
569            * <p>
570            * 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.
571            * </p>
572            *
573            * @param subtype the subtype
574            * @param start the lower bound of the range of roles
575            * @param end the upper bound of the range of roles (not inclusive)
576            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
577            * @return the ordered range of matching roles that the user has permission to view
578            * @throws SystemException if a system exception occurred
579            */
580            public java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
581                    java.lang.String subtype, int start, int end,
582                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
583                    throws com.liferay.portal.kernel.exception.SystemException;
584    
585            /**
586            * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where subtype = &#63;.
587            *
588            * @param roleId the primary key of the current role
589            * @param subtype the subtype
590            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
591            * @return the previous, current, and next role
592            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
593            * @throws SystemException if a system exception occurred
594            */
595            public com.liferay.portal.model.Role[] filterFindBySubtype_PrevAndNext(
596                    long roleId, java.lang.String subtype,
597                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
598                    throws com.liferay.portal.NoSuchRoleException,
599                            com.liferay.portal.kernel.exception.SystemException;
600    
601            /**
602            * Returns the role where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found.
603            *
604            * @param companyId the company ID
605            * @param name the name
606            * @return the matching role
607            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
608            * @throws SystemException if a system exception occurred
609            */
610            public com.liferay.portal.model.Role findByC_N(long companyId,
611                    java.lang.String name)
612                    throws com.liferay.portal.NoSuchRoleException,
613                            com.liferay.portal.kernel.exception.SystemException;
614    
615            /**
616            * Returns the role where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
617            *
618            * @param companyId the company ID
619            * @param name the name
620            * @return the matching role, or <code>null</code> if a matching role could not be found
621            * @throws SystemException if a system exception occurred
622            */
623            public com.liferay.portal.model.Role fetchByC_N(long companyId,
624                    java.lang.String name)
625                    throws com.liferay.portal.kernel.exception.SystemException;
626    
627            /**
628            * Returns the role where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
629            *
630            * @param companyId the company ID
631            * @param name the name
632            * @param retrieveFromCache whether to use the finder cache
633            * @return the matching role, or <code>null</code> if a matching role could not be found
634            * @throws SystemException if a system exception occurred
635            */
636            public com.liferay.portal.model.Role fetchByC_N(long companyId,
637                    java.lang.String name, boolean retrieveFromCache)
638                    throws com.liferay.portal.kernel.exception.SystemException;
639    
640            /**
641            * Returns all the roles where type = &#63; and subtype = &#63;.
642            *
643            * @param type the type
644            * @param subtype the subtype
645            * @return the matching roles
646            * @throws SystemException if a system exception occurred
647            */
648            public java.util.List<com.liferay.portal.model.Role> findByT_S(int type,
649                    java.lang.String subtype)
650                    throws com.liferay.portal.kernel.exception.SystemException;
651    
652            /**
653            * Returns a range of all the roles where type = &#63; and subtype = &#63;.
654            *
655            * <p>
656            * 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.
657            * </p>
658            *
659            * @param type the type
660            * @param subtype the subtype
661            * @param start the lower bound of the range of roles
662            * @param end the upper bound of the range of roles (not inclusive)
663            * @return the range of matching roles
664            * @throws SystemException if a system exception occurred
665            */
666            public java.util.List<com.liferay.portal.model.Role> findByT_S(int type,
667                    java.lang.String subtype, int start, int end)
668                    throws com.liferay.portal.kernel.exception.SystemException;
669    
670            /**
671            * Returns an ordered range of all the roles where type = &#63; and subtype = &#63;.
672            *
673            * <p>
674            * 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.
675            * </p>
676            *
677            * @param type the type
678            * @param subtype the subtype
679            * @param start the lower bound of the range of roles
680            * @param end the upper bound of the range of roles (not inclusive)
681            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
682            * @return the ordered range of matching roles
683            * @throws SystemException if a system exception occurred
684            */
685            public java.util.List<com.liferay.portal.model.Role> findByT_S(int type,
686                    java.lang.String subtype, int start, int end,
687                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
688                    throws com.liferay.portal.kernel.exception.SystemException;
689    
690            /**
691            * Returns the first role in the ordered set where type = &#63; and subtype = &#63;.
692            *
693            * <p>
694            * 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.
695            * </p>
696            *
697            * @param type the type
698            * @param subtype the subtype
699            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
700            * @return the first matching role
701            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
702            * @throws SystemException if a system exception occurred
703            */
704            public com.liferay.portal.model.Role findByT_S_First(int type,
705                    java.lang.String subtype,
706                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
707                    throws com.liferay.portal.NoSuchRoleException,
708                            com.liferay.portal.kernel.exception.SystemException;
709    
710            /**
711            * Returns the last role in the ordered set where type = &#63; and subtype = &#63;.
712            *
713            * <p>
714            * 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.
715            * </p>
716            *
717            * @param type the type
718            * @param subtype the subtype
719            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
720            * @return the last matching role
721            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
722            * @throws SystemException if a system exception occurred
723            */
724            public com.liferay.portal.model.Role findByT_S_Last(int type,
725                    java.lang.String subtype,
726                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
727                    throws com.liferay.portal.NoSuchRoleException,
728                            com.liferay.portal.kernel.exception.SystemException;
729    
730            /**
731            * Returns the roles before and after the current role in the ordered set where type = &#63; and subtype = &#63;.
732            *
733            * <p>
734            * 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.
735            * </p>
736            *
737            * @param roleId the primary key of the current role
738            * @param type the type
739            * @param subtype the subtype
740            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
741            * @return the previous, current, and next role
742            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
743            * @throws SystemException if a system exception occurred
744            */
745            public com.liferay.portal.model.Role[] findByT_S_PrevAndNext(long roleId,
746                    int type, java.lang.String subtype,
747                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
748                    throws com.liferay.portal.NoSuchRoleException,
749                            com.liferay.portal.kernel.exception.SystemException;
750    
751            /**
752            * Returns all the roles that the user has permission to view where type = &#63; and subtype = &#63;.
753            *
754            * @param type the type
755            * @param subtype the subtype
756            * @return the matching roles that the user has permission to view
757            * @throws SystemException if a system exception occurred
758            */
759            public java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
760                    int type, java.lang.String subtype)
761                    throws com.liferay.portal.kernel.exception.SystemException;
762    
763            /**
764            * Returns a range of all the roles that the user has permission to view where type = &#63; and subtype = &#63;.
765            *
766            * <p>
767            * 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.
768            * </p>
769            *
770            * @param type the type
771            * @param subtype the subtype
772            * @param start the lower bound of the range of roles
773            * @param end the upper bound of the range of roles (not inclusive)
774            * @return the range of matching roles that the user has permission to view
775            * @throws SystemException if a system exception occurred
776            */
777            public java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
778                    int type, java.lang.String subtype, int start, int end)
779                    throws com.liferay.portal.kernel.exception.SystemException;
780    
781            /**
782            * Returns an ordered range of all the roles that the user has permissions to view where type = &#63; and subtype = &#63;.
783            *
784            * <p>
785            * 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.
786            * </p>
787            *
788            * @param type the type
789            * @param subtype the subtype
790            * @param start the lower bound of the range of roles
791            * @param end the upper bound of the range of roles (not inclusive)
792            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
793            * @return the ordered range of matching roles that the user has permission to view
794            * @throws SystemException if a system exception occurred
795            */
796            public java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
797                    int type, java.lang.String subtype, int start, int end,
798                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
799                    throws com.liferay.portal.kernel.exception.SystemException;
800    
801            /**
802            * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where type = &#63; and subtype = &#63;.
803            *
804            * @param roleId the primary key of the current role
805            * @param type the type
806            * @param subtype the subtype
807            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
808            * @return the previous, current, and next role
809            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
810            * @throws SystemException if a system exception occurred
811            */
812            public com.liferay.portal.model.Role[] filterFindByT_S_PrevAndNext(
813                    long roleId, int type, java.lang.String subtype,
814                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
815                    throws com.liferay.portal.NoSuchRoleException,
816                            com.liferay.portal.kernel.exception.SystemException;
817    
818            /**
819            * Returns the role where companyId = &#63; and classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found.
820            *
821            * @param companyId the company ID
822            * @param classNameId the class name ID
823            * @param classPK the class p k
824            * @return the matching role
825            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
826            * @throws SystemException if a system exception occurred
827            */
828            public com.liferay.portal.model.Role findByC_C_C(long companyId,
829                    long classNameId, long classPK)
830                    throws com.liferay.portal.NoSuchRoleException,
831                            com.liferay.portal.kernel.exception.SystemException;
832    
833            /**
834            * Returns the role where companyId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
835            *
836            * @param companyId the company ID
837            * @param classNameId the class name ID
838            * @param classPK the class p k
839            * @return the matching role, or <code>null</code> if a matching role could not be found
840            * @throws SystemException if a system exception occurred
841            */
842            public com.liferay.portal.model.Role fetchByC_C_C(long companyId,
843                    long classNameId, long classPK)
844                    throws com.liferay.portal.kernel.exception.SystemException;
845    
846            /**
847            * Returns the role where companyId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
848            *
849            * @param companyId the company ID
850            * @param classNameId the class name ID
851            * @param classPK the class p k
852            * @param retrieveFromCache whether to use the finder cache
853            * @return the matching role, or <code>null</code> if a matching role could not be found
854            * @throws SystemException if a system exception occurred
855            */
856            public com.liferay.portal.model.Role fetchByC_C_C(long companyId,
857                    long classNameId, long classPK, boolean retrieveFromCache)
858                    throws com.liferay.portal.kernel.exception.SystemException;
859    
860            /**
861            * Returns all the roles.
862            *
863            * @return the roles
864            * @throws SystemException if a system exception occurred
865            */
866            public java.util.List<com.liferay.portal.model.Role> findAll()
867                    throws com.liferay.portal.kernel.exception.SystemException;
868    
869            /**
870            * Returns a range of all the roles.
871            *
872            * <p>
873            * 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.
874            * </p>
875            *
876            * @param start the lower bound of the range of roles
877            * @param end the upper bound of the range of roles (not inclusive)
878            * @return the range of roles
879            * @throws SystemException if a system exception occurred
880            */
881            public java.util.List<com.liferay.portal.model.Role> findAll(int start,
882                    int end) throws com.liferay.portal.kernel.exception.SystemException;
883    
884            /**
885            * Returns an ordered range of all the roles.
886            *
887            * <p>
888            * 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.
889            * </p>
890            *
891            * @param start the lower bound of the range of roles
892            * @param end the upper bound of the range of roles (not inclusive)
893            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
894            * @return the ordered range of roles
895            * @throws SystemException if a system exception occurred
896            */
897            public java.util.List<com.liferay.portal.model.Role> findAll(int start,
898                    int end,
899                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
900                    throws com.liferay.portal.kernel.exception.SystemException;
901    
902            /**
903            * Removes all the roles where companyId = &#63; from the database.
904            *
905            * @param companyId the company ID
906            * @throws SystemException if a system exception occurred
907            */
908            public void removeByCompanyId(long companyId)
909                    throws com.liferay.portal.kernel.exception.SystemException;
910    
911            /**
912            * Removes all the roles where name = &#63; from the database.
913            *
914            * @param name the name
915            * @throws SystemException if a system exception occurred
916            */
917            public void removeByName(java.lang.String name)
918                    throws com.liferay.portal.kernel.exception.SystemException;
919    
920            /**
921            * Removes all the roles where subtype = &#63; from the database.
922            *
923            * @param subtype the subtype
924            * @throws SystemException if a system exception occurred
925            */
926            public void removeBySubtype(java.lang.String subtype)
927                    throws com.liferay.portal.kernel.exception.SystemException;
928    
929            /**
930            * Removes the role where companyId = &#63; and name = &#63; from the database.
931            *
932            * @param companyId the company ID
933            * @param name the name
934            * @throws SystemException if a system exception occurred
935            */
936            public void removeByC_N(long companyId, java.lang.String name)
937                    throws com.liferay.portal.NoSuchRoleException,
938                            com.liferay.portal.kernel.exception.SystemException;
939    
940            /**
941            * Removes all the roles where type = &#63; and subtype = &#63; from the database.
942            *
943            * @param type the type
944            * @param subtype the subtype
945            * @throws SystemException if a system exception occurred
946            */
947            public void removeByT_S(int type, java.lang.String subtype)
948                    throws com.liferay.portal.kernel.exception.SystemException;
949    
950            /**
951            * Removes the role where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
952            *
953            * @param companyId the company ID
954            * @param classNameId the class name ID
955            * @param classPK the class p k
956            * @throws SystemException if a system exception occurred
957            */
958            public void removeByC_C_C(long companyId, long classNameId, long classPK)
959                    throws com.liferay.portal.NoSuchRoleException,
960                            com.liferay.portal.kernel.exception.SystemException;
961    
962            /**
963            * Removes all the roles from the database.
964            *
965            * @throws SystemException if a system exception occurred
966            */
967            public void removeAll()
968                    throws com.liferay.portal.kernel.exception.SystemException;
969    
970            /**
971            * Returns the number of roles where companyId = &#63;.
972            *
973            * @param companyId the company ID
974            * @return the number of matching roles
975            * @throws SystemException if a system exception occurred
976            */
977            public int countByCompanyId(long companyId)
978                    throws com.liferay.portal.kernel.exception.SystemException;
979    
980            /**
981            * Returns the number of roles that the user has permission to view where companyId = &#63;.
982            *
983            * @param companyId the company ID
984            * @return the number of matching roles that the user has permission to view
985            * @throws SystemException if a system exception occurred
986            */
987            public int filterCountByCompanyId(long companyId)
988                    throws com.liferay.portal.kernel.exception.SystemException;
989    
990            /**
991            * Returns the number of roles where name = &#63;.
992            *
993            * @param name the name
994            * @return the number of matching roles
995            * @throws SystemException if a system exception occurred
996            */
997            public int countByName(java.lang.String name)
998                    throws com.liferay.portal.kernel.exception.SystemException;
999    
1000            /**
1001            * Returns the number of roles that the user has permission to view where name = &#63;.
1002            *
1003            * @param name the name
1004            * @return the number of matching roles that the user has permission to view
1005            * @throws SystemException if a system exception occurred
1006            */
1007            public int filterCountByName(java.lang.String name)
1008                    throws com.liferay.portal.kernel.exception.SystemException;
1009    
1010            /**
1011            * Returns the number of roles where subtype = &#63;.
1012            *
1013            * @param subtype the subtype
1014            * @return the number of matching roles
1015            * @throws SystemException if a system exception occurred
1016            */
1017            public int countBySubtype(java.lang.String subtype)
1018                    throws com.liferay.portal.kernel.exception.SystemException;
1019    
1020            /**
1021            * Returns the number of roles that the user has permission to view where subtype = &#63;.
1022            *
1023            * @param subtype the subtype
1024            * @return the number of matching roles that the user has permission to view
1025            * @throws SystemException if a system exception occurred
1026            */
1027            public int filterCountBySubtype(java.lang.String subtype)
1028                    throws com.liferay.portal.kernel.exception.SystemException;
1029    
1030            /**
1031            * Returns the number of roles where companyId = &#63; and name = &#63;.
1032            *
1033            * @param companyId the company ID
1034            * @param name the name
1035            * @return the number of matching roles
1036            * @throws SystemException if a system exception occurred
1037            */
1038            public int countByC_N(long companyId, java.lang.String name)
1039                    throws com.liferay.portal.kernel.exception.SystemException;
1040    
1041            /**
1042            * Returns the number of roles where type = &#63; and subtype = &#63;.
1043            *
1044            * @param type the type
1045            * @param subtype the subtype
1046            * @return the number of matching roles
1047            * @throws SystemException if a system exception occurred
1048            */
1049            public int countByT_S(int type, java.lang.String subtype)
1050                    throws com.liferay.portal.kernel.exception.SystemException;
1051    
1052            /**
1053            * Returns the number of roles that the user has permission to view where type = &#63; and subtype = &#63;.
1054            *
1055            * @param type the type
1056            * @param subtype the subtype
1057            * @return the number of matching roles that the user has permission to view
1058            * @throws SystemException if a system exception occurred
1059            */
1060            public int filterCountByT_S(int type, java.lang.String subtype)
1061                    throws com.liferay.portal.kernel.exception.SystemException;
1062    
1063            /**
1064            * Returns the number of roles where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1065            *
1066            * @param companyId the company ID
1067            * @param classNameId the class name ID
1068            * @param classPK the class p k
1069            * @return the number of matching roles
1070            * @throws SystemException if a system exception occurred
1071            */
1072            public int countByC_C_C(long companyId, long classNameId, long classPK)
1073                    throws com.liferay.portal.kernel.exception.SystemException;
1074    
1075            /**
1076            * Returns the number of roles.
1077            *
1078            * @return the number of roles
1079            * @throws SystemException if a system exception occurred
1080            */
1081            public int countAll()
1082                    throws com.liferay.portal.kernel.exception.SystemException;
1083    
1084            /**
1085            * Returns all the groups associated with the role.
1086            *
1087            * @param pk the primary key of the role
1088            * @return the groups associated with the role
1089            * @throws SystemException if a system exception occurred
1090            */
1091            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk)
1092                    throws com.liferay.portal.kernel.exception.SystemException;
1093    
1094            /**
1095            * Returns a range of all the groups associated with the role.
1096            *
1097            * <p>
1098            * 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.
1099            * </p>
1100            *
1101            * @param pk the primary key of the role
1102            * @param start the lower bound of the range of roles
1103            * @param end the upper bound of the range of roles (not inclusive)
1104            * @return the range of groups associated with the role
1105            * @throws SystemException if a system exception occurred
1106            */
1107            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
1108                    int start, int end)
1109                    throws com.liferay.portal.kernel.exception.SystemException;
1110    
1111            /**
1112            * Returns an ordered range of all the groups associated with the role.
1113            *
1114            * <p>
1115            * 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.
1116            * </p>
1117            *
1118            * @param pk the primary key of the role
1119            * @param start the lower bound of the range of roles
1120            * @param end the upper bound of the range of roles (not inclusive)
1121            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1122            * @return the ordered range of groups associated with the role
1123            * @throws SystemException if a system exception occurred
1124            */
1125            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
1126                    int start, int end,
1127                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1128                    throws com.liferay.portal.kernel.exception.SystemException;
1129    
1130            /**
1131            * Returns the number of groups associated with the role.
1132            *
1133            * @param pk the primary key of the role
1134            * @return the number of groups associated with the role
1135            * @throws SystemException if a system exception occurred
1136            */
1137            public int getGroupsSize(long pk)
1138                    throws com.liferay.portal.kernel.exception.SystemException;
1139    
1140            /**
1141            * Returns <code>true</code> if the group is associated with the role.
1142            *
1143            * @param pk the primary key of the role
1144            * @param groupPK the primary key of the group
1145            * @return <code>true</code> if the group is associated with the role; <code>false</code> otherwise
1146            * @throws SystemException if a system exception occurred
1147            */
1148            public boolean containsGroup(long pk, long groupPK)
1149                    throws com.liferay.portal.kernel.exception.SystemException;
1150    
1151            /**
1152            * Returns <code>true</code> if the role has any groups associated with it.
1153            *
1154            * @param pk the primary key of the role to check for associations with groups
1155            * @return <code>true</code> if the role has any groups associated with it; <code>false</code> otherwise
1156            * @throws SystemException if a system exception occurred
1157            */
1158            public boolean containsGroups(long pk)
1159                    throws com.liferay.portal.kernel.exception.SystemException;
1160    
1161            /**
1162            * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1163            *
1164            * @param pk the primary key of the role
1165            * @param groupPK the primary key of the group
1166            * @throws SystemException if a system exception occurred
1167            */
1168            public void addGroup(long pk, long groupPK)
1169                    throws com.liferay.portal.kernel.exception.SystemException;
1170    
1171            /**
1172            * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1173            *
1174            * @param pk the primary key of the role
1175            * @param group the group
1176            * @throws SystemException if a system exception occurred
1177            */
1178            public void addGroup(long pk, com.liferay.portal.model.Group group)
1179                    throws com.liferay.portal.kernel.exception.SystemException;
1180    
1181            /**
1182            * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1183            *
1184            * @param pk the primary key of the role
1185            * @param groupPKs the primary keys of the groups
1186            * @throws SystemException if a system exception occurred
1187            */
1188            public void addGroups(long pk, long[] groupPKs)
1189                    throws com.liferay.portal.kernel.exception.SystemException;
1190    
1191            /**
1192            * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1193            *
1194            * @param pk the primary key of the role
1195            * @param groups the groups
1196            * @throws SystemException if a system exception occurred
1197            */
1198            public void addGroups(long pk,
1199                    java.util.List<com.liferay.portal.model.Group> groups)
1200                    throws com.liferay.portal.kernel.exception.SystemException;
1201    
1202            /**
1203            * Clears all associations between the role and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1204            *
1205            * @param pk the primary key of the role to clear the associated groups from
1206            * @throws SystemException if a system exception occurred
1207            */
1208            public void clearGroups(long pk)
1209                    throws com.liferay.portal.kernel.exception.SystemException;
1210    
1211            /**
1212            * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1213            *
1214            * @param pk the primary key of the role
1215            * @param groupPK the primary key of the group
1216            * @throws SystemException if a system exception occurred
1217            */
1218            public void removeGroup(long pk, long groupPK)
1219                    throws com.liferay.portal.kernel.exception.SystemException;
1220    
1221            /**
1222            * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1223            *
1224            * @param pk the primary key of the role
1225            * @param group the group
1226            * @throws SystemException if a system exception occurred
1227            */
1228            public void removeGroup(long pk, com.liferay.portal.model.Group group)
1229                    throws com.liferay.portal.kernel.exception.SystemException;
1230    
1231            /**
1232            * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1233            *
1234            * @param pk the primary key of the role
1235            * @param groupPKs the primary keys of the groups
1236            * @throws SystemException if a system exception occurred
1237            */
1238            public void removeGroups(long pk, long[] groupPKs)
1239                    throws com.liferay.portal.kernel.exception.SystemException;
1240    
1241            /**
1242            * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1243            *
1244            * @param pk the primary key of the role
1245            * @param groups the groups
1246            * @throws SystemException if a system exception occurred
1247            */
1248            public void removeGroups(long pk,
1249                    java.util.List<com.liferay.portal.model.Group> groups)
1250                    throws com.liferay.portal.kernel.exception.SystemException;
1251    
1252            /**
1253            * Sets the groups associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1254            *
1255            * @param pk the primary key of the role
1256            * @param groupPKs the primary keys of the groups to be associated with the role
1257            * @throws SystemException if a system exception occurred
1258            */
1259            public void setGroups(long pk, long[] groupPKs)
1260                    throws com.liferay.portal.kernel.exception.SystemException;
1261    
1262            /**
1263            * Sets the groups associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1264            *
1265            * @param pk the primary key of the role
1266            * @param groups the groups to be associated with the role
1267            * @throws SystemException if a system exception occurred
1268            */
1269            public void setGroups(long pk,
1270                    java.util.List<com.liferay.portal.model.Group> groups)
1271                    throws com.liferay.portal.kernel.exception.SystemException;
1272    
1273            /**
1274            * Returns all the permissions associated with the role.
1275            *
1276            * @param pk the primary key of the role
1277            * @return the permissions associated with the role
1278            * @throws SystemException if a system exception occurred
1279            */
1280            public java.util.List<com.liferay.portal.model.Permission> getPermissions(
1281                    long pk) throws com.liferay.portal.kernel.exception.SystemException;
1282    
1283            /**
1284            * Returns a range of all the permissions associated with the role.
1285            *
1286            * <p>
1287            * 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.
1288            * </p>
1289            *
1290            * @param pk the primary key of the role
1291            * @param start the lower bound of the range of roles
1292            * @param end the upper bound of the range of roles (not inclusive)
1293            * @return the range of permissions associated with the role
1294            * @throws SystemException if a system exception occurred
1295            */
1296            public java.util.List<com.liferay.portal.model.Permission> getPermissions(
1297                    long pk, int start, int end)
1298                    throws com.liferay.portal.kernel.exception.SystemException;
1299    
1300            /**
1301            * Returns an ordered range of all the permissions associated with the role.
1302            *
1303            * <p>
1304            * 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.
1305            * </p>
1306            *
1307            * @param pk the primary key of the role
1308            * @param start the lower bound of the range of roles
1309            * @param end the upper bound of the range of roles (not inclusive)
1310            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1311            * @return the ordered range of permissions associated with the role
1312            * @throws SystemException if a system exception occurred
1313            */
1314            public java.util.List<com.liferay.portal.model.Permission> getPermissions(
1315                    long pk, int start, int end,
1316                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1317                    throws com.liferay.portal.kernel.exception.SystemException;
1318    
1319            /**
1320            * Returns the number of permissions associated with the role.
1321            *
1322            * @param pk the primary key of the role
1323            * @return the number of permissions associated with the role
1324            * @throws SystemException if a system exception occurred
1325            */
1326            public int getPermissionsSize(long pk)
1327                    throws com.liferay.portal.kernel.exception.SystemException;
1328    
1329            /**
1330            * Returns <code>true</code> if the permission is associated with the role.
1331            *
1332            * @param pk the primary key of the role
1333            * @param permissionPK the primary key of the permission
1334            * @return <code>true</code> if the permission is associated with the role; <code>false</code> otherwise
1335            * @throws SystemException if a system exception occurred
1336            */
1337            public boolean containsPermission(long pk, long permissionPK)
1338                    throws com.liferay.portal.kernel.exception.SystemException;
1339    
1340            /**
1341            * Returns <code>true</code> if the role has any permissions associated with it.
1342            *
1343            * @param pk the primary key of the role to check for associations with permissions
1344            * @return <code>true</code> if the role has any permissions associated with it; <code>false</code> otherwise
1345            * @throws SystemException if a system exception occurred
1346            */
1347            public boolean containsPermissions(long pk)
1348                    throws com.liferay.portal.kernel.exception.SystemException;
1349    
1350            /**
1351            * Adds an association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1352            *
1353            * @param pk the primary key of the role
1354            * @param permissionPK the primary key of the permission
1355            * @throws SystemException if a system exception occurred
1356            */
1357            public void addPermission(long pk, long permissionPK)
1358                    throws com.liferay.portal.kernel.exception.SystemException;
1359    
1360            /**
1361            * Adds an association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1362            *
1363            * @param pk the primary key of the role
1364            * @param permission the permission
1365            * @throws SystemException if a system exception occurred
1366            */
1367            public void addPermission(long pk,
1368                    com.liferay.portal.model.Permission permission)
1369                    throws com.liferay.portal.kernel.exception.SystemException;
1370    
1371            /**
1372            * Adds an association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1373            *
1374            * @param pk the primary key of the role
1375            * @param permissionPKs the primary keys of the permissions
1376            * @throws SystemException if a system exception occurred
1377            */
1378            public void addPermissions(long pk, long[] permissionPKs)
1379                    throws com.liferay.portal.kernel.exception.SystemException;
1380    
1381            /**
1382            * Adds an association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1383            *
1384            * @param pk the primary key of the role
1385            * @param permissions the permissions
1386            * @throws SystemException if a system exception occurred
1387            */
1388            public void addPermissions(long pk,
1389                    java.util.List<com.liferay.portal.model.Permission> permissions)
1390                    throws com.liferay.portal.kernel.exception.SystemException;
1391    
1392            /**
1393            * Clears all associations between the role and its permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1394            *
1395            * @param pk the primary key of the role to clear the associated permissions from
1396            * @throws SystemException if a system exception occurred
1397            */
1398            public void clearPermissions(long pk)
1399                    throws com.liferay.portal.kernel.exception.SystemException;
1400    
1401            /**
1402            * Removes the association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1403            *
1404            * @param pk the primary key of the role
1405            * @param permissionPK the primary key of the permission
1406            * @throws SystemException if a system exception occurred
1407            */
1408            public void removePermission(long pk, long permissionPK)
1409                    throws com.liferay.portal.kernel.exception.SystemException;
1410    
1411            /**
1412            * Removes the association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1413            *
1414            * @param pk the primary key of the role
1415            * @param permission the permission
1416            * @throws SystemException if a system exception occurred
1417            */
1418            public void removePermission(long pk,
1419                    com.liferay.portal.model.Permission permission)
1420                    throws com.liferay.portal.kernel.exception.SystemException;
1421    
1422            /**
1423            * Removes the association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1424            *
1425            * @param pk the primary key of the role
1426            * @param permissionPKs the primary keys of the permissions
1427            * @throws SystemException if a system exception occurred
1428            */
1429            public void removePermissions(long pk, long[] permissionPKs)
1430                    throws com.liferay.portal.kernel.exception.SystemException;
1431    
1432            /**
1433            * Removes the association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1434            *
1435            * @param pk the primary key of the role
1436            * @param permissions the permissions
1437            * @throws SystemException if a system exception occurred
1438            */
1439            public void removePermissions(long pk,
1440                    java.util.List<com.liferay.portal.model.Permission> permissions)
1441                    throws com.liferay.portal.kernel.exception.SystemException;
1442    
1443            /**
1444            * Sets the permissions associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1445            *
1446            * @param pk the primary key of the role
1447            * @param permissionPKs the primary keys of the permissions to be associated with the role
1448            * @throws SystemException if a system exception occurred
1449            */
1450            public void setPermissions(long pk, long[] permissionPKs)
1451                    throws com.liferay.portal.kernel.exception.SystemException;
1452    
1453            /**
1454            * Sets the permissions associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1455            *
1456            * @param pk the primary key of the role
1457            * @param permissions the permissions to be associated with the role
1458            * @throws SystemException if a system exception occurred
1459            */
1460            public void setPermissions(long pk,
1461                    java.util.List<com.liferay.portal.model.Permission> permissions)
1462                    throws com.liferay.portal.kernel.exception.SystemException;
1463    
1464            /**
1465            * Returns all the users associated with the role.
1466            *
1467            * @param pk the primary key of the role
1468            * @return the users associated with the role
1469            * @throws SystemException if a system exception occurred
1470            */
1471            public java.util.List<com.liferay.portal.model.User> getUsers(long pk)
1472                    throws com.liferay.portal.kernel.exception.SystemException;
1473    
1474            /**
1475            * Returns a range of all the users associated with the role.
1476            *
1477            * <p>
1478            * 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.
1479            * </p>
1480            *
1481            * @param pk the primary key of the role
1482            * @param start the lower bound of the range of roles
1483            * @param end the upper bound of the range of roles (not inclusive)
1484            * @return the range of users associated with the role
1485            * @throws SystemException if a system exception occurred
1486            */
1487            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
1488                    int start, int end)
1489                    throws com.liferay.portal.kernel.exception.SystemException;
1490    
1491            /**
1492            * Returns an ordered range of all the users associated with the role.
1493            *
1494            * <p>
1495            * 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.
1496            * </p>
1497            *
1498            * @param pk the primary key of the role
1499            * @param start the lower bound of the range of roles
1500            * @param end the upper bound of the range of roles (not inclusive)
1501            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1502            * @return the ordered range of users associated with the role
1503            * @throws SystemException if a system exception occurred
1504            */
1505            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
1506                    int start, int end,
1507                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1508                    throws com.liferay.portal.kernel.exception.SystemException;
1509    
1510            /**
1511            * Returns the number of users associated with the role.
1512            *
1513            * @param pk the primary key of the role
1514            * @return the number of users associated with the role
1515            * @throws SystemException if a system exception occurred
1516            */
1517            public int getUsersSize(long pk)
1518                    throws com.liferay.portal.kernel.exception.SystemException;
1519    
1520            /**
1521            * Returns <code>true</code> if the user is associated with the role.
1522            *
1523            * @param pk the primary key of the role
1524            * @param userPK the primary key of the user
1525            * @return <code>true</code> if the user is associated with the role; <code>false</code> otherwise
1526            * @throws SystemException if a system exception occurred
1527            */
1528            public boolean containsUser(long pk, long userPK)
1529                    throws com.liferay.portal.kernel.exception.SystemException;
1530    
1531            /**
1532            * Returns <code>true</code> if the role has any users associated with it.
1533            *
1534            * @param pk the primary key of the role to check for associations with users
1535            * @return <code>true</code> if the role has any users associated with it; <code>false</code> otherwise
1536            * @throws SystemException if a system exception occurred
1537            */
1538            public boolean containsUsers(long pk)
1539                    throws com.liferay.portal.kernel.exception.SystemException;
1540    
1541            /**
1542            * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1543            *
1544            * @param pk the primary key of the role
1545            * @param userPK the primary key of the user
1546            * @throws SystemException if a system exception occurred
1547            */
1548            public void addUser(long pk, long userPK)
1549                    throws com.liferay.portal.kernel.exception.SystemException;
1550    
1551            /**
1552            * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1553            *
1554            * @param pk the primary key of the role
1555            * @param user the user
1556            * @throws SystemException if a system exception occurred
1557            */
1558            public void addUser(long pk, com.liferay.portal.model.User user)
1559                    throws com.liferay.portal.kernel.exception.SystemException;
1560    
1561            /**
1562            * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1563            *
1564            * @param pk the primary key of the role
1565            * @param userPKs the primary keys of the users
1566            * @throws SystemException if a system exception occurred
1567            */
1568            public void addUsers(long pk, long[] userPKs)
1569                    throws com.liferay.portal.kernel.exception.SystemException;
1570    
1571            /**
1572            * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1573            *
1574            * @param pk the primary key of the role
1575            * @param users the users
1576            * @throws SystemException if a system exception occurred
1577            */
1578            public void addUsers(long pk,
1579                    java.util.List<com.liferay.portal.model.User> users)
1580                    throws com.liferay.portal.kernel.exception.SystemException;
1581    
1582            /**
1583            * Clears all associations between the role and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1584            *
1585            * @param pk the primary key of the role to clear the associated users from
1586            * @throws SystemException if a system exception occurred
1587            */
1588            public void clearUsers(long pk)
1589                    throws com.liferay.portal.kernel.exception.SystemException;
1590    
1591            /**
1592            * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1593            *
1594            * @param pk the primary key of the role
1595            * @param userPK the primary key of the user
1596            * @throws SystemException if a system exception occurred
1597            */
1598            public void removeUser(long pk, long userPK)
1599                    throws com.liferay.portal.kernel.exception.SystemException;
1600    
1601            /**
1602            * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1603            *
1604            * @param pk the primary key of the role
1605            * @param user the user
1606            * @throws SystemException if a system exception occurred
1607            */
1608            public void removeUser(long pk, com.liferay.portal.model.User user)
1609                    throws com.liferay.portal.kernel.exception.SystemException;
1610    
1611            /**
1612            * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1613            *
1614            * @param pk the primary key of the role
1615            * @param userPKs the primary keys of the users
1616            * @throws SystemException if a system exception occurred
1617            */
1618            public void removeUsers(long pk, long[] userPKs)
1619                    throws com.liferay.portal.kernel.exception.SystemException;
1620    
1621            /**
1622            * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1623            *
1624            * @param pk the primary key of the role
1625            * @param users the users
1626            * @throws SystemException if a system exception occurred
1627            */
1628            public void removeUsers(long pk,
1629                    java.util.List<com.liferay.portal.model.User> users)
1630                    throws com.liferay.portal.kernel.exception.SystemException;
1631    
1632            /**
1633            * Sets the users associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1634            *
1635            * @param pk the primary key of the role
1636            * @param userPKs the primary keys of the users to be associated with the role
1637            * @throws SystemException if a system exception occurred
1638            */
1639            public void setUsers(long pk, long[] userPKs)
1640                    throws com.liferay.portal.kernel.exception.SystemException;
1641    
1642            /**
1643            * Sets the users associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1644            *
1645            * @param pk the primary key of the role
1646            * @param users the users to be associated with the role
1647            * @throws SystemException if a system exception occurred
1648            */
1649            public void setUsers(long pk,
1650                    java.util.List<com.liferay.portal.model.User> users)
1651                    throws com.liferay.portal.kernel.exception.SystemException;
1652    
1653            public Role remove(Role role) throws SystemException;
1654    }