001    /**
002     * Copyright (c) 2000-2013 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.model.Role;
018    
019    /**
020     * The persistence interface for the role service.
021     *
022     * <p>
023     * Caching information and settings can be found in <code>portal.properties</code>
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see RolePersistenceImpl
028     * @see RoleUtil
029     * @generated
030     */
031    public interface RolePersistence extends BasePersistence<Role> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * 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.
036             */
037    
038            /**
039            * Returns all the roles where uuid = &#63;.
040            *
041            * @param uuid the uuid
042            * @return the matching roles
043            * @throws SystemException if a system exception occurred
044            */
045            public java.util.List<com.liferay.portal.model.Role> findByUuid(
046                    java.lang.String uuid)
047                    throws com.liferay.portal.kernel.exception.SystemException;
048    
049            /**
050            * Returns a range of all the roles where uuid = &#63;.
051            *
052            * <p>
053            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
054            * </p>
055            *
056            * @param uuid the uuid
057            * @param start the lower bound of the range of roles
058            * @param end the upper bound of the range of roles (not inclusive)
059            * @return the range of matching roles
060            * @throws SystemException if a system exception occurred
061            */
062            public java.util.List<com.liferay.portal.model.Role> findByUuid(
063                    java.lang.String uuid, int start, int end)
064                    throws com.liferay.portal.kernel.exception.SystemException;
065    
066            /**
067            * Returns an ordered range of all the roles where uuid = &#63;.
068            *
069            * <p>
070            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
071            * </p>
072            *
073            * @param uuid the uuid
074            * @param start the lower bound of the range of roles
075            * @param end the upper bound of the range of roles (not inclusive)
076            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
077            * @return the ordered range of matching roles
078            * @throws SystemException if a system exception occurred
079            */
080            public java.util.List<com.liferay.portal.model.Role> findByUuid(
081                    java.lang.String uuid, int start, int end,
082                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
083                    throws com.liferay.portal.kernel.exception.SystemException;
084    
085            /**
086            * Returns the first role in the ordered set where uuid = &#63;.
087            *
088            * @param uuid the uuid
089            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
090            * @return the first matching role
091            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
092            * @throws SystemException if a system exception occurred
093            */
094            public com.liferay.portal.model.Role findByUuid_First(
095                    java.lang.String uuid,
096                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
097                    throws com.liferay.portal.NoSuchRoleException,
098                            com.liferay.portal.kernel.exception.SystemException;
099    
100            /**
101            * Returns the first role in the ordered set where uuid = &#63;.
102            *
103            * @param uuid the uuid
104            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
105            * @return the first matching role, or <code>null</code> if a matching role could not be found
106            * @throws SystemException if a system exception occurred
107            */
108            public com.liferay.portal.model.Role fetchByUuid_First(
109                    java.lang.String uuid,
110                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
111                    throws com.liferay.portal.kernel.exception.SystemException;
112    
113            /**
114            * Returns the last role in the ordered set where uuid = &#63;.
115            *
116            * @param uuid the uuid
117            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
118            * @return the last matching role
119            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
120            * @throws SystemException if a system exception occurred
121            */
122            public com.liferay.portal.model.Role findByUuid_Last(
123                    java.lang.String uuid,
124                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
125                    throws com.liferay.portal.NoSuchRoleException,
126                            com.liferay.portal.kernel.exception.SystemException;
127    
128            /**
129            * Returns the last role in the ordered set where uuid = &#63;.
130            *
131            * @param uuid the uuid
132            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
133            * @return the last matching role, or <code>null</code> if a matching role could not be found
134            * @throws SystemException if a system exception occurred
135            */
136            public com.liferay.portal.model.Role fetchByUuid_Last(
137                    java.lang.String uuid,
138                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139                    throws com.liferay.portal.kernel.exception.SystemException;
140    
141            /**
142            * Returns the roles before and after the current role in the ordered set where uuid = &#63;.
143            *
144            * @param roleId the primary key of the current role
145            * @param uuid the uuid
146            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
147            * @return the previous, current, and next role
148            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
149            * @throws SystemException if a system exception occurred
150            */
151            public com.liferay.portal.model.Role[] findByUuid_PrevAndNext(long roleId,
152                    java.lang.String uuid,
153                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
154                    throws com.liferay.portal.NoSuchRoleException,
155                            com.liferay.portal.kernel.exception.SystemException;
156    
157            /**
158            * Returns all the roles that the user has permission to view where uuid = &#63;.
159            *
160            * @param uuid the uuid
161            * @return the matching roles that the user has permission to view
162            * @throws SystemException if a system exception occurred
163            */
164            public java.util.List<com.liferay.portal.model.Role> filterFindByUuid(
165                    java.lang.String uuid)
166                    throws com.liferay.portal.kernel.exception.SystemException;
167    
168            /**
169            * Returns a range of all the roles that the user has permission to view where uuid = &#63;.
170            *
171            * <p>
172            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
173            * </p>
174            *
175            * @param uuid the uuid
176            * @param start the lower bound of the range of roles
177            * @param end the upper bound of the range of roles (not inclusive)
178            * @return the range of matching roles that the user has permission to view
179            * @throws SystemException if a system exception occurred
180            */
181            public java.util.List<com.liferay.portal.model.Role> filterFindByUuid(
182                    java.lang.String uuid, int start, int end)
183                    throws com.liferay.portal.kernel.exception.SystemException;
184    
185            /**
186            * Returns an ordered range of all the roles that the user has permissions to view where uuid = &#63;.
187            *
188            * <p>
189            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
190            * </p>
191            *
192            * @param uuid the uuid
193            * @param start the lower bound of the range of roles
194            * @param end the upper bound of the range of roles (not inclusive)
195            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
196            * @return the ordered range of matching roles that the user has permission to view
197            * @throws SystemException if a system exception occurred
198            */
199            public java.util.List<com.liferay.portal.model.Role> filterFindByUuid(
200                    java.lang.String uuid, int start, int end,
201                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202                    throws com.liferay.portal.kernel.exception.SystemException;
203    
204            /**
205            * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where uuid = &#63;.
206            *
207            * @param roleId the primary key of the current role
208            * @param uuid the uuid
209            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
210            * @return the previous, current, and next role
211            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
212            * @throws SystemException if a system exception occurred
213            */
214            public com.liferay.portal.model.Role[] filterFindByUuid_PrevAndNext(
215                    long roleId, java.lang.String uuid,
216                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
217                    throws com.liferay.portal.NoSuchRoleException,
218                            com.liferay.portal.kernel.exception.SystemException;
219    
220            /**
221            * Removes all the roles where uuid = &#63; from the database.
222            *
223            * @param uuid the uuid
224            * @throws SystemException if a system exception occurred
225            */
226            public void removeByUuid(java.lang.String uuid)
227                    throws com.liferay.portal.kernel.exception.SystemException;
228    
229            /**
230            * Returns the number of roles where uuid = &#63;.
231            *
232            * @param uuid the uuid
233            * @return the number of matching roles
234            * @throws SystemException if a system exception occurred
235            */
236            public int countByUuid(java.lang.String uuid)
237                    throws com.liferay.portal.kernel.exception.SystemException;
238    
239            /**
240            * Returns the number of roles that the user has permission to view where uuid = &#63;.
241            *
242            * @param uuid the uuid
243            * @return the number of matching roles that the user has permission to view
244            * @throws SystemException if a system exception occurred
245            */
246            public int filterCountByUuid(java.lang.String uuid)
247                    throws com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Returns all the roles where uuid = &#63; and companyId = &#63;.
251            *
252            * @param uuid the uuid
253            * @param companyId the company ID
254            * @return the matching roles
255            * @throws SystemException if a system exception occurred
256            */
257            public java.util.List<com.liferay.portal.model.Role> findByUuid_C(
258                    java.lang.String uuid, long companyId)
259                    throws com.liferay.portal.kernel.exception.SystemException;
260    
261            /**
262            * Returns a range of all the roles where uuid = &#63; and companyId = &#63;.
263            *
264            * <p>
265            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
266            * </p>
267            *
268            * @param uuid the uuid
269            * @param companyId the company ID
270            * @param start the lower bound of the range of roles
271            * @param end the upper bound of the range of roles (not inclusive)
272            * @return the range of matching roles
273            * @throws SystemException if a system exception occurred
274            */
275            public java.util.List<com.liferay.portal.model.Role> findByUuid_C(
276                    java.lang.String uuid, long companyId, int start, int end)
277                    throws com.liferay.portal.kernel.exception.SystemException;
278    
279            /**
280            * Returns an ordered range of all the roles where uuid = &#63; and companyId = &#63;.
281            *
282            * <p>
283            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
284            * </p>
285            *
286            * @param uuid the uuid
287            * @param companyId the company ID
288            * @param start the lower bound of the range of roles
289            * @param end the upper bound of the range of roles (not inclusive)
290            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
291            * @return the ordered range of matching roles
292            * @throws SystemException if a system exception occurred
293            */
294            public java.util.List<com.liferay.portal.model.Role> findByUuid_C(
295                    java.lang.String uuid, long companyId, int start, int end,
296                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
297                    throws com.liferay.portal.kernel.exception.SystemException;
298    
299            /**
300            * Returns the first role in the ordered set where uuid = &#63; and companyId = &#63;.
301            *
302            * @param uuid the uuid
303            * @param companyId the company ID
304            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
305            * @return the first matching role
306            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
307            * @throws SystemException if a system exception occurred
308            */
309            public com.liferay.portal.model.Role findByUuid_C_First(
310                    java.lang.String uuid, long companyId,
311                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
312                    throws com.liferay.portal.NoSuchRoleException,
313                            com.liferay.portal.kernel.exception.SystemException;
314    
315            /**
316            * Returns the first role in the ordered set where uuid = &#63; and companyId = &#63;.
317            *
318            * @param uuid the uuid
319            * @param companyId the company ID
320            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
321            * @return the first matching role, or <code>null</code> if a matching role could not be found
322            * @throws SystemException if a system exception occurred
323            */
324            public com.liferay.portal.model.Role fetchByUuid_C_First(
325                    java.lang.String uuid, long companyId,
326                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
327                    throws com.liferay.portal.kernel.exception.SystemException;
328    
329            /**
330            * Returns the last role in the ordered set where uuid = &#63; and companyId = &#63;.
331            *
332            * @param uuid the uuid
333            * @param companyId the company ID
334            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
335            * @return the last matching role
336            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
337            * @throws SystemException if a system exception occurred
338            */
339            public com.liferay.portal.model.Role findByUuid_C_Last(
340                    java.lang.String uuid, long companyId,
341                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
342                    throws com.liferay.portal.NoSuchRoleException,
343                            com.liferay.portal.kernel.exception.SystemException;
344    
345            /**
346            * Returns the last role in the ordered set where uuid = &#63; and companyId = &#63;.
347            *
348            * @param uuid the uuid
349            * @param companyId the company ID
350            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
351            * @return the last matching role, or <code>null</code> if a matching role could not be found
352            * @throws SystemException if a system exception occurred
353            */
354            public com.liferay.portal.model.Role fetchByUuid_C_Last(
355                    java.lang.String uuid, long companyId,
356                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
357                    throws com.liferay.portal.kernel.exception.SystemException;
358    
359            /**
360            * Returns the roles before and after the current role in the ordered set where uuid = &#63; and companyId = &#63;.
361            *
362            * @param roleId the primary key of the current role
363            * @param uuid the uuid
364            * @param companyId the company ID
365            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
366            * @return the previous, current, and next role
367            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
368            * @throws SystemException if a system exception occurred
369            */
370            public com.liferay.portal.model.Role[] findByUuid_C_PrevAndNext(
371                    long roleId, java.lang.String uuid, long companyId,
372                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
373                    throws com.liferay.portal.NoSuchRoleException,
374                            com.liferay.portal.kernel.exception.SystemException;
375    
376            /**
377            * Returns all the roles that the user has permission to view where uuid = &#63; and companyId = &#63;.
378            *
379            * @param uuid the uuid
380            * @param companyId the company ID
381            * @return the matching roles that the user has permission to view
382            * @throws SystemException if a system exception occurred
383            */
384            public java.util.List<com.liferay.portal.model.Role> filterFindByUuid_C(
385                    java.lang.String uuid, long companyId)
386                    throws com.liferay.portal.kernel.exception.SystemException;
387    
388            /**
389            * Returns a range of all the roles that the user has permission to view where uuid = &#63; and companyId = &#63;.
390            *
391            * <p>
392            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
393            * </p>
394            *
395            * @param uuid the uuid
396            * @param companyId the company ID
397            * @param start the lower bound of the range of roles
398            * @param end the upper bound of the range of roles (not inclusive)
399            * @return the range of matching roles that the user has permission to view
400            * @throws SystemException if a system exception occurred
401            */
402            public java.util.List<com.liferay.portal.model.Role> filterFindByUuid_C(
403                    java.lang.String uuid, long companyId, int start, int end)
404                    throws com.liferay.portal.kernel.exception.SystemException;
405    
406            /**
407            * Returns an ordered range of all the roles that the user has permissions to view where uuid = &#63; and companyId = &#63;.
408            *
409            * <p>
410            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
411            * </p>
412            *
413            * @param uuid the uuid
414            * @param companyId the company ID
415            * @param start the lower bound of the range of roles
416            * @param end the upper bound of the range of roles (not inclusive)
417            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
418            * @return the ordered range of matching roles that the user has permission to view
419            * @throws SystemException if a system exception occurred
420            */
421            public java.util.List<com.liferay.portal.model.Role> filterFindByUuid_C(
422                    java.lang.String uuid, long companyId, int start, int end,
423                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
424                    throws com.liferay.portal.kernel.exception.SystemException;
425    
426            /**
427            * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where uuid = &#63; and companyId = &#63;.
428            *
429            * @param roleId the primary key of the current role
430            * @param uuid the uuid
431            * @param companyId the company ID
432            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
433            * @return the previous, current, and next role
434            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
435            * @throws SystemException if a system exception occurred
436            */
437            public com.liferay.portal.model.Role[] filterFindByUuid_C_PrevAndNext(
438                    long roleId, java.lang.String uuid, long companyId,
439                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
440                    throws com.liferay.portal.NoSuchRoleException,
441                            com.liferay.portal.kernel.exception.SystemException;
442    
443            /**
444            * Removes all the roles where uuid = &#63; and companyId = &#63; from the database.
445            *
446            * @param uuid the uuid
447            * @param companyId the company ID
448            * @throws SystemException if a system exception occurred
449            */
450            public void removeByUuid_C(java.lang.String uuid, long companyId)
451                    throws com.liferay.portal.kernel.exception.SystemException;
452    
453            /**
454            * Returns the number of roles where uuid = &#63; and companyId = &#63;.
455            *
456            * @param uuid the uuid
457            * @param companyId the company ID
458            * @return the number of matching roles
459            * @throws SystemException if a system exception occurred
460            */
461            public int countByUuid_C(java.lang.String uuid, long companyId)
462                    throws com.liferay.portal.kernel.exception.SystemException;
463    
464            /**
465            * Returns the number of roles that the user has permission to view where uuid = &#63; and companyId = &#63;.
466            *
467            * @param uuid the uuid
468            * @param companyId the company ID
469            * @return the number of matching roles that the user has permission to view
470            * @throws SystemException if a system exception occurred
471            */
472            public int filterCountByUuid_C(java.lang.String uuid, long companyId)
473                    throws com.liferay.portal.kernel.exception.SystemException;
474    
475            /**
476            * Returns all the roles where companyId = &#63;.
477            *
478            * @param companyId the company ID
479            * @return the matching roles
480            * @throws SystemException if a system exception occurred
481            */
482            public java.util.List<com.liferay.portal.model.Role> findByCompanyId(
483                    long companyId)
484                    throws com.liferay.portal.kernel.exception.SystemException;
485    
486            /**
487            * Returns a range of all the roles where companyId = &#63;.
488            *
489            * <p>
490            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
491            * </p>
492            *
493            * @param companyId the company ID
494            * @param start the lower bound of the range of roles
495            * @param end the upper bound of the range of roles (not inclusive)
496            * @return the range of matching roles
497            * @throws SystemException if a system exception occurred
498            */
499            public java.util.List<com.liferay.portal.model.Role> findByCompanyId(
500                    long companyId, int start, int end)
501                    throws com.liferay.portal.kernel.exception.SystemException;
502    
503            /**
504            * Returns an ordered range of all the roles where companyId = &#63;.
505            *
506            * <p>
507            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
508            * </p>
509            *
510            * @param companyId the company ID
511            * @param start the lower bound of the range of roles
512            * @param end the upper bound of the range of roles (not inclusive)
513            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
514            * @return the ordered range of matching roles
515            * @throws SystemException if a system exception occurred
516            */
517            public java.util.List<com.liferay.portal.model.Role> findByCompanyId(
518                    long companyId, int start, int end,
519                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
520                    throws com.liferay.portal.kernel.exception.SystemException;
521    
522            /**
523            * Returns the first role in the ordered set where companyId = &#63;.
524            *
525            * @param companyId the company ID
526            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
527            * @return the first matching role
528            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
529            * @throws SystemException if a system exception occurred
530            */
531            public com.liferay.portal.model.Role findByCompanyId_First(long companyId,
532                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
533                    throws com.liferay.portal.NoSuchRoleException,
534                            com.liferay.portal.kernel.exception.SystemException;
535    
536            /**
537            * Returns the first role in the ordered set where companyId = &#63;.
538            *
539            * @param companyId the company ID
540            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
541            * @return the first matching role, or <code>null</code> if a matching role could not be found
542            * @throws SystemException if a system exception occurred
543            */
544            public com.liferay.portal.model.Role fetchByCompanyId_First(
545                    long companyId,
546                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
547                    throws com.liferay.portal.kernel.exception.SystemException;
548    
549            /**
550            * Returns the last role in the ordered set where companyId = &#63;.
551            *
552            * @param companyId the company ID
553            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
554            * @return the last matching role
555            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
556            * @throws SystemException if a system exception occurred
557            */
558            public com.liferay.portal.model.Role findByCompanyId_Last(long companyId,
559                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
560                    throws com.liferay.portal.NoSuchRoleException,
561                            com.liferay.portal.kernel.exception.SystemException;
562    
563            /**
564            * Returns the last role in the ordered set where companyId = &#63;.
565            *
566            * @param companyId the company ID
567            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
568            * @return the last matching role, or <code>null</code> if a matching role could not be found
569            * @throws SystemException if a system exception occurred
570            */
571            public com.liferay.portal.model.Role fetchByCompanyId_Last(long companyId,
572                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
573                    throws com.liferay.portal.kernel.exception.SystemException;
574    
575            /**
576            * Returns the roles before and after the current role in the ordered set where companyId = &#63;.
577            *
578            * @param roleId the primary key of the current role
579            * @param companyId the company ID
580            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
581            * @return the previous, current, and next role
582            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
583            * @throws SystemException if a system exception occurred
584            */
585            public com.liferay.portal.model.Role[] findByCompanyId_PrevAndNext(
586                    long roleId, long companyId,
587                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
588                    throws com.liferay.portal.NoSuchRoleException,
589                            com.liferay.portal.kernel.exception.SystemException;
590    
591            /**
592            * Returns all the roles that the user has permission to view where companyId = &#63;.
593            *
594            * @param companyId the company ID
595            * @return the matching roles that the user has permission to view
596            * @throws SystemException if a system exception occurred
597            */
598            public java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
599                    long companyId)
600                    throws com.liferay.portal.kernel.exception.SystemException;
601    
602            /**
603            * Returns a range of all the roles that the user has permission to view where companyId = &#63;.
604            *
605            * <p>
606            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
607            * </p>
608            *
609            * @param companyId the company ID
610            * @param start the lower bound of the range of roles
611            * @param end the upper bound of the range of roles (not inclusive)
612            * @return the range of matching roles that the user has permission to view
613            * @throws SystemException if a system exception occurred
614            */
615            public java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
616                    long companyId, int start, int end)
617                    throws com.liferay.portal.kernel.exception.SystemException;
618    
619            /**
620            * Returns an ordered range of all the roles that the user has permissions to view where companyId = &#63;.
621            *
622            * <p>
623            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
624            * </p>
625            *
626            * @param companyId the company ID
627            * @param start the lower bound of the range of roles
628            * @param end the upper bound of the range of roles (not inclusive)
629            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
630            * @return the ordered range of matching roles that the user has permission to view
631            * @throws SystemException if a system exception occurred
632            */
633            public java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
634                    long companyId, int start, int end,
635                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
636                    throws com.liferay.portal.kernel.exception.SystemException;
637    
638            /**
639            * 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;.
640            *
641            * @param roleId the primary key of the current role
642            * @param companyId the company ID
643            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
644            * @return the previous, current, and next role
645            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
646            * @throws SystemException if a system exception occurred
647            */
648            public com.liferay.portal.model.Role[] filterFindByCompanyId_PrevAndNext(
649                    long roleId, long companyId,
650                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
651                    throws com.liferay.portal.NoSuchRoleException,
652                            com.liferay.portal.kernel.exception.SystemException;
653    
654            /**
655            * Removes all the roles where companyId = &#63; from the database.
656            *
657            * @param companyId the company ID
658            * @throws SystemException if a system exception occurred
659            */
660            public void removeByCompanyId(long companyId)
661                    throws com.liferay.portal.kernel.exception.SystemException;
662    
663            /**
664            * Returns the number of roles where companyId = &#63;.
665            *
666            * @param companyId the company ID
667            * @return the number of matching roles
668            * @throws SystemException if a system exception occurred
669            */
670            public int countByCompanyId(long companyId)
671                    throws com.liferay.portal.kernel.exception.SystemException;
672    
673            /**
674            * Returns the number of roles that the user has permission to view where companyId = &#63;.
675            *
676            * @param companyId the company ID
677            * @return the number of matching roles that the user has permission to view
678            * @throws SystemException if a system exception occurred
679            */
680            public int filterCountByCompanyId(long companyId)
681                    throws com.liferay.portal.kernel.exception.SystemException;
682    
683            /**
684            * Returns all the roles where name = &#63;.
685            *
686            * @param name the name
687            * @return the matching roles
688            * @throws SystemException if a system exception occurred
689            */
690            public java.util.List<com.liferay.portal.model.Role> findByName(
691                    java.lang.String name)
692                    throws com.liferay.portal.kernel.exception.SystemException;
693    
694            /**
695            * Returns a range of all the roles where name = &#63;.
696            *
697            * <p>
698            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
699            * </p>
700            *
701            * @param name the name
702            * @param start the lower bound of the range of roles
703            * @param end the upper bound of the range of roles (not inclusive)
704            * @return the range of matching roles
705            * @throws SystemException if a system exception occurred
706            */
707            public java.util.List<com.liferay.portal.model.Role> findByName(
708                    java.lang.String name, int start, int end)
709                    throws com.liferay.portal.kernel.exception.SystemException;
710    
711            /**
712            * Returns an ordered range of all the roles where name = &#63;.
713            *
714            * <p>
715            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
716            * </p>
717            *
718            * @param name the name
719            * @param start the lower bound of the range of roles
720            * @param end the upper bound of the range of roles (not inclusive)
721            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
722            * @return the ordered range of matching roles
723            * @throws SystemException if a system exception occurred
724            */
725            public java.util.List<com.liferay.portal.model.Role> findByName(
726                    java.lang.String name, int start, int end,
727                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
728                    throws com.liferay.portal.kernel.exception.SystemException;
729    
730            /**
731            * Returns the first role in the ordered set where name = &#63;.
732            *
733            * @param name the name
734            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
735            * @return the first matching role
736            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
737            * @throws SystemException if a system exception occurred
738            */
739            public com.liferay.portal.model.Role findByName_First(
740                    java.lang.String name,
741                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
742                    throws com.liferay.portal.NoSuchRoleException,
743                            com.liferay.portal.kernel.exception.SystemException;
744    
745            /**
746            * Returns the first role in the ordered set where name = &#63;.
747            *
748            * @param name the name
749            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
750            * @return the first matching role, or <code>null</code> if a matching role could not be found
751            * @throws SystemException if a system exception occurred
752            */
753            public com.liferay.portal.model.Role fetchByName_First(
754                    java.lang.String name,
755                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
756                    throws com.liferay.portal.kernel.exception.SystemException;
757    
758            /**
759            * Returns the last role in the ordered set where name = &#63;.
760            *
761            * @param name the name
762            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
763            * @return the last matching role
764            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
765            * @throws SystemException if a system exception occurred
766            */
767            public com.liferay.portal.model.Role findByName_Last(
768                    java.lang.String name,
769                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
770                    throws com.liferay.portal.NoSuchRoleException,
771                            com.liferay.portal.kernel.exception.SystemException;
772    
773            /**
774            * Returns the last role in the ordered set where name = &#63;.
775            *
776            * @param name the name
777            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
778            * @return the last matching role, or <code>null</code> if a matching role could not be found
779            * @throws SystemException if a system exception occurred
780            */
781            public com.liferay.portal.model.Role fetchByName_Last(
782                    java.lang.String name,
783                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
784                    throws com.liferay.portal.kernel.exception.SystemException;
785    
786            /**
787            * Returns the roles before and after the current role in the ordered set where name = &#63;.
788            *
789            * @param roleId the primary key of the current role
790            * @param name the name
791            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
792            * @return the previous, current, and next role
793            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
794            * @throws SystemException if a system exception occurred
795            */
796            public com.liferay.portal.model.Role[] findByName_PrevAndNext(long roleId,
797                    java.lang.String name,
798                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
799                    throws com.liferay.portal.NoSuchRoleException,
800                            com.liferay.portal.kernel.exception.SystemException;
801    
802            /**
803            * Returns all the roles that the user has permission to view where name = &#63;.
804            *
805            * @param name the name
806            * @return the matching roles that the user has permission to view
807            * @throws SystemException if a system exception occurred
808            */
809            public java.util.List<com.liferay.portal.model.Role> filterFindByName(
810                    java.lang.String name)
811                    throws com.liferay.portal.kernel.exception.SystemException;
812    
813            /**
814            * Returns a range of all the roles that the user has permission to view where name = &#63;.
815            *
816            * <p>
817            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
818            * </p>
819            *
820            * @param name the name
821            * @param start the lower bound of the range of roles
822            * @param end the upper bound of the range of roles (not inclusive)
823            * @return the range of matching roles that the user has permission to view
824            * @throws SystemException if a system exception occurred
825            */
826            public java.util.List<com.liferay.portal.model.Role> filterFindByName(
827                    java.lang.String name, int start, int end)
828                    throws com.liferay.portal.kernel.exception.SystemException;
829    
830            /**
831            * Returns an ordered range of all the roles that the user has permissions to view where name = &#63;.
832            *
833            * <p>
834            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
835            * </p>
836            *
837            * @param name the name
838            * @param start the lower bound of the range of roles
839            * @param end the upper bound of the range of roles (not inclusive)
840            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
841            * @return the ordered range of matching roles that the user has permission to view
842            * @throws SystemException if a system exception occurred
843            */
844            public java.util.List<com.liferay.portal.model.Role> filterFindByName(
845                    java.lang.String name, int start, int end,
846                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
847                    throws com.liferay.portal.kernel.exception.SystemException;
848    
849            /**
850            * 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;.
851            *
852            * @param roleId the primary key of the current role
853            * @param name the name
854            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
855            * @return the previous, current, and next role
856            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
857            * @throws SystemException if a system exception occurred
858            */
859            public com.liferay.portal.model.Role[] filterFindByName_PrevAndNext(
860                    long roleId, java.lang.String name,
861                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
862                    throws com.liferay.portal.NoSuchRoleException,
863                            com.liferay.portal.kernel.exception.SystemException;
864    
865            /**
866            * Removes all the roles where name = &#63; from the database.
867            *
868            * @param name the name
869            * @throws SystemException if a system exception occurred
870            */
871            public void removeByName(java.lang.String name)
872                    throws com.liferay.portal.kernel.exception.SystemException;
873    
874            /**
875            * Returns the number of roles where name = &#63;.
876            *
877            * @param name the name
878            * @return the number of matching roles
879            * @throws SystemException if a system exception occurred
880            */
881            public int countByName(java.lang.String name)
882                    throws com.liferay.portal.kernel.exception.SystemException;
883    
884            /**
885            * Returns the number of roles that the user has permission to view where name = &#63;.
886            *
887            * @param name the name
888            * @return the number of matching roles that the user has permission to view
889            * @throws SystemException if a system exception occurred
890            */
891            public int filterCountByName(java.lang.String name)
892                    throws com.liferay.portal.kernel.exception.SystemException;
893    
894            /**
895            * Returns all the roles where type = &#63;.
896            *
897            * @param type the type
898            * @return the matching roles
899            * @throws SystemException if a system exception occurred
900            */
901            public java.util.List<com.liferay.portal.model.Role> findByType(int type)
902                    throws com.liferay.portal.kernel.exception.SystemException;
903    
904            /**
905            * Returns a range of all the roles where type = &#63;.
906            *
907            * <p>
908            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
909            * </p>
910            *
911            * @param type the type
912            * @param start the lower bound of the range of roles
913            * @param end the upper bound of the range of roles (not inclusive)
914            * @return the range of matching roles
915            * @throws SystemException if a system exception occurred
916            */
917            public java.util.List<com.liferay.portal.model.Role> findByType(int type,
918                    int start, int end)
919                    throws com.liferay.portal.kernel.exception.SystemException;
920    
921            /**
922            * Returns an ordered range of all the roles where type = &#63;.
923            *
924            * <p>
925            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
926            * </p>
927            *
928            * @param type the type
929            * @param start the lower bound of the range of roles
930            * @param end the upper bound of the range of roles (not inclusive)
931            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
932            * @return the ordered range of matching roles
933            * @throws SystemException if a system exception occurred
934            */
935            public java.util.List<com.liferay.portal.model.Role> findByType(int type,
936                    int start, int end,
937                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
938                    throws com.liferay.portal.kernel.exception.SystemException;
939    
940            /**
941            * Returns the first role in the ordered set where type = &#63;.
942            *
943            * @param type the type
944            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
945            * @return the first matching role
946            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
947            * @throws SystemException if a system exception occurred
948            */
949            public com.liferay.portal.model.Role findByType_First(int type,
950                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
951                    throws com.liferay.portal.NoSuchRoleException,
952                            com.liferay.portal.kernel.exception.SystemException;
953    
954            /**
955            * Returns the first role in the ordered set where type = &#63;.
956            *
957            * @param type the type
958            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
959            * @return the first matching role, or <code>null</code> if a matching role could not be found
960            * @throws SystemException if a system exception occurred
961            */
962            public com.liferay.portal.model.Role fetchByType_First(int type,
963                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
964                    throws com.liferay.portal.kernel.exception.SystemException;
965    
966            /**
967            * Returns the last role in the ordered set where type = &#63;.
968            *
969            * @param type the type
970            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
971            * @return the last matching role
972            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
973            * @throws SystemException if a system exception occurred
974            */
975            public com.liferay.portal.model.Role findByType_Last(int type,
976                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
977                    throws com.liferay.portal.NoSuchRoleException,
978                            com.liferay.portal.kernel.exception.SystemException;
979    
980            /**
981            * Returns the last role in the ordered set where type = &#63;.
982            *
983            * @param type the type
984            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
985            * @return the last matching role, or <code>null</code> if a matching role could not be found
986            * @throws SystemException if a system exception occurred
987            */
988            public com.liferay.portal.model.Role fetchByType_Last(int type,
989                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
990                    throws com.liferay.portal.kernel.exception.SystemException;
991    
992            /**
993            * Returns the roles before and after the current role in the ordered set where type = &#63;.
994            *
995            * @param roleId the primary key of the current role
996            * @param type the type
997            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
998            * @return the previous, current, and next role
999            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1000            * @throws SystemException if a system exception occurred
1001            */
1002            public com.liferay.portal.model.Role[] findByType_PrevAndNext(long roleId,
1003                    int type,
1004                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1005                    throws com.liferay.portal.NoSuchRoleException,
1006                            com.liferay.portal.kernel.exception.SystemException;
1007    
1008            /**
1009            * Returns all the roles that the user has permission to view where type = &#63;.
1010            *
1011            * @param type the type
1012            * @return the matching roles that the user has permission to view
1013            * @throws SystemException if a system exception occurred
1014            */
1015            public java.util.List<com.liferay.portal.model.Role> filterFindByType(
1016                    int type) throws com.liferay.portal.kernel.exception.SystemException;
1017    
1018            /**
1019            * Returns a range of all the roles that the user has permission to view where type = &#63;.
1020            *
1021            * <p>
1022            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1023            * </p>
1024            *
1025            * @param type the type
1026            * @param start the lower bound of the range of roles
1027            * @param end the upper bound of the range of roles (not inclusive)
1028            * @return the range of matching roles that the user has permission to view
1029            * @throws SystemException if a system exception occurred
1030            */
1031            public java.util.List<com.liferay.portal.model.Role> filterFindByType(
1032                    int type, int start, int end)
1033                    throws com.liferay.portal.kernel.exception.SystemException;
1034    
1035            /**
1036            * Returns an ordered range of all the roles that the user has permissions to view where type = &#63;.
1037            *
1038            * <p>
1039            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1040            * </p>
1041            *
1042            * @param type the type
1043            * @param start the lower bound of the range of roles
1044            * @param end the upper bound of the range of roles (not inclusive)
1045            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1046            * @return the ordered range of matching roles that the user has permission to view
1047            * @throws SystemException if a system exception occurred
1048            */
1049            public java.util.List<com.liferay.portal.model.Role> filterFindByType(
1050                    int type, int start, int end,
1051                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1052                    throws com.liferay.portal.kernel.exception.SystemException;
1053    
1054            /**
1055            * 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;.
1056            *
1057            * @param roleId the primary key of the current role
1058            * @param type the type
1059            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1060            * @return the previous, current, and next role
1061            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1062            * @throws SystemException if a system exception occurred
1063            */
1064            public com.liferay.portal.model.Role[] filterFindByType_PrevAndNext(
1065                    long roleId, int type,
1066                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1067                    throws com.liferay.portal.NoSuchRoleException,
1068                            com.liferay.portal.kernel.exception.SystemException;
1069    
1070            /**
1071            * Removes all the roles where type = &#63; from the database.
1072            *
1073            * @param type the type
1074            * @throws SystemException if a system exception occurred
1075            */
1076            public void removeByType(int type)
1077                    throws com.liferay.portal.kernel.exception.SystemException;
1078    
1079            /**
1080            * Returns the number of roles where type = &#63;.
1081            *
1082            * @param type the type
1083            * @return the number of matching roles
1084            * @throws SystemException if a system exception occurred
1085            */
1086            public int countByType(int type)
1087                    throws com.liferay.portal.kernel.exception.SystemException;
1088    
1089            /**
1090            * Returns the number of roles that the user has permission to view where type = &#63;.
1091            *
1092            * @param type the type
1093            * @return the number of matching roles that the user has permission to view
1094            * @throws SystemException if a system exception occurred
1095            */
1096            public int filterCountByType(int type)
1097                    throws com.liferay.portal.kernel.exception.SystemException;
1098    
1099            /**
1100            * Returns all the roles where subtype = &#63;.
1101            *
1102            * @param subtype the subtype
1103            * @return the matching roles
1104            * @throws SystemException if a system exception occurred
1105            */
1106            public java.util.List<com.liferay.portal.model.Role> findBySubtype(
1107                    java.lang.String subtype)
1108                    throws com.liferay.portal.kernel.exception.SystemException;
1109    
1110            /**
1111            * Returns a range of all the roles where subtype = &#63;.
1112            *
1113            * <p>
1114            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1115            * </p>
1116            *
1117            * @param subtype the subtype
1118            * @param start the lower bound of the range of roles
1119            * @param end the upper bound of the range of roles (not inclusive)
1120            * @return the range of matching roles
1121            * @throws SystemException if a system exception occurred
1122            */
1123            public java.util.List<com.liferay.portal.model.Role> findBySubtype(
1124                    java.lang.String subtype, int start, int end)
1125                    throws com.liferay.portal.kernel.exception.SystemException;
1126    
1127            /**
1128            * Returns an ordered range of all the roles where subtype = &#63;.
1129            *
1130            * <p>
1131            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1132            * </p>
1133            *
1134            * @param subtype the subtype
1135            * @param start the lower bound of the range of roles
1136            * @param end the upper bound of the range of roles (not inclusive)
1137            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1138            * @return the ordered range of matching roles
1139            * @throws SystemException if a system exception occurred
1140            */
1141            public java.util.List<com.liferay.portal.model.Role> findBySubtype(
1142                    java.lang.String subtype, int start, int end,
1143                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1144                    throws com.liferay.portal.kernel.exception.SystemException;
1145    
1146            /**
1147            * Returns the first role in the ordered set where subtype = &#63;.
1148            *
1149            * @param subtype the subtype
1150            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1151            * @return the first matching role
1152            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
1153            * @throws SystemException if a system exception occurred
1154            */
1155            public com.liferay.portal.model.Role findBySubtype_First(
1156                    java.lang.String subtype,
1157                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1158                    throws com.liferay.portal.NoSuchRoleException,
1159                            com.liferay.portal.kernel.exception.SystemException;
1160    
1161            /**
1162            * Returns the first role in the ordered set where subtype = &#63;.
1163            *
1164            * @param subtype the subtype
1165            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1166            * @return the first matching role, or <code>null</code> if a matching role could not be found
1167            * @throws SystemException if a system exception occurred
1168            */
1169            public com.liferay.portal.model.Role fetchBySubtype_First(
1170                    java.lang.String subtype,
1171                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1172                    throws com.liferay.portal.kernel.exception.SystemException;
1173    
1174            /**
1175            * Returns the last role in the ordered set where subtype = &#63;.
1176            *
1177            * @param subtype the subtype
1178            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1179            * @return the last matching role
1180            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
1181            * @throws SystemException if a system exception occurred
1182            */
1183            public com.liferay.portal.model.Role findBySubtype_Last(
1184                    java.lang.String subtype,
1185                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1186                    throws com.liferay.portal.NoSuchRoleException,
1187                            com.liferay.portal.kernel.exception.SystemException;
1188    
1189            /**
1190            * Returns the last role in the ordered set where subtype = &#63;.
1191            *
1192            * @param subtype the subtype
1193            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1194            * @return the last matching role, or <code>null</code> if a matching role could not be found
1195            * @throws SystemException if a system exception occurred
1196            */
1197            public com.liferay.portal.model.Role fetchBySubtype_Last(
1198                    java.lang.String subtype,
1199                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1200                    throws com.liferay.portal.kernel.exception.SystemException;
1201    
1202            /**
1203            * Returns the roles before and after the current role in the ordered set where subtype = &#63;.
1204            *
1205            * @param roleId the primary key of the current role
1206            * @param subtype the subtype
1207            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1208            * @return the previous, current, and next role
1209            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1210            * @throws SystemException if a system exception occurred
1211            */
1212            public com.liferay.portal.model.Role[] findBySubtype_PrevAndNext(
1213                    long roleId, java.lang.String subtype,
1214                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1215                    throws com.liferay.portal.NoSuchRoleException,
1216                            com.liferay.portal.kernel.exception.SystemException;
1217    
1218            /**
1219            * Returns all the roles that the user has permission to view where subtype = &#63;.
1220            *
1221            * @param subtype the subtype
1222            * @return the matching roles that the user has permission to view
1223            * @throws SystemException if a system exception occurred
1224            */
1225            public java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
1226                    java.lang.String subtype)
1227                    throws com.liferay.portal.kernel.exception.SystemException;
1228    
1229            /**
1230            * Returns a range of all the roles that the user has permission to view where subtype = &#63;.
1231            *
1232            * <p>
1233            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1234            * </p>
1235            *
1236            * @param subtype the subtype
1237            * @param start the lower bound of the range of roles
1238            * @param end the upper bound of the range of roles (not inclusive)
1239            * @return the range of matching roles that the user has permission to view
1240            * @throws SystemException if a system exception occurred
1241            */
1242            public java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
1243                    java.lang.String subtype, int start, int end)
1244                    throws com.liferay.portal.kernel.exception.SystemException;
1245    
1246            /**
1247            * Returns an ordered range of all the roles that the user has permissions to view where subtype = &#63;.
1248            *
1249            * <p>
1250            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1251            * </p>
1252            *
1253            * @param subtype the subtype
1254            * @param start the lower bound of the range of roles
1255            * @param end the upper bound of the range of roles (not inclusive)
1256            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1257            * @return the ordered range of matching roles that the user has permission to view
1258            * @throws SystemException if a system exception occurred
1259            */
1260            public java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
1261                    java.lang.String subtype, int start, int end,
1262                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1263                    throws com.liferay.portal.kernel.exception.SystemException;
1264    
1265            /**
1266            * 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;.
1267            *
1268            * @param roleId the primary key of the current role
1269            * @param subtype the subtype
1270            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1271            * @return the previous, current, and next role
1272            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1273            * @throws SystemException if a system exception occurred
1274            */
1275            public com.liferay.portal.model.Role[] filterFindBySubtype_PrevAndNext(
1276                    long roleId, java.lang.String subtype,
1277                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1278                    throws com.liferay.portal.NoSuchRoleException,
1279                            com.liferay.portal.kernel.exception.SystemException;
1280    
1281            /**
1282            * Removes all the roles where subtype = &#63; from the database.
1283            *
1284            * @param subtype the subtype
1285            * @throws SystemException if a system exception occurred
1286            */
1287            public void removeBySubtype(java.lang.String subtype)
1288                    throws com.liferay.portal.kernel.exception.SystemException;
1289    
1290            /**
1291            * Returns the number of roles where subtype = &#63;.
1292            *
1293            * @param subtype the subtype
1294            * @return the number of matching roles
1295            * @throws SystemException if a system exception occurred
1296            */
1297            public int countBySubtype(java.lang.String subtype)
1298                    throws com.liferay.portal.kernel.exception.SystemException;
1299    
1300            /**
1301            * Returns the number of roles that the user has permission to view where subtype = &#63;.
1302            *
1303            * @param subtype the subtype
1304            * @return the number of matching roles that the user has permission to view
1305            * @throws SystemException if a system exception occurred
1306            */
1307            public int filterCountBySubtype(java.lang.String subtype)
1308                    throws com.liferay.portal.kernel.exception.SystemException;
1309    
1310            /**
1311            * Returns the role where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found.
1312            *
1313            * @param companyId the company ID
1314            * @param name the name
1315            * @return the matching role
1316            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
1317            * @throws SystemException if a system exception occurred
1318            */
1319            public com.liferay.portal.model.Role findByC_N(long companyId,
1320                    java.lang.String name)
1321                    throws com.liferay.portal.NoSuchRoleException,
1322                            com.liferay.portal.kernel.exception.SystemException;
1323    
1324            /**
1325            * Returns the role where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
1326            *
1327            * @param companyId the company ID
1328            * @param name the name
1329            * @return the matching role, or <code>null</code> if a matching role could not be found
1330            * @throws SystemException if a system exception occurred
1331            */
1332            public com.liferay.portal.model.Role fetchByC_N(long companyId,
1333                    java.lang.String name)
1334                    throws com.liferay.portal.kernel.exception.SystemException;
1335    
1336            /**
1337            * 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.
1338            *
1339            * @param companyId the company ID
1340            * @param name the name
1341            * @param retrieveFromCache whether to use the finder cache
1342            * @return the matching role, or <code>null</code> if a matching role could not be found
1343            * @throws SystemException if a system exception occurred
1344            */
1345            public com.liferay.portal.model.Role fetchByC_N(long companyId,
1346                    java.lang.String name, boolean retrieveFromCache)
1347                    throws com.liferay.portal.kernel.exception.SystemException;
1348    
1349            /**
1350            * Removes the role where companyId = &#63; and name = &#63; from the database.
1351            *
1352            * @param companyId the company ID
1353            * @param name the name
1354            * @return the role that was removed
1355            * @throws SystemException if a system exception occurred
1356            */
1357            public com.liferay.portal.model.Role removeByC_N(long companyId,
1358                    java.lang.String name)
1359                    throws com.liferay.portal.NoSuchRoleException,
1360                            com.liferay.portal.kernel.exception.SystemException;
1361    
1362            /**
1363            * Returns the number of roles where companyId = &#63; and name = &#63;.
1364            *
1365            * @param companyId the company ID
1366            * @param name the name
1367            * @return the number of matching roles
1368            * @throws SystemException if a system exception occurred
1369            */
1370            public int countByC_N(long companyId, java.lang.String name)
1371                    throws com.liferay.portal.kernel.exception.SystemException;
1372    
1373            /**
1374            * Returns all the roles where companyId = &#63; and type = &#63;.
1375            *
1376            * @param companyId the company ID
1377            * @param type the type
1378            * @return the matching roles
1379            * @throws SystemException if a system exception occurred
1380            */
1381            public java.util.List<com.liferay.portal.model.Role> findByC_T(
1382                    long companyId, int type)
1383                    throws com.liferay.portal.kernel.exception.SystemException;
1384    
1385            /**
1386            * Returns a range of all the roles where companyId = &#63; and type = &#63;.
1387            *
1388            * <p>
1389            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1390            * </p>
1391            *
1392            * @param companyId the company ID
1393            * @param type the type
1394            * @param start the lower bound of the range of roles
1395            * @param end the upper bound of the range of roles (not inclusive)
1396            * @return the range of matching roles
1397            * @throws SystemException if a system exception occurred
1398            */
1399            public java.util.List<com.liferay.portal.model.Role> findByC_T(
1400                    long companyId, int type, int start, int end)
1401                    throws com.liferay.portal.kernel.exception.SystemException;
1402    
1403            /**
1404            * Returns an ordered range of all the roles where companyId = &#63; and type = &#63;.
1405            *
1406            * <p>
1407            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1408            * </p>
1409            *
1410            * @param companyId the company ID
1411            * @param type the type
1412            * @param start the lower bound of the range of roles
1413            * @param end the upper bound of the range of roles (not inclusive)
1414            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1415            * @return the ordered range of matching roles
1416            * @throws SystemException if a system exception occurred
1417            */
1418            public java.util.List<com.liferay.portal.model.Role> findByC_T(
1419                    long companyId, int type, int start, int end,
1420                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1421                    throws com.liferay.portal.kernel.exception.SystemException;
1422    
1423            /**
1424            * Returns the first role in the ordered set where companyId = &#63; and type = &#63;.
1425            *
1426            * @param companyId the company ID
1427            * @param type the type
1428            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1429            * @return the first matching role
1430            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
1431            * @throws SystemException if a system exception occurred
1432            */
1433            public com.liferay.portal.model.Role findByC_T_First(long companyId,
1434                    int type,
1435                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1436                    throws com.liferay.portal.NoSuchRoleException,
1437                            com.liferay.portal.kernel.exception.SystemException;
1438    
1439            /**
1440            * Returns the first role in the ordered set where companyId = &#63; and type = &#63;.
1441            *
1442            * @param companyId the company ID
1443            * @param type the type
1444            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1445            * @return the first matching role, or <code>null</code> if a matching role could not be found
1446            * @throws SystemException if a system exception occurred
1447            */
1448            public com.liferay.portal.model.Role fetchByC_T_First(long companyId,
1449                    int type,
1450                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1451                    throws com.liferay.portal.kernel.exception.SystemException;
1452    
1453            /**
1454            * Returns the last role in the ordered set where companyId = &#63; and type = &#63;.
1455            *
1456            * @param companyId the company ID
1457            * @param type the type
1458            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1459            * @return the last matching role
1460            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
1461            * @throws SystemException if a system exception occurred
1462            */
1463            public com.liferay.portal.model.Role findByC_T_Last(long companyId,
1464                    int type,
1465                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1466                    throws com.liferay.portal.NoSuchRoleException,
1467                            com.liferay.portal.kernel.exception.SystemException;
1468    
1469            /**
1470            * Returns the last role in the ordered set where companyId = &#63; and type = &#63;.
1471            *
1472            * @param companyId the company ID
1473            * @param type the type
1474            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1475            * @return the last matching role, or <code>null</code> if a matching role could not be found
1476            * @throws SystemException if a system exception occurred
1477            */
1478            public com.liferay.portal.model.Role fetchByC_T_Last(long companyId,
1479                    int type,
1480                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1481                    throws com.liferay.portal.kernel.exception.SystemException;
1482    
1483            /**
1484            * Returns the roles before and after the current role in the ordered set where companyId = &#63; and type = &#63;.
1485            *
1486            * @param roleId the primary key of the current role
1487            * @param companyId the company ID
1488            * @param type the type
1489            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1490            * @return the previous, current, and next role
1491            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1492            * @throws SystemException if a system exception occurred
1493            */
1494            public com.liferay.portal.model.Role[] findByC_T_PrevAndNext(long roleId,
1495                    long companyId, int type,
1496                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1497                    throws com.liferay.portal.NoSuchRoleException,
1498                            com.liferay.portal.kernel.exception.SystemException;
1499    
1500            /**
1501            * Returns all the roles that the user has permission to view where companyId = &#63; and type = &#63;.
1502            *
1503            * @param companyId the company ID
1504            * @param type the type
1505            * @return the matching roles that the user has permission to view
1506            * @throws SystemException if a system exception occurred
1507            */
1508            public java.util.List<com.liferay.portal.model.Role> filterFindByC_T(
1509                    long companyId, int type)
1510                    throws com.liferay.portal.kernel.exception.SystemException;
1511    
1512            /**
1513            * Returns a range of all the roles that the user has permission to view where companyId = &#63; and type = &#63;.
1514            *
1515            * <p>
1516            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1517            * </p>
1518            *
1519            * @param companyId the company ID
1520            * @param type the type
1521            * @param start the lower bound of the range of roles
1522            * @param end the upper bound of the range of roles (not inclusive)
1523            * @return the range of matching roles that the user has permission to view
1524            * @throws SystemException if a system exception occurred
1525            */
1526            public java.util.List<com.liferay.portal.model.Role> filterFindByC_T(
1527                    long companyId, int type, int start, int end)
1528                    throws com.liferay.portal.kernel.exception.SystemException;
1529    
1530            /**
1531            * Returns an ordered range of all the roles that the user has permissions to view where companyId = &#63; and type = &#63;.
1532            *
1533            * <p>
1534            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1535            * </p>
1536            *
1537            * @param companyId the company ID
1538            * @param type the type
1539            * @param start the lower bound of the range of roles
1540            * @param end the upper bound of the range of roles (not inclusive)
1541            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1542            * @return the ordered range of matching roles that the user has permission to view
1543            * @throws SystemException if a system exception occurred
1544            */
1545            public java.util.List<com.liferay.portal.model.Role> filterFindByC_T(
1546                    long companyId, int type, int start, int end,
1547                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1548                    throws com.liferay.portal.kernel.exception.SystemException;
1549    
1550            /**
1551            * 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; and type = &#63;.
1552            *
1553            * @param roleId the primary key of the current role
1554            * @param companyId the company ID
1555            * @param type the type
1556            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1557            * @return the previous, current, and next role
1558            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1559            * @throws SystemException if a system exception occurred
1560            */
1561            public com.liferay.portal.model.Role[] filterFindByC_T_PrevAndNext(
1562                    long roleId, long companyId, int type,
1563                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1564                    throws com.liferay.portal.NoSuchRoleException,
1565                            com.liferay.portal.kernel.exception.SystemException;
1566    
1567            /**
1568            * Returns all the roles that the user has permission to view where companyId = &#63; and type = any &#63;.
1569            *
1570            * @param companyId the company ID
1571            * @param types the types
1572            * @return the matching roles that the user has permission to view
1573            * @throws SystemException if a system exception occurred
1574            */
1575            public java.util.List<com.liferay.portal.model.Role> filterFindByC_T(
1576                    long companyId, int[] types)
1577                    throws com.liferay.portal.kernel.exception.SystemException;
1578    
1579            /**
1580            * Returns a range of all the roles that the user has permission to view where companyId = &#63; and type = any &#63;.
1581            *
1582            * <p>
1583            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1584            * </p>
1585            *
1586            * @param companyId the company ID
1587            * @param types the types
1588            * @param start the lower bound of the range of roles
1589            * @param end the upper bound of the range of roles (not inclusive)
1590            * @return the range of matching roles that the user has permission to view
1591            * @throws SystemException if a system exception occurred
1592            */
1593            public java.util.List<com.liferay.portal.model.Role> filterFindByC_T(
1594                    long companyId, int[] types, int start, int end)
1595                    throws com.liferay.portal.kernel.exception.SystemException;
1596    
1597            /**
1598            * Returns an ordered range of all the roles that the user has permission to view where companyId = &#63; and type = any &#63;.
1599            *
1600            * <p>
1601            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1602            * </p>
1603            *
1604            * @param companyId the company ID
1605            * @param types the types
1606            * @param start the lower bound of the range of roles
1607            * @param end the upper bound of the range of roles (not inclusive)
1608            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1609            * @return the ordered range of matching roles that the user has permission to view
1610            * @throws SystemException if a system exception occurred
1611            */
1612            public java.util.List<com.liferay.portal.model.Role> filterFindByC_T(
1613                    long companyId, int[] types, int start, int end,
1614                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1615                    throws com.liferay.portal.kernel.exception.SystemException;
1616    
1617            /**
1618            * Returns all the roles where companyId = &#63; and type = any &#63;.
1619            *
1620            * <p>
1621            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1622            * </p>
1623            *
1624            * @param companyId the company ID
1625            * @param types the types
1626            * @return the matching roles
1627            * @throws SystemException if a system exception occurred
1628            */
1629            public java.util.List<com.liferay.portal.model.Role> findByC_T(
1630                    long companyId, int[] types)
1631                    throws com.liferay.portal.kernel.exception.SystemException;
1632    
1633            /**
1634            * Returns a range of all the roles where companyId = &#63; and type = any &#63;.
1635            *
1636            * <p>
1637            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1638            * </p>
1639            *
1640            * @param companyId the company ID
1641            * @param types the types
1642            * @param start the lower bound of the range of roles
1643            * @param end the upper bound of the range of roles (not inclusive)
1644            * @return the range of matching roles
1645            * @throws SystemException if a system exception occurred
1646            */
1647            public java.util.List<com.liferay.portal.model.Role> findByC_T(
1648                    long companyId, int[] types, int start, int end)
1649                    throws com.liferay.portal.kernel.exception.SystemException;
1650    
1651            /**
1652            * Returns an ordered range of all the roles where companyId = &#63; and type = any &#63;.
1653            *
1654            * <p>
1655            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1656            * </p>
1657            *
1658            * @param companyId the company ID
1659            * @param types the types
1660            * @param start the lower bound of the range of roles
1661            * @param end the upper bound of the range of roles (not inclusive)
1662            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1663            * @return the ordered range of matching roles
1664            * @throws SystemException if a system exception occurred
1665            */
1666            public java.util.List<com.liferay.portal.model.Role> findByC_T(
1667                    long companyId, int[] types, int start, int end,
1668                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1669                    throws com.liferay.portal.kernel.exception.SystemException;
1670    
1671            /**
1672            * Removes all the roles where companyId = &#63; and type = &#63; from the database.
1673            *
1674            * @param companyId the company ID
1675            * @param type the type
1676            * @throws SystemException if a system exception occurred
1677            */
1678            public void removeByC_T(long companyId, int type)
1679                    throws com.liferay.portal.kernel.exception.SystemException;
1680    
1681            /**
1682            * Returns the number of roles where companyId = &#63; and type = &#63;.
1683            *
1684            * @param companyId the company ID
1685            * @param type the type
1686            * @return the number of matching roles
1687            * @throws SystemException if a system exception occurred
1688            */
1689            public int countByC_T(long companyId, int type)
1690                    throws com.liferay.portal.kernel.exception.SystemException;
1691    
1692            /**
1693            * Returns the number of roles where companyId = &#63; and type = any &#63;.
1694            *
1695            * @param companyId the company ID
1696            * @param types the types
1697            * @return the number of matching roles
1698            * @throws SystemException if a system exception occurred
1699            */
1700            public int countByC_T(long companyId, int[] types)
1701                    throws com.liferay.portal.kernel.exception.SystemException;
1702    
1703            /**
1704            * Returns the number of roles that the user has permission to view where companyId = &#63; and type = &#63;.
1705            *
1706            * @param companyId the company ID
1707            * @param type the type
1708            * @return the number of matching roles that the user has permission to view
1709            * @throws SystemException if a system exception occurred
1710            */
1711            public int filterCountByC_T(long companyId, int type)
1712                    throws com.liferay.portal.kernel.exception.SystemException;
1713    
1714            /**
1715            * Returns the number of roles that the user has permission to view where companyId = &#63; and type = any &#63;.
1716            *
1717            * @param companyId the company ID
1718            * @param types the types
1719            * @return the number of matching roles that the user has permission to view
1720            * @throws SystemException if a system exception occurred
1721            */
1722            public int filterCountByC_T(long companyId, int[] types)
1723                    throws com.liferay.portal.kernel.exception.SystemException;
1724    
1725            /**
1726            * Returns all the roles where type = &#63; and subtype = &#63;.
1727            *
1728            * @param type the type
1729            * @param subtype the subtype
1730            * @return the matching roles
1731            * @throws SystemException if a system exception occurred
1732            */
1733            public java.util.List<com.liferay.portal.model.Role> findByT_S(int type,
1734                    java.lang.String subtype)
1735                    throws com.liferay.portal.kernel.exception.SystemException;
1736    
1737            /**
1738            * Returns a range of all the roles where type = &#63; and subtype = &#63;.
1739            *
1740            * <p>
1741            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1742            * </p>
1743            *
1744            * @param type the type
1745            * @param subtype the subtype
1746            * @param start the lower bound of the range of roles
1747            * @param end the upper bound of the range of roles (not inclusive)
1748            * @return the range of matching roles
1749            * @throws SystemException if a system exception occurred
1750            */
1751            public java.util.List<com.liferay.portal.model.Role> findByT_S(int type,
1752                    java.lang.String subtype, int start, int end)
1753                    throws com.liferay.portal.kernel.exception.SystemException;
1754    
1755            /**
1756            * Returns an ordered range of all the roles where type = &#63; and subtype = &#63;.
1757            *
1758            * <p>
1759            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1760            * </p>
1761            *
1762            * @param type the type
1763            * @param subtype the subtype
1764            * @param start the lower bound of the range of roles
1765            * @param end the upper bound of the range of roles (not inclusive)
1766            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1767            * @return the ordered range of matching roles
1768            * @throws SystemException if a system exception occurred
1769            */
1770            public java.util.List<com.liferay.portal.model.Role> findByT_S(int type,
1771                    java.lang.String subtype, int start, int end,
1772                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1773                    throws com.liferay.portal.kernel.exception.SystemException;
1774    
1775            /**
1776            * Returns the first role in the ordered set where type = &#63; and subtype = &#63;.
1777            *
1778            * @param type the type
1779            * @param subtype the subtype
1780            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1781            * @return the first matching role
1782            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
1783            * @throws SystemException if a system exception occurred
1784            */
1785            public com.liferay.portal.model.Role findByT_S_First(int type,
1786                    java.lang.String subtype,
1787                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1788                    throws com.liferay.portal.NoSuchRoleException,
1789                            com.liferay.portal.kernel.exception.SystemException;
1790    
1791            /**
1792            * Returns the first role in the ordered set where type = &#63; and subtype = &#63;.
1793            *
1794            * @param type the type
1795            * @param subtype the subtype
1796            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1797            * @return the first matching role, or <code>null</code> if a matching role could not be found
1798            * @throws SystemException if a system exception occurred
1799            */
1800            public com.liferay.portal.model.Role fetchByT_S_First(int type,
1801                    java.lang.String subtype,
1802                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1803                    throws com.liferay.portal.kernel.exception.SystemException;
1804    
1805            /**
1806            * Returns the last role in the ordered set where type = &#63; and subtype = &#63;.
1807            *
1808            * @param type the type
1809            * @param subtype the subtype
1810            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1811            * @return the last matching role
1812            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
1813            * @throws SystemException if a system exception occurred
1814            */
1815            public com.liferay.portal.model.Role findByT_S_Last(int type,
1816                    java.lang.String subtype,
1817                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1818                    throws com.liferay.portal.NoSuchRoleException,
1819                            com.liferay.portal.kernel.exception.SystemException;
1820    
1821            /**
1822            * Returns the last role in the ordered set where type = &#63; and subtype = &#63;.
1823            *
1824            * @param type the type
1825            * @param subtype the subtype
1826            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1827            * @return the last matching role, or <code>null</code> if a matching role could not be found
1828            * @throws SystemException if a system exception occurred
1829            */
1830            public com.liferay.portal.model.Role fetchByT_S_Last(int type,
1831                    java.lang.String subtype,
1832                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1833                    throws com.liferay.portal.kernel.exception.SystemException;
1834    
1835            /**
1836            * Returns the roles before and after the current role in the ordered set where type = &#63; and subtype = &#63;.
1837            *
1838            * @param roleId the primary key of the current role
1839            * @param type the type
1840            * @param subtype the subtype
1841            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1842            * @return the previous, current, and next role
1843            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1844            * @throws SystemException if a system exception occurred
1845            */
1846            public com.liferay.portal.model.Role[] findByT_S_PrevAndNext(long roleId,
1847                    int type, java.lang.String subtype,
1848                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1849                    throws com.liferay.portal.NoSuchRoleException,
1850                            com.liferay.portal.kernel.exception.SystemException;
1851    
1852            /**
1853            * Returns all the roles that the user has permission to view where type = &#63; and subtype = &#63;.
1854            *
1855            * @param type the type
1856            * @param subtype the subtype
1857            * @return the matching roles that the user has permission to view
1858            * @throws SystemException if a system exception occurred
1859            */
1860            public java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
1861                    int type, java.lang.String subtype)
1862                    throws com.liferay.portal.kernel.exception.SystemException;
1863    
1864            /**
1865            * Returns a range of all the roles that the user has permission to view where type = &#63; and subtype = &#63;.
1866            *
1867            * <p>
1868            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1869            * </p>
1870            *
1871            * @param type the type
1872            * @param subtype the subtype
1873            * @param start the lower bound of the range of roles
1874            * @param end the upper bound of the range of roles (not inclusive)
1875            * @return the range of matching roles that the user has permission to view
1876            * @throws SystemException if a system exception occurred
1877            */
1878            public java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
1879                    int type, java.lang.String subtype, int start, int end)
1880                    throws com.liferay.portal.kernel.exception.SystemException;
1881    
1882            /**
1883            * Returns an ordered range of all the roles that the user has permissions to view where type = &#63; and subtype = &#63;.
1884            *
1885            * <p>
1886            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1887            * </p>
1888            *
1889            * @param type the type
1890            * @param subtype the subtype
1891            * @param start the lower bound of the range of roles
1892            * @param end the upper bound of the range of roles (not inclusive)
1893            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1894            * @return the ordered range of matching roles that the user has permission to view
1895            * @throws SystemException if a system exception occurred
1896            */
1897            public java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
1898                    int type, java.lang.String subtype, int start, int end,
1899                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1900                    throws com.liferay.portal.kernel.exception.SystemException;
1901    
1902            /**
1903            * 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;.
1904            *
1905            * @param roleId the primary key of the current role
1906            * @param type the type
1907            * @param subtype the subtype
1908            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1909            * @return the previous, current, and next role
1910            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1911            * @throws SystemException if a system exception occurred
1912            */
1913            public com.liferay.portal.model.Role[] filterFindByT_S_PrevAndNext(
1914                    long roleId, int type, java.lang.String subtype,
1915                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1916                    throws com.liferay.portal.NoSuchRoleException,
1917                            com.liferay.portal.kernel.exception.SystemException;
1918    
1919            /**
1920            * Removes all the roles where type = &#63; and subtype = &#63; from the database.
1921            *
1922            * @param type the type
1923            * @param subtype the subtype
1924            * @throws SystemException if a system exception occurred
1925            */
1926            public void removeByT_S(int type, java.lang.String subtype)
1927                    throws com.liferay.portal.kernel.exception.SystemException;
1928    
1929            /**
1930            * Returns the number of roles where type = &#63; and subtype = &#63;.
1931            *
1932            * @param type the type
1933            * @param subtype the subtype
1934            * @return the number of matching roles
1935            * @throws SystemException if a system exception occurred
1936            */
1937            public int countByT_S(int type, java.lang.String subtype)
1938                    throws com.liferay.portal.kernel.exception.SystemException;
1939    
1940            /**
1941            * Returns the number of roles that the user has permission to view where type = &#63; and subtype = &#63;.
1942            *
1943            * @param type the type
1944            * @param subtype the subtype
1945            * @return the number of matching roles that the user has permission to view
1946            * @throws SystemException if a system exception occurred
1947            */
1948            public int filterCountByT_S(int type, java.lang.String subtype)
1949                    throws com.liferay.portal.kernel.exception.SystemException;
1950    
1951            /**
1952            * 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.
1953            *
1954            * @param companyId the company ID
1955            * @param classNameId the class name ID
1956            * @param classPK the class p k
1957            * @return the matching role
1958            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
1959            * @throws SystemException if a system exception occurred
1960            */
1961            public com.liferay.portal.model.Role findByC_C_C(long companyId,
1962                    long classNameId, long classPK)
1963                    throws com.liferay.portal.NoSuchRoleException,
1964                            com.liferay.portal.kernel.exception.SystemException;
1965    
1966            /**
1967            * 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.
1968            *
1969            * @param companyId the company ID
1970            * @param classNameId the class name ID
1971            * @param classPK the class p k
1972            * @return the matching role, or <code>null</code> if a matching role could not be found
1973            * @throws SystemException if a system exception occurred
1974            */
1975            public com.liferay.portal.model.Role fetchByC_C_C(long companyId,
1976                    long classNameId, long classPK)
1977                    throws com.liferay.portal.kernel.exception.SystemException;
1978    
1979            /**
1980            * 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.
1981            *
1982            * @param companyId the company ID
1983            * @param classNameId the class name ID
1984            * @param classPK the class p k
1985            * @param retrieveFromCache whether to use the finder cache
1986            * @return the matching role, or <code>null</code> if a matching role could not be found
1987            * @throws SystemException if a system exception occurred
1988            */
1989            public com.liferay.portal.model.Role fetchByC_C_C(long companyId,
1990                    long classNameId, long classPK, boolean retrieveFromCache)
1991                    throws com.liferay.portal.kernel.exception.SystemException;
1992    
1993            /**
1994            * Removes the role where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
1995            *
1996            * @param companyId the company ID
1997            * @param classNameId the class name ID
1998            * @param classPK the class p k
1999            * @return the role that was removed
2000            * @throws SystemException if a system exception occurred
2001            */
2002            public com.liferay.portal.model.Role removeByC_C_C(long companyId,
2003                    long classNameId, long classPK)
2004                    throws com.liferay.portal.NoSuchRoleException,
2005                            com.liferay.portal.kernel.exception.SystemException;
2006    
2007            /**
2008            * Returns the number of roles where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
2009            *
2010            * @param companyId the company ID
2011            * @param classNameId the class name ID
2012            * @param classPK the class p k
2013            * @return the number of matching roles
2014            * @throws SystemException if a system exception occurred
2015            */
2016            public int countByC_C_C(long companyId, long classNameId, long classPK)
2017                    throws com.liferay.portal.kernel.exception.SystemException;
2018    
2019            /**
2020            * Caches the role in the entity cache if it is enabled.
2021            *
2022            * @param role the role
2023            */
2024            public void cacheResult(com.liferay.portal.model.Role role);
2025    
2026            /**
2027            * Caches the roles in the entity cache if it is enabled.
2028            *
2029            * @param roles the roles
2030            */
2031            public void cacheResult(java.util.List<com.liferay.portal.model.Role> roles);
2032    
2033            /**
2034            * Creates a new role with the primary key. Does not add the role to the database.
2035            *
2036            * @param roleId the primary key for the new role
2037            * @return the new role
2038            */
2039            public com.liferay.portal.model.Role create(long roleId);
2040    
2041            /**
2042            * Removes the role with the primary key from the database. Also notifies the appropriate model listeners.
2043            *
2044            * @param roleId the primary key of the role
2045            * @return the role that was removed
2046            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
2047            * @throws SystemException if a system exception occurred
2048            */
2049            public com.liferay.portal.model.Role remove(long roleId)
2050                    throws com.liferay.portal.NoSuchRoleException,
2051                            com.liferay.portal.kernel.exception.SystemException;
2052    
2053            public com.liferay.portal.model.Role updateImpl(
2054                    com.liferay.portal.model.Role role)
2055                    throws com.liferay.portal.kernel.exception.SystemException;
2056    
2057            /**
2058            * Returns the role with the primary key or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found.
2059            *
2060            * @param roleId the primary key of the role
2061            * @return the role
2062            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
2063            * @throws SystemException if a system exception occurred
2064            */
2065            public com.liferay.portal.model.Role findByPrimaryKey(long roleId)
2066                    throws com.liferay.portal.NoSuchRoleException,
2067                            com.liferay.portal.kernel.exception.SystemException;
2068    
2069            /**
2070            * Returns the role with the primary key or returns <code>null</code> if it could not be found.
2071            *
2072            * @param roleId the primary key of the role
2073            * @return the role, or <code>null</code> if a role with the primary key could not be found
2074            * @throws SystemException if a system exception occurred
2075            */
2076            public com.liferay.portal.model.Role fetchByPrimaryKey(long roleId)
2077                    throws com.liferay.portal.kernel.exception.SystemException;
2078    
2079            /**
2080            * Returns all the roles.
2081            *
2082            * @return the roles
2083            * @throws SystemException if a system exception occurred
2084            */
2085            public java.util.List<com.liferay.portal.model.Role> findAll()
2086                    throws com.liferay.portal.kernel.exception.SystemException;
2087    
2088            /**
2089            * Returns a range of all the roles.
2090            *
2091            * <p>
2092            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
2093            * </p>
2094            *
2095            * @param start the lower bound of the range of roles
2096            * @param end the upper bound of the range of roles (not inclusive)
2097            * @return the range of roles
2098            * @throws SystemException if a system exception occurred
2099            */
2100            public java.util.List<com.liferay.portal.model.Role> findAll(int start,
2101                    int end) throws com.liferay.portal.kernel.exception.SystemException;
2102    
2103            /**
2104            * Returns an ordered range of all the roles.
2105            *
2106            * <p>
2107            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
2108            * </p>
2109            *
2110            * @param start the lower bound of the range of roles
2111            * @param end the upper bound of the range of roles (not inclusive)
2112            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2113            * @return the ordered range of roles
2114            * @throws SystemException if a system exception occurred
2115            */
2116            public java.util.List<com.liferay.portal.model.Role> findAll(int start,
2117                    int end,
2118                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2119                    throws com.liferay.portal.kernel.exception.SystemException;
2120    
2121            /**
2122            * Removes all the roles from the database.
2123            *
2124            * @throws SystemException if a system exception occurred
2125            */
2126            public void removeAll()
2127                    throws com.liferay.portal.kernel.exception.SystemException;
2128    
2129            /**
2130            * Returns the number of roles.
2131            *
2132            * @return the number of roles
2133            * @throws SystemException if a system exception occurred
2134            */
2135            public int countAll()
2136                    throws com.liferay.portal.kernel.exception.SystemException;
2137    
2138            /**
2139            * Returns all the groups associated with the role.
2140            *
2141            * @param pk the primary key of the role
2142            * @return the groups associated with the role
2143            * @throws SystemException if a system exception occurred
2144            */
2145            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk)
2146                    throws com.liferay.portal.kernel.exception.SystemException;
2147    
2148            /**
2149            * Returns a range of all the groups associated with the role.
2150            *
2151            * <p>
2152            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
2153            * </p>
2154            *
2155            * @param pk the primary key of the role
2156            * @param start the lower bound of the range of roles
2157            * @param end the upper bound of the range of roles (not inclusive)
2158            * @return the range of groups associated with the role
2159            * @throws SystemException if a system exception occurred
2160            */
2161            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
2162                    int start, int end)
2163                    throws com.liferay.portal.kernel.exception.SystemException;
2164    
2165            /**
2166            * Returns an ordered range of all the groups associated with the role.
2167            *
2168            * <p>
2169            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
2170            * </p>
2171            *
2172            * @param pk the primary key of the role
2173            * @param start the lower bound of the range of roles
2174            * @param end the upper bound of the range of roles (not inclusive)
2175            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2176            * @return the ordered range of groups associated with the role
2177            * @throws SystemException if a system exception occurred
2178            */
2179            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
2180                    int start, int end,
2181                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2182                    throws com.liferay.portal.kernel.exception.SystemException;
2183    
2184            /**
2185            * Returns the number of groups associated with the role.
2186            *
2187            * @param pk the primary key of the role
2188            * @return the number of groups associated with the role
2189            * @throws SystemException if a system exception occurred
2190            */
2191            public int getGroupsSize(long pk)
2192                    throws com.liferay.portal.kernel.exception.SystemException;
2193    
2194            /**
2195            * Returns <code>true</code> if the group is associated with the role.
2196            *
2197            * @param pk the primary key of the role
2198            * @param groupPK the primary key of the group
2199            * @return <code>true</code> if the group is associated with the role; <code>false</code> otherwise
2200            * @throws SystemException if a system exception occurred
2201            */
2202            public boolean containsGroup(long pk, long groupPK)
2203                    throws com.liferay.portal.kernel.exception.SystemException;
2204    
2205            /**
2206            * Returns <code>true</code> if the role has any groups associated with it.
2207            *
2208            * @param pk the primary key of the role to check for associations with groups
2209            * @return <code>true</code> if the role has any groups associated with it; <code>false</code> otherwise
2210            * @throws SystemException if a system exception occurred
2211            */
2212            public boolean containsGroups(long pk)
2213                    throws com.liferay.portal.kernel.exception.SystemException;
2214    
2215            /**
2216            * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2217            *
2218            * @param pk the primary key of the role
2219            * @param groupPK the primary key of the group
2220            * @throws SystemException if a system exception occurred
2221            */
2222            public void addGroup(long pk, long groupPK)
2223                    throws com.liferay.portal.kernel.exception.SystemException;
2224    
2225            /**
2226            * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2227            *
2228            * @param pk the primary key of the role
2229            * @param group the group
2230            * @throws SystemException if a system exception occurred
2231            */
2232            public void addGroup(long pk, com.liferay.portal.model.Group group)
2233                    throws com.liferay.portal.kernel.exception.SystemException;
2234    
2235            /**
2236            * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2237            *
2238            * @param pk the primary key of the role
2239            * @param groupPKs the primary keys of the groups
2240            * @throws SystemException if a system exception occurred
2241            */
2242            public void addGroups(long pk, long[] groupPKs)
2243                    throws com.liferay.portal.kernel.exception.SystemException;
2244    
2245            /**
2246            * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2247            *
2248            * @param pk the primary key of the role
2249            * @param groups the groups
2250            * @throws SystemException if a system exception occurred
2251            */
2252            public void addGroups(long pk,
2253                    java.util.List<com.liferay.portal.model.Group> groups)
2254                    throws com.liferay.portal.kernel.exception.SystemException;
2255    
2256            /**
2257            * Clears all associations between the role and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2258            *
2259            * @param pk the primary key of the role to clear the associated groups from
2260            * @throws SystemException if a system exception occurred
2261            */
2262            public void clearGroups(long pk)
2263                    throws com.liferay.portal.kernel.exception.SystemException;
2264    
2265            /**
2266            * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2267            *
2268            * @param pk the primary key of the role
2269            * @param groupPK the primary key of the group
2270            * @throws SystemException if a system exception occurred
2271            */
2272            public void removeGroup(long pk, long groupPK)
2273                    throws com.liferay.portal.kernel.exception.SystemException;
2274    
2275            /**
2276            * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2277            *
2278            * @param pk the primary key of the role
2279            * @param group the group
2280            * @throws SystemException if a system exception occurred
2281            */
2282            public void removeGroup(long pk, com.liferay.portal.model.Group group)
2283                    throws com.liferay.portal.kernel.exception.SystemException;
2284    
2285            /**
2286            * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2287            *
2288            * @param pk the primary key of the role
2289            * @param groupPKs the primary keys of the groups
2290            * @throws SystemException if a system exception occurred
2291            */
2292            public void removeGroups(long pk, long[] groupPKs)
2293                    throws com.liferay.portal.kernel.exception.SystemException;
2294    
2295            /**
2296            * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2297            *
2298            * @param pk the primary key of the role
2299            * @param groups the groups
2300            * @throws SystemException if a system exception occurred
2301            */
2302            public void removeGroups(long pk,
2303                    java.util.List<com.liferay.portal.model.Group> groups)
2304                    throws com.liferay.portal.kernel.exception.SystemException;
2305    
2306            /**
2307            * 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.
2308            *
2309            * @param pk the primary key of the role
2310            * @param groupPKs the primary keys of the groups to be associated with the role
2311            * @throws SystemException if a system exception occurred
2312            */
2313            public void setGroups(long pk, long[] groupPKs)
2314                    throws com.liferay.portal.kernel.exception.SystemException;
2315    
2316            /**
2317            * 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.
2318            *
2319            * @param pk the primary key of the role
2320            * @param groups the groups to be associated with the role
2321            * @throws SystemException if a system exception occurred
2322            */
2323            public void setGroups(long pk,
2324                    java.util.List<com.liferay.portal.model.Group> groups)
2325                    throws com.liferay.portal.kernel.exception.SystemException;
2326    
2327            /**
2328            * Returns all the users associated with the role.
2329            *
2330            * @param pk the primary key of the role
2331            * @return the users associated with the role
2332            * @throws SystemException if a system exception occurred
2333            */
2334            public java.util.List<com.liferay.portal.model.User> getUsers(long pk)
2335                    throws com.liferay.portal.kernel.exception.SystemException;
2336    
2337            /**
2338            * Returns a range of all the users associated with the role.
2339            *
2340            * <p>
2341            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
2342            * </p>
2343            *
2344            * @param pk the primary key of the role
2345            * @param start the lower bound of the range of roles
2346            * @param end the upper bound of the range of roles (not inclusive)
2347            * @return the range of users associated with the role
2348            * @throws SystemException if a system exception occurred
2349            */
2350            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
2351                    int start, int end)
2352                    throws com.liferay.portal.kernel.exception.SystemException;
2353    
2354            /**
2355            * Returns an ordered range of all the users associated with the role.
2356            *
2357            * <p>
2358            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
2359            * </p>
2360            *
2361            * @param pk the primary key of the role
2362            * @param start the lower bound of the range of roles
2363            * @param end the upper bound of the range of roles (not inclusive)
2364            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2365            * @return the ordered range of users associated with the role
2366            * @throws SystemException if a system exception occurred
2367            */
2368            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
2369                    int start, int end,
2370                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2371                    throws com.liferay.portal.kernel.exception.SystemException;
2372    
2373            /**
2374            * Returns the number of users associated with the role.
2375            *
2376            * @param pk the primary key of the role
2377            * @return the number of users associated with the role
2378            * @throws SystemException if a system exception occurred
2379            */
2380            public int getUsersSize(long pk)
2381                    throws com.liferay.portal.kernel.exception.SystemException;
2382    
2383            /**
2384            * Returns <code>true</code> if the user is associated with the role.
2385            *
2386            * @param pk the primary key of the role
2387            * @param userPK the primary key of the user
2388            * @return <code>true</code> if the user is associated with the role; <code>false</code> otherwise
2389            * @throws SystemException if a system exception occurred
2390            */
2391            public boolean containsUser(long pk, long userPK)
2392                    throws com.liferay.portal.kernel.exception.SystemException;
2393    
2394            /**
2395            * Returns <code>true</code> if the role has any users associated with it.
2396            *
2397            * @param pk the primary key of the role to check for associations with users
2398            * @return <code>true</code> if the role has any users associated with it; <code>false</code> otherwise
2399            * @throws SystemException if a system exception occurred
2400            */
2401            public boolean containsUsers(long pk)
2402                    throws com.liferay.portal.kernel.exception.SystemException;
2403    
2404            /**
2405            * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2406            *
2407            * @param pk the primary key of the role
2408            * @param userPK the primary key of the user
2409            * @throws SystemException if a system exception occurred
2410            */
2411            public void addUser(long pk, long userPK)
2412                    throws com.liferay.portal.kernel.exception.SystemException;
2413    
2414            /**
2415            * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2416            *
2417            * @param pk the primary key of the role
2418            * @param user the user
2419            * @throws SystemException if a system exception occurred
2420            */
2421            public void addUser(long pk, com.liferay.portal.model.User user)
2422                    throws com.liferay.portal.kernel.exception.SystemException;
2423    
2424            /**
2425            * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2426            *
2427            * @param pk the primary key of the role
2428            * @param userPKs the primary keys of the users
2429            * @throws SystemException if a system exception occurred
2430            */
2431            public void addUsers(long pk, long[] userPKs)
2432                    throws com.liferay.portal.kernel.exception.SystemException;
2433    
2434            /**
2435            * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2436            *
2437            * @param pk the primary key of the role
2438            * @param users the users
2439            * @throws SystemException if a system exception occurred
2440            */
2441            public void addUsers(long pk,
2442                    java.util.List<com.liferay.portal.model.User> users)
2443                    throws com.liferay.portal.kernel.exception.SystemException;
2444    
2445            /**
2446            * Clears all associations between the role and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2447            *
2448            * @param pk the primary key of the role to clear the associated users from
2449            * @throws SystemException if a system exception occurred
2450            */
2451            public void clearUsers(long pk)
2452                    throws com.liferay.portal.kernel.exception.SystemException;
2453    
2454            /**
2455            * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2456            *
2457            * @param pk the primary key of the role
2458            * @param userPK the primary key of the user
2459            * @throws SystemException if a system exception occurred
2460            */
2461            public void removeUser(long pk, long userPK)
2462                    throws com.liferay.portal.kernel.exception.SystemException;
2463    
2464            /**
2465            * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2466            *
2467            * @param pk the primary key of the role
2468            * @param user the user
2469            * @throws SystemException if a system exception occurred
2470            */
2471            public void removeUser(long pk, com.liferay.portal.model.User user)
2472                    throws com.liferay.portal.kernel.exception.SystemException;
2473    
2474            /**
2475            * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2476            *
2477            * @param pk the primary key of the role
2478            * @param userPKs the primary keys of the users
2479            * @throws SystemException if a system exception occurred
2480            */
2481            public void removeUsers(long pk, long[] userPKs)
2482                    throws com.liferay.portal.kernel.exception.SystemException;
2483    
2484            /**
2485            * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2486            *
2487            * @param pk the primary key of the role
2488            * @param users the users
2489            * @throws SystemException if a system exception occurred
2490            */
2491            public void removeUsers(long pk,
2492                    java.util.List<com.liferay.portal.model.User> users)
2493                    throws com.liferay.portal.kernel.exception.SystemException;
2494    
2495            /**
2496            * 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.
2497            *
2498            * @param pk the primary key of the role
2499            * @param userPKs the primary keys of the users to be associated with the role
2500            * @throws SystemException if a system exception occurred
2501            */
2502            public void setUsers(long pk, long[] userPKs)
2503                    throws com.liferay.portal.kernel.exception.SystemException;
2504    
2505            /**
2506            * 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.
2507            *
2508            * @param pk the primary key of the role
2509            * @param users the users to be associated with the role
2510            * @throws SystemException if a system exception occurred
2511            */
2512            public void setUsers(long pk,
2513                    java.util.List<com.liferay.portal.model.User> users)
2514                    throws com.liferay.portal.kernel.exception.SystemException;
2515    }