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.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.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.model.Role;
024    import com.liferay.portal.service.ServiceContext;
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 com.liferay.portal.service.persistence.BasePersistence#clearCache()
050             */
051            public static void clearCache() {
052                    getPersistence().clearCache();
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
057             */
058            public static void clearCache(Role role) {
059                    getPersistence().clearCache(role);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery) {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery,
080                    int start, int end) {
081                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
082            }
083    
084            /**
085             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
086             */
087            public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery,
088                    int start, int end, OrderByComparator<Role> orderByComparator) {
089                    return getPersistence()
090                                       .findWithDynamicQuery(dynamicQuery, start, end,
091                            orderByComparator);
092            }
093    
094            /**
095             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
096             */
097            public static Role update(Role role) {
098                    return getPersistence().update(role);
099            }
100    
101            /**
102             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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) throws com.liferay.portal.exception.NoSuchRoleException {
2215                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
2216            }
2217    
2218            /**
2219            * 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.
2220            *
2221            * @param companyId the company ID
2222            * @param classNameId the class name ID
2223            * @param classPK the class p k
2224            * @return the matching role, or <code>null</code> if a matching role could not be found
2225            */
2226            public static Role fetchByC_C_C(long companyId, long classNameId,
2227                    long classPK) {
2228                    return getPersistence().fetchByC_C_C(companyId, classNameId, classPK);
2229            }
2230    
2231            /**
2232            * 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.
2233            *
2234            * @param companyId the company ID
2235            * @param classNameId the class name ID
2236            * @param classPK the class p k
2237            * @param retrieveFromCache whether to retrieve from the finder cache
2238            * @return the matching role, or <code>null</code> if a matching role could not be found
2239            */
2240            public static Role fetchByC_C_C(long companyId, long classNameId,
2241                    long classPK, boolean retrieveFromCache) {
2242                    return getPersistence()
2243                                       .fetchByC_C_C(companyId, classNameId, classPK,
2244                            retrieveFromCache);
2245            }
2246    
2247            /**
2248            * Removes the role where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
2249            *
2250            * @param companyId the company ID
2251            * @param classNameId the class name ID
2252            * @param classPK the class p k
2253            * @return the role that was removed
2254            */
2255            public static Role removeByC_C_C(long companyId, long classNameId,
2256                    long classPK) throws com.liferay.portal.exception.NoSuchRoleException {
2257                    return getPersistence().removeByC_C_C(companyId, classNameId, classPK);
2258            }
2259    
2260            /**
2261            * Returns the number of roles where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
2262            *
2263            * @param companyId the company ID
2264            * @param classNameId the class name ID
2265            * @param classPK the class p k
2266            * @return the number of matching roles
2267            */
2268            public static int countByC_C_C(long companyId, long classNameId,
2269                    long classPK) {
2270                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
2271            }
2272    
2273            /**
2274            * Caches the role in the entity cache if it is enabled.
2275            *
2276            * @param role the role
2277            */
2278            public static void cacheResult(Role role) {
2279                    getPersistence().cacheResult(role);
2280            }
2281    
2282            /**
2283            * Caches the roles in the entity cache if it is enabled.
2284            *
2285            * @param roles the roles
2286            */
2287            public static void cacheResult(List<Role> roles) {
2288                    getPersistence().cacheResult(roles);
2289            }
2290    
2291            /**
2292            * Creates a new role with the primary key. Does not add the role to the database.
2293            *
2294            * @param roleId the primary key for the new role
2295            * @return the new role
2296            */
2297            public static Role create(long roleId) {
2298                    return getPersistence().create(roleId);
2299            }
2300    
2301            /**
2302            * Removes the role with the primary key from the database. Also notifies the appropriate model listeners.
2303            *
2304            * @param roleId the primary key of the role
2305            * @return the role that was removed
2306            * @throws NoSuchRoleException if a role with the primary key could not be found
2307            */
2308            public static Role remove(long roleId)
2309                    throws com.liferay.portal.exception.NoSuchRoleException {
2310                    return getPersistence().remove(roleId);
2311            }
2312    
2313            public static Role updateImpl(Role role) {
2314                    return getPersistence().updateImpl(role);
2315            }
2316    
2317            /**
2318            * Returns the role with the primary key or throws a {@link NoSuchRoleException} if it could not be found.
2319            *
2320            * @param roleId the primary key of the role
2321            * @return the role
2322            * @throws NoSuchRoleException if a role with the primary key could not be found
2323            */
2324            public static Role findByPrimaryKey(long roleId)
2325                    throws com.liferay.portal.exception.NoSuchRoleException {
2326                    return getPersistence().findByPrimaryKey(roleId);
2327            }
2328    
2329            /**
2330            * Returns the role with the primary key or returns <code>null</code> if it could not be found.
2331            *
2332            * @param roleId the primary key of the role
2333            * @return the role, or <code>null</code> if a role with the primary key could not be found
2334            */
2335            public static Role fetchByPrimaryKey(long roleId) {
2336                    return getPersistence().fetchByPrimaryKey(roleId);
2337            }
2338    
2339            public static java.util.Map<java.io.Serializable, Role> fetchByPrimaryKeys(
2340                    java.util.Set<java.io.Serializable> primaryKeys) {
2341                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
2342            }
2343    
2344            /**
2345            * Returns all the roles.
2346            *
2347            * @return the roles
2348            */
2349            public static List<Role> findAll() {
2350                    return getPersistence().findAll();
2351            }
2352    
2353            /**
2354            * Returns a range of all the roles.
2355            *
2356            * <p>
2357            * 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.
2358            * </p>
2359            *
2360            * @param start the lower bound of the range of roles
2361            * @param end the upper bound of the range of roles (not inclusive)
2362            * @return the range of roles
2363            */
2364            public static List<Role> findAll(int start, int end) {
2365                    return getPersistence().findAll(start, end);
2366            }
2367    
2368            /**
2369            * Returns an ordered range of all the roles.
2370            *
2371            * <p>
2372            * 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.
2373            * </p>
2374            *
2375            * @param start the lower bound of the range of roles
2376            * @param end the upper bound of the range of roles (not inclusive)
2377            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2378            * @return the ordered range of roles
2379            */
2380            public static List<Role> findAll(int start, int end,
2381                    OrderByComparator<Role> orderByComparator) {
2382                    return getPersistence().findAll(start, end, orderByComparator);
2383            }
2384    
2385            /**
2386            * Returns an ordered range of all the roles.
2387            *
2388            * <p>
2389            * 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.
2390            * </p>
2391            *
2392            * @param start the lower bound of the range of roles
2393            * @param end the upper bound of the range of roles (not inclusive)
2394            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2395            * @param retrieveFromCache whether to retrieve from the finder cache
2396            * @return the ordered range of roles
2397            */
2398            public static List<Role> findAll(int start, int end,
2399                    OrderByComparator<Role> orderByComparator, boolean retrieveFromCache) {
2400                    return getPersistence()
2401                                       .findAll(start, end, orderByComparator, retrieveFromCache);
2402            }
2403    
2404            /**
2405            * Removes all the roles from the database.
2406            */
2407            public static void removeAll() {
2408                    getPersistence().removeAll();
2409            }
2410    
2411            /**
2412            * Returns the number of roles.
2413            *
2414            * @return the number of roles
2415            */
2416            public static int countAll() {
2417                    return getPersistence().countAll();
2418            }
2419    
2420            /**
2421            * Returns the primaryKeys of groups associated with the role.
2422            *
2423            * @param pk the primary key of the role
2424            * @return long[] of the primaryKeys of groups associated with the role
2425            */
2426            public static long[] getGroupPrimaryKeys(long pk) {
2427                    return getPersistence().getGroupPrimaryKeys(pk);
2428            }
2429    
2430            /**
2431            * Returns all the groups associated with the role.
2432            *
2433            * @param pk the primary key of the role
2434            * @return the groups associated with the role
2435            */
2436            public static List<com.liferay.portal.model.Group> getGroups(long pk) {
2437                    return getPersistence().getGroups(pk);
2438            }
2439    
2440            /**
2441            * Returns a range of all the groups associated with the role.
2442            *
2443            * <p>
2444            * 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.
2445            * </p>
2446            *
2447            * @param pk the primary key of the role
2448            * @param start the lower bound of the range of roles
2449            * @param end the upper bound of the range of roles (not inclusive)
2450            * @return the range of groups associated with the role
2451            */
2452            public static List<com.liferay.portal.model.Group> getGroups(long pk,
2453                    int start, int end) {
2454                    return getPersistence().getGroups(pk, start, end);
2455            }
2456    
2457            /**
2458            * Returns an ordered range of all the groups associated with the role.
2459            *
2460            * <p>
2461            * 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.
2462            * </p>
2463            *
2464            * @param pk the primary key of the role
2465            * @param start the lower bound of the range of roles
2466            * @param end the upper bound of the range of roles (not inclusive)
2467            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2468            * @return the ordered range of groups associated with the role
2469            */
2470            public static List<com.liferay.portal.model.Group> getGroups(long pk,
2471                    int start, int end,
2472                    OrderByComparator<com.liferay.portal.model.Group> orderByComparator) {
2473                    return getPersistence().getGroups(pk, start, end, orderByComparator);
2474            }
2475    
2476            /**
2477            * Returns the number of groups associated with the role.
2478            *
2479            * @param pk the primary key of the role
2480            * @return the number of groups associated with the role
2481            */
2482            public static int getGroupsSize(long pk) {
2483                    return getPersistence().getGroupsSize(pk);
2484            }
2485    
2486            /**
2487            * Returns <code>true</code> if the group is associated with the role.
2488            *
2489            * @param pk the primary key of the role
2490            * @param groupPK the primary key of the group
2491            * @return <code>true</code> if the group is associated with the role; <code>false</code> otherwise
2492            */
2493            public static boolean containsGroup(long pk, long groupPK) {
2494                    return getPersistence().containsGroup(pk, groupPK);
2495            }
2496    
2497            /**
2498            * Returns <code>true</code> if the role has any groups associated with it.
2499            *
2500            * @param pk the primary key of the role to check for associations with groups
2501            * @return <code>true</code> if the role has any groups associated with it; <code>false</code> otherwise
2502            */
2503            public static boolean containsGroups(long pk) {
2504                    return getPersistence().containsGroups(pk);
2505            }
2506    
2507            /**
2508            * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2509            *
2510            * @param pk the primary key of the role
2511            * @param groupPK the primary key of the group
2512            */
2513            public static void addGroup(long pk, long groupPK) {
2514                    getPersistence().addGroup(pk, groupPK);
2515            }
2516    
2517            /**
2518            * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2519            *
2520            * @param pk the primary key of the role
2521            * @param group the group
2522            */
2523            public static void addGroup(long pk, com.liferay.portal.model.Group group) {
2524                    getPersistence().addGroup(pk, group);
2525            }
2526    
2527            /**
2528            * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2529            *
2530            * @param pk the primary key of the role
2531            * @param groupPKs the primary keys of the groups
2532            */
2533            public static void addGroups(long pk, long[] groupPKs) {
2534                    getPersistence().addGroups(pk, groupPKs);
2535            }
2536    
2537            /**
2538            * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2539            *
2540            * @param pk the primary key of the role
2541            * @param groups the groups
2542            */
2543            public static void addGroups(long pk,
2544                    List<com.liferay.portal.model.Group> groups) {
2545                    getPersistence().addGroups(pk, groups);
2546            }
2547    
2548            /**
2549            * Clears all associations between the role and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2550            *
2551            * @param pk the primary key of the role to clear the associated groups from
2552            */
2553            public static void clearGroups(long pk) {
2554                    getPersistence().clearGroups(pk);
2555            }
2556    
2557            /**
2558            * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2559            *
2560            * @param pk the primary key of the role
2561            * @param groupPK the primary key of the group
2562            */
2563            public static void removeGroup(long pk, long groupPK) {
2564                    getPersistence().removeGroup(pk, groupPK);
2565            }
2566    
2567            /**
2568            * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2569            *
2570            * @param pk the primary key of the role
2571            * @param group the group
2572            */
2573            public static void removeGroup(long pk, com.liferay.portal.model.Group group) {
2574                    getPersistence().removeGroup(pk, group);
2575            }
2576    
2577            /**
2578            * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2579            *
2580            * @param pk the primary key of the role
2581            * @param groupPKs the primary keys of the groups
2582            */
2583            public static void removeGroups(long pk, long[] groupPKs) {
2584                    getPersistence().removeGroups(pk, groupPKs);
2585            }
2586    
2587            /**
2588            * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2589            *
2590            * @param pk the primary key of the role
2591            * @param groups the groups
2592            */
2593            public static void removeGroups(long pk,
2594                    List<com.liferay.portal.model.Group> groups) {
2595                    getPersistence().removeGroups(pk, groups);
2596            }
2597    
2598            /**
2599            * 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.
2600            *
2601            * @param pk the primary key of the role
2602            * @param groupPKs the primary keys of the groups to be associated with the role
2603            */
2604            public static void setGroups(long pk, long[] groupPKs) {
2605                    getPersistence().setGroups(pk, groupPKs);
2606            }
2607    
2608            /**
2609            * 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.
2610            *
2611            * @param pk the primary key of the role
2612            * @param groups the groups to be associated with the role
2613            */
2614            public static void setGroups(long pk,
2615                    List<com.liferay.portal.model.Group> groups) {
2616                    getPersistence().setGroups(pk, groups);
2617            }
2618    
2619            /**
2620            * Returns the primaryKeys of users associated with the role.
2621            *
2622            * @param pk the primary key of the role
2623            * @return long[] of the primaryKeys of users associated with the role
2624            */
2625            public static long[] getUserPrimaryKeys(long pk) {
2626                    return getPersistence().getUserPrimaryKeys(pk);
2627            }
2628    
2629            /**
2630            * Returns all the users associated with the role.
2631            *
2632            * @param pk the primary key of the role
2633            * @return the users associated with the role
2634            */
2635            public static List<com.liferay.portal.model.User> getUsers(long pk) {
2636                    return getPersistence().getUsers(pk);
2637            }
2638    
2639            /**
2640            * Returns a range of all the users associated with the role.
2641            *
2642            * <p>
2643            * 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.
2644            * </p>
2645            *
2646            * @param pk the primary key of the role
2647            * @param start the lower bound of the range of roles
2648            * @param end the upper bound of the range of roles (not inclusive)
2649            * @return the range of users associated with the role
2650            */
2651            public static List<com.liferay.portal.model.User> getUsers(long pk,
2652                    int start, int end) {
2653                    return getPersistence().getUsers(pk, start, end);
2654            }
2655    
2656            /**
2657            * Returns an ordered range of all the users associated with the role.
2658            *
2659            * <p>
2660            * 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.
2661            * </p>
2662            *
2663            * @param pk the primary key of the role
2664            * @param start the lower bound of the range of roles
2665            * @param end the upper bound of the range of roles (not inclusive)
2666            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2667            * @return the ordered range of users associated with the role
2668            */
2669            public static List<com.liferay.portal.model.User> getUsers(long pk,
2670                    int start, int end,
2671                    OrderByComparator<com.liferay.portal.model.User> orderByComparator) {
2672                    return getPersistence().getUsers(pk, start, end, orderByComparator);
2673            }
2674    
2675            /**
2676            * Returns the number of users associated with the role.
2677            *
2678            * @param pk the primary key of the role
2679            * @return the number of users associated with the role
2680            */
2681            public static int getUsersSize(long pk) {
2682                    return getPersistence().getUsersSize(pk);
2683            }
2684    
2685            /**
2686            * Returns <code>true</code> if the user is associated with the role.
2687            *
2688            * @param pk the primary key of the role
2689            * @param userPK the primary key of the user
2690            * @return <code>true</code> if the user is associated with the role; <code>false</code> otherwise
2691            */
2692            public static boolean containsUser(long pk, long userPK) {
2693                    return getPersistence().containsUser(pk, userPK);
2694            }
2695    
2696            /**
2697            * Returns <code>true</code> if the role has any users associated with it.
2698            *
2699            * @param pk the primary key of the role to check for associations with users
2700            * @return <code>true</code> if the role has any users associated with it; <code>false</code> otherwise
2701            */
2702            public static boolean containsUsers(long pk) {
2703                    return getPersistence().containsUsers(pk);
2704            }
2705    
2706            /**
2707            * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2708            *
2709            * @param pk the primary key of the role
2710            * @param userPK the primary key of the user
2711            */
2712            public static void addUser(long pk, long userPK) {
2713                    getPersistence().addUser(pk, userPK);
2714            }
2715    
2716            /**
2717            * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2718            *
2719            * @param pk the primary key of the role
2720            * @param user the user
2721            */
2722            public static void addUser(long pk, com.liferay.portal.model.User user) {
2723                    getPersistence().addUser(pk, user);
2724            }
2725    
2726            /**
2727            * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2728            *
2729            * @param pk the primary key of the role
2730            * @param userPKs the primary keys of the users
2731            */
2732            public static void addUsers(long pk, long[] userPKs) {
2733                    getPersistence().addUsers(pk, userPKs);
2734            }
2735    
2736            /**
2737            * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2738            *
2739            * @param pk the primary key of the role
2740            * @param users the users
2741            */
2742            public static void addUsers(long pk,
2743                    List<com.liferay.portal.model.User> users) {
2744                    getPersistence().addUsers(pk, users);
2745            }
2746    
2747            /**
2748            * Clears all associations between the role and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2749            *
2750            * @param pk the primary key of the role to clear the associated users from
2751            */
2752            public static void clearUsers(long pk) {
2753                    getPersistence().clearUsers(pk);
2754            }
2755    
2756            /**
2757            * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2758            *
2759            * @param pk the primary key of the role
2760            * @param userPK the primary key of the user
2761            */
2762            public static void removeUser(long pk, long userPK) {
2763                    getPersistence().removeUser(pk, userPK);
2764            }
2765    
2766            /**
2767            * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2768            *
2769            * @param pk the primary key of the role
2770            * @param user the user
2771            */
2772            public static void removeUser(long pk, com.liferay.portal.model.User user) {
2773                    getPersistence().removeUser(pk, user);
2774            }
2775    
2776            /**
2777            * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2778            *
2779            * @param pk the primary key of the role
2780            * @param userPKs the primary keys of the users
2781            */
2782            public static void removeUsers(long pk, long[] userPKs) {
2783                    getPersistence().removeUsers(pk, userPKs);
2784            }
2785    
2786            /**
2787            * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2788            *
2789            * @param pk the primary key of the role
2790            * @param users the users
2791            */
2792            public static void removeUsers(long pk,
2793                    List<com.liferay.portal.model.User> users) {
2794                    getPersistence().removeUsers(pk, users);
2795            }
2796    
2797            /**
2798            * 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.
2799            *
2800            * @param pk the primary key of the role
2801            * @param userPKs the primary keys of the users to be associated with the role
2802            */
2803            public static void setUsers(long pk, long[] userPKs) {
2804                    getPersistence().setUsers(pk, userPKs);
2805            }
2806    
2807            /**
2808            * 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.
2809            *
2810            * @param pk the primary key of the role
2811            * @param users the users to be associated with the role
2812            */
2813            public static void setUsers(long pk,
2814                    List<com.liferay.portal.model.User> users) {
2815                    getPersistence().setUsers(pk, users);
2816            }
2817    
2818            public static java.util.Set<java.lang.String> getBadColumnNames() {
2819                    return getPersistence().getBadColumnNames();
2820            }
2821    
2822            public static RolePersistence getPersistence() {
2823                    if (_persistence == null) {
2824                            _persistence = (RolePersistence)PortalBeanLocatorUtil.locate(RolePersistence.class.getName());
2825    
2826                            ReferenceRegistry.registerReference(RoleUtil.class, "_persistence");
2827                    }
2828    
2829                    return _persistence;
2830            }
2831    
2832            private static RolePersistence _persistence;
2833    }