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