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