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