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