001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.Role;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the role service. This utility wraps {@link RolePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see RolePersistence
036     * @see RolePersistenceImpl
037     * @generated
038     */
039    public class RoleUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(Role role) {
057                    getPersistence().clearCache(role);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery)
072                    throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery,
080                    int start, int end) throws SystemException {
081                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
082            }
083    
084            /**
085             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
086             */
087            public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery,
088                    int start, int end, OrderByComparator orderByComparator)
089                    throws SystemException {
090                    return getPersistence()
091                                       .findWithDynamicQuery(dynamicQuery, start, end,
092                            orderByComparator);
093            }
094    
095            /**
096             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
097             */
098            public static Role update(Role role) throws SystemException {
099                    return getPersistence().update(role);
100            }
101    
102            /**
103             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
104             */
105            public static Role update(Role role, ServiceContext serviceContext)
106                    throws SystemException {
107                    return getPersistence().update(role, serviceContext);
108            }
109    
110            /**
111            * Returns all the roles where companyId = &#63;.
112            *
113            * @param companyId the company ID
114            * @return the matching roles
115            * @throws SystemException if a system exception occurred
116            */
117            public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
118                    long companyId)
119                    throws com.liferay.portal.kernel.exception.SystemException {
120                    return getPersistence().findByCompanyId(companyId);
121            }
122    
123            /**
124            * Returns a range of all the roles where companyId = &#63;.
125            *
126            * <p>
127            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
128            * </p>
129            *
130            * @param companyId the company ID
131            * @param start the lower bound of the range of roles
132            * @param end the upper bound of the range of roles (not inclusive)
133            * @return the range of matching roles
134            * @throws SystemException if a system exception occurred
135            */
136            public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
137                    long companyId, int start, int end)
138                    throws com.liferay.portal.kernel.exception.SystemException {
139                    return getPersistence().findByCompanyId(companyId, start, end);
140            }
141    
142            /**
143            * Returns an ordered range of all the roles where companyId = &#63;.
144            *
145            * <p>
146            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
147            * </p>
148            *
149            * @param companyId the company ID
150            * @param start the lower bound of the range of roles
151            * @param end the upper bound of the range of roles (not inclusive)
152            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
153            * @return the ordered range of matching roles
154            * @throws SystemException if a system exception occurred
155            */
156            public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
157                    long companyId, int start, int end,
158                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159                    throws com.liferay.portal.kernel.exception.SystemException {
160                    return getPersistence()
161                                       .findByCompanyId(companyId, start, end, orderByComparator);
162            }
163    
164            /**
165            * Returns the first role in the ordered set where companyId = &#63;.
166            *
167            * @param companyId the company ID
168            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
169            * @return the first matching role
170            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public static com.liferay.portal.model.Role findByCompanyId_First(
174                    long companyId,
175                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176                    throws com.liferay.portal.NoSuchRoleException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    return getPersistence()
179                                       .findByCompanyId_First(companyId, orderByComparator);
180            }
181    
182            /**
183            * Returns the first role in the ordered set where companyId = &#63;.
184            *
185            * @param companyId the company ID
186            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
187            * @return the first matching role, or <code>null</code> if a matching role could not be found
188            * @throws SystemException if a system exception occurred
189            */
190            public static com.liferay.portal.model.Role fetchByCompanyId_First(
191                    long companyId,
192                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return getPersistence()
195                                       .fetchByCompanyId_First(companyId, orderByComparator);
196            }
197    
198            /**
199            * Returns the last role in the ordered set where companyId = &#63;.
200            *
201            * @param companyId the company ID
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 findByCompanyId_Last(
208                    long companyId,
209                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210                    throws com.liferay.portal.NoSuchRoleException,
211                            com.liferay.portal.kernel.exception.SystemException {
212                    return getPersistence()
213                                       .findByCompanyId_Last(companyId, orderByComparator);
214            }
215    
216            /**
217            * Returns the last role in the ordered set where companyId = &#63;.
218            *
219            * @param companyId the company ID
220            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
221            * @return the last matching role, or <code>null</code> if a matching role could not be found
222            * @throws SystemException if a system exception occurred
223            */
224            public static com.liferay.portal.model.Role fetchByCompanyId_Last(
225                    long companyId,
226                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227                    throws com.liferay.portal.kernel.exception.SystemException {
228                    return getPersistence()
229                                       .fetchByCompanyId_Last(companyId, orderByComparator);
230            }
231    
232            /**
233            * Returns the roles before and after the current role in the ordered set where companyId = &#63;.
234            *
235            * @param roleId the primary key of the current role
236            * @param companyId the company ID
237            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
238            * @return the previous, current, and next role
239            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
240            * @throws SystemException if a system exception occurred
241            */
242            public static com.liferay.portal.model.Role[] findByCompanyId_PrevAndNext(
243                    long roleId, long companyId,
244                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
245                    throws com.liferay.portal.NoSuchRoleException,
246                            com.liferay.portal.kernel.exception.SystemException {
247                    return getPersistence()
248                                       .findByCompanyId_PrevAndNext(roleId, companyId,
249                            orderByComparator);
250            }
251    
252            /**
253            * Returns all the roles that the user has permission to view where companyId = &#63;.
254            *
255            * @param companyId the company ID
256            * @return the matching roles that the user has permission to view
257            * @throws SystemException if a system exception occurred
258            */
259            public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
260                    long companyId)
261                    throws com.liferay.portal.kernel.exception.SystemException {
262                    return getPersistence().filterFindByCompanyId(companyId);
263            }
264    
265            /**
266            * Returns a range of all the roles that the user has permission to view where companyId = &#63;.
267            *
268            * <p>
269            * 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.
270            * </p>
271            *
272            * @param companyId the company ID
273            * @param start the lower bound of the range of roles
274            * @param end the upper bound of the range of roles (not inclusive)
275            * @return the range of matching roles that the user has permission to view
276            * @throws SystemException if a system exception occurred
277            */
278            public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
279                    long companyId, int start, int end)
280                    throws com.liferay.portal.kernel.exception.SystemException {
281                    return getPersistence().filterFindByCompanyId(companyId, start, end);
282            }
283    
284            /**
285            * Returns an ordered range of all the roles that the user has permissions to view where companyId = &#63;.
286            *
287            * <p>
288            * 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.
289            * </p>
290            *
291            * @param companyId the company ID
292            * @param start the lower bound of the range of roles
293            * @param end the upper bound of the range of roles (not inclusive)
294            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
295            * @return the ordered range of matching roles that the user has permission to view
296            * @throws SystemException if a system exception occurred
297            */
298            public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
299                    long companyId, int start, int end,
300                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
301                    throws com.liferay.portal.kernel.exception.SystemException {
302                    return getPersistence()
303                                       .filterFindByCompanyId(companyId, start, end,
304                            orderByComparator);
305            }
306    
307            /**
308            * 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;.
309            *
310            * @param roleId the primary key of the current role
311            * @param companyId the company ID
312            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
313            * @return the previous, current, and next role
314            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
315            * @throws SystemException if a system exception occurred
316            */
317            public static com.liferay.portal.model.Role[] filterFindByCompanyId_PrevAndNext(
318                    long roleId, long companyId,
319                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
320                    throws com.liferay.portal.NoSuchRoleException,
321                            com.liferay.portal.kernel.exception.SystemException {
322                    return getPersistence()
323                                       .filterFindByCompanyId_PrevAndNext(roleId, companyId,
324                            orderByComparator);
325            }
326    
327            /**
328            * Removes all the roles where companyId = &#63; from the database.
329            *
330            * @param companyId the company ID
331            * @throws SystemException if a system exception occurred
332            */
333            public static void removeByCompanyId(long companyId)
334                    throws com.liferay.portal.kernel.exception.SystemException {
335                    getPersistence().removeByCompanyId(companyId);
336            }
337    
338            /**
339            * Returns the number of roles where companyId = &#63;.
340            *
341            * @param companyId the company ID
342            * @return the number of matching roles
343            * @throws SystemException if a system exception occurred
344            */
345            public static int countByCompanyId(long companyId)
346                    throws com.liferay.portal.kernel.exception.SystemException {
347                    return getPersistence().countByCompanyId(companyId);
348            }
349    
350            /**
351            * Returns the number of roles that the user has permission to view where companyId = &#63;.
352            *
353            * @param companyId the company ID
354            * @return the number of matching roles that the user has permission to view
355            * @throws SystemException if a system exception occurred
356            */
357            public static int filterCountByCompanyId(long companyId)
358                    throws com.liferay.portal.kernel.exception.SystemException {
359                    return getPersistence().filterCountByCompanyId(companyId);
360            }
361    
362            /**
363            * Returns all the roles where name = &#63;.
364            *
365            * @param name the name
366            * @return the matching roles
367            * @throws SystemException if a system exception occurred
368            */
369            public static java.util.List<com.liferay.portal.model.Role> findByName(
370                    java.lang.String name)
371                    throws com.liferay.portal.kernel.exception.SystemException {
372                    return getPersistence().findByName(name);
373            }
374    
375            /**
376            * Returns a range of all the roles where name = &#63;.
377            *
378            * <p>
379            * 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.
380            * </p>
381            *
382            * @param name the name
383            * @param start the lower bound of the range of roles
384            * @param end the upper bound of the range of roles (not inclusive)
385            * @return the range of matching roles
386            * @throws SystemException if a system exception occurred
387            */
388            public static java.util.List<com.liferay.portal.model.Role> findByName(
389                    java.lang.String name, int start, int end)
390                    throws com.liferay.portal.kernel.exception.SystemException {
391                    return getPersistence().findByName(name, start, end);
392            }
393    
394            /**
395            * Returns an ordered range of all the roles where name = &#63;.
396            *
397            * <p>
398            * 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.
399            * </p>
400            *
401            * @param name the name
402            * @param start the lower bound of the range of roles
403            * @param end the upper bound of the range of roles (not inclusive)
404            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
405            * @return the ordered range of matching roles
406            * @throws SystemException if a system exception occurred
407            */
408            public static java.util.List<com.liferay.portal.model.Role> findByName(
409                    java.lang.String name, int start, int end,
410                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
411                    throws com.liferay.portal.kernel.exception.SystemException {
412                    return getPersistence().findByName(name, start, end, orderByComparator);
413            }
414    
415            /**
416            * Returns the first role in the ordered set where name = &#63;.
417            *
418            * @param name the name
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 findByName_First(
425                    java.lang.String name,
426                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
427                    throws com.liferay.portal.NoSuchRoleException,
428                            com.liferay.portal.kernel.exception.SystemException {
429                    return getPersistence().findByName_First(name, orderByComparator);
430            }
431    
432            /**
433            * Returns the first role in the ordered set where name = &#63;.
434            *
435            * @param name the name
436            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
437            * @return the first matching role, or <code>null</code> if a matching role could not be found
438            * @throws SystemException if a system exception occurred
439            */
440            public static com.liferay.portal.model.Role fetchByName_First(
441                    java.lang.String name,
442                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
443                    throws com.liferay.portal.kernel.exception.SystemException {
444                    return getPersistence().fetchByName_First(name, orderByComparator);
445            }
446    
447            /**
448            * Returns the last role in the ordered set where name = &#63;.
449            *
450            * @param name the name
451            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
452            * @return the last matching role
453            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
454            * @throws SystemException if a system exception occurred
455            */
456            public static com.liferay.portal.model.Role findByName_Last(
457                    java.lang.String name,
458                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
459                    throws com.liferay.portal.NoSuchRoleException,
460                            com.liferay.portal.kernel.exception.SystemException {
461                    return getPersistence().findByName_Last(name, orderByComparator);
462            }
463    
464            /**
465            * Returns the last role in the ordered set where name = &#63;.
466            *
467            * @param name the name
468            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
469            * @return the last matching role, or <code>null</code> if a matching role could not be found
470            * @throws SystemException if a system exception occurred
471            */
472            public static com.liferay.portal.model.Role fetchByName_Last(
473                    java.lang.String name,
474                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
475                    throws com.liferay.portal.kernel.exception.SystemException {
476                    return getPersistence().fetchByName_Last(name, orderByComparator);
477            }
478    
479            /**
480            * Returns the roles before and after the current role in the ordered set where name = &#63;.
481            *
482            * @param roleId the primary key of the current role
483            * @param name the name
484            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
485            * @return the previous, current, and next role
486            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
487            * @throws SystemException if a system exception occurred
488            */
489            public static com.liferay.portal.model.Role[] findByName_PrevAndNext(
490                    long roleId, java.lang.String name,
491                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
492                    throws com.liferay.portal.NoSuchRoleException,
493                            com.liferay.portal.kernel.exception.SystemException {
494                    return getPersistence()
495                                       .findByName_PrevAndNext(roleId, name, orderByComparator);
496            }
497    
498            /**
499            * Returns all the roles that the user has permission to view where name = &#63;.
500            *
501            * @param name the name
502            * @return the matching roles that the user has permission to view
503            * @throws SystemException if a system exception occurred
504            */
505            public static java.util.List<com.liferay.portal.model.Role> filterFindByName(
506                    java.lang.String name)
507                    throws com.liferay.portal.kernel.exception.SystemException {
508                    return getPersistence().filterFindByName(name);
509            }
510    
511            /**
512            * Returns a range of all the roles that the user has permission to view where name = &#63;.
513            *
514            * <p>
515            * 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.
516            * </p>
517            *
518            * @param name the name
519            * @param start the lower bound of the range of roles
520            * @param end the upper bound of the range of roles (not inclusive)
521            * @return the range of matching roles that the user has permission to view
522            * @throws SystemException if a system exception occurred
523            */
524            public static java.util.List<com.liferay.portal.model.Role> filterFindByName(
525                    java.lang.String name, int start, int end)
526                    throws com.liferay.portal.kernel.exception.SystemException {
527                    return getPersistence().filterFindByName(name, start, end);
528            }
529    
530            /**
531            * Returns an ordered range of all the roles that the user has permissions to view where name = &#63;.
532            *
533            * <p>
534            * 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.
535            * </p>
536            *
537            * @param name the name
538            * @param start the lower bound of the range of roles
539            * @param end the upper bound of the range of roles (not inclusive)
540            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
541            * @return the ordered range of matching roles that the user has permission to view
542            * @throws SystemException if a system exception occurred
543            */
544            public static java.util.List<com.liferay.portal.model.Role> filterFindByName(
545                    java.lang.String name, int start, int end,
546                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
547                    throws com.liferay.portal.kernel.exception.SystemException {
548                    return getPersistence()
549                                       .filterFindByName(name, start, end, orderByComparator);
550            }
551    
552            /**
553            * 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;.
554            *
555            * @param roleId the primary key of the current role
556            * @param name the name
557            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
558            * @return the previous, current, and next role
559            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
560            * @throws SystemException if a system exception occurred
561            */
562            public static com.liferay.portal.model.Role[] filterFindByName_PrevAndNext(
563                    long roleId, java.lang.String name,
564                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
565                    throws com.liferay.portal.NoSuchRoleException,
566                            com.liferay.portal.kernel.exception.SystemException {
567                    return getPersistence()
568                                       .filterFindByName_PrevAndNext(roleId, name, orderByComparator);
569            }
570    
571            /**
572            * Removes all the roles where name = &#63; from the database.
573            *
574            * @param name the name
575            * @throws SystemException if a system exception occurred
576            */
577            public static void removeByName(java.lang.String name)
578                    throws com.liferay.portal.kernel.exception.SystemException {
579                    getPersistence().removeByName(name);
580            }
581    
582            /**
583            * Returns the number of roles where name = &#63;.
584            *
585            * @param name the name
586            * @return the number of matching roles
587            * @throws SystemException if a system exception occurred
588            */
589            public static int countByName(java.lang.String name)
590                    throws com.liferay.portal.kernel.exception.SystemException {
591                    return getPersistence().countByName(name);
592            }
593    
594            /**
595            * Returns the number of roles that the user has permission to view where name = &#63;.
596            *
597            * @param name the name
598            * @return the number of matching roles that the user has permission to view
599            * @throws SystemException if a system exception occurred
600            */
601            public static int filterCountByName(java.lang.String name)
602                    throws com.liferay.portal.kernel.exception.SystemException {
603                    return getPersistence().filterCountByName(name);
604            }
605    
606            /**
607            * Returns all the roles where subtype = &#63;.
608            *
609            * @param subtype the subtype
610            * @return the matching roles
611            * @throws SystemException if a system exception occurred
612            */
613            public static java.util.List<com.liferay.portal.model.Role> findBySubtype(
614                    java.lang.String subtype)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    return getPersistence().findBySubtype(subtype);
617            }
618    
619            /**
620            * Returns a range of all the roles where subtype = &#63;.
621            *
622            * <p>
623            * 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.
624            * </p>
625            *
626            * @param subtype the subtype
627            * @param start the lower bound of the range of roles
628            * @param end the upper bound of the range of roles (not inclusive)
629            * @return the range of matching roles
630            * @throws SystemException if a system exception occurred
631            */
632            public static java.util.List<com.liferay.portal.model.Role> findBySubtype(
633                    java.lang.String subtype, int start, int end)
634                    throws com.liferay.portal.kernel.exception.SystemException {
635                    return getPersistence().findBySubtype(subtype, start, end);
636            }
637    
638            /**
639            * Returns an ordered range of all the roles where subtype = &#63;.
640            *
641            * <p>
642            * 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.
643            * </p>
644            *
645            * @param subtype the subtype
646            * @param start the lower bound of the range of roles
647            * @param end the upper bound of the range of roles (not inclusive)
648            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
649            * @return the ordered range of matching roles
650            * @throws SystemException if a system exception occurred
651            */
652            public static java.util.List<com.liferay.portal.model.Role> findBySubtype(
653                    java.lang.String subtype, int start, int end,
654                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
655                    throws com.liferay.portal.kernel.exception.SystemException {
656                    return getPersistence()
657                                       .findBySubtype(subtype, start, end, orderByComparator);
658            }
659    
660            /**
661            * Returns the first role in the ordered set where subtype = &#63;.
662            *
663            * @param subtype the subtype
664            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
665            * @return the first matching role
666            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
667            * @throws SystemException if a system exception occurred
668            */
669            public static com.liferay.portal.model.Role findBySubtype_First(
670                    java.lang.String subtype,
671                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
672                    throws com.liferay.portal.NoSuchRoleException,
673                            com.liferay.portal.kernel.exception.SystemException {
674                    return getPersistence().findBySubtype_First(subtype, orderByComparator);
675            }
676    
677            /**
678            * Returns the first role in the ordered set where subtype = &#63;.
679            *
680            * @param subtype the subtype
681            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
682            * @return the first matching role, or <code>null</code> if a matching role could not be found
683            * @throws SystemException if a system exception occurred
684            */
685            public static com.liferay.portal.model.Role fetchBySubtype_First(
686                    java.lang.String subtype,
687                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
688                    throws com.liferay.portal.kernel.exception.SystemException {
689                    return getPersistence().fetchBySubtype_First(subtype, orderByComparator);
690            }
691    
692            /**
693            * Returns the last role in the ordered set where subtype = &#63;.
694            *
695            * @param subtype the subtype
696            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
697            * @return the last matching role
698            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
699            * @throws SystemException if a system exception occurred
700            */
701            public static com.liferay.portal.model.Role findBySubtype_Last(
702                    java.lang.String subtype,
703                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
704                    throws com.liferay.portal.NoSuchRoleException,
705                            com.liferay.portal.kernel.exception.SystemException {
706                    return getPersistence().findBySubtype_Last(subtype, orderByComparator);
707            }
708    
709            /**
710            * Returns the last role in the ordered set where subtype = &#63;.
711            *
712            * @param subtype the subtype
713            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
714            * @return the last matching role, or <code>null</code> if a matching role could not be found
715            * @throws SystemException if a system exception occurred
716            */
717            public static com.liferay.portal.model.Role fetchBySubtype_Last(
718                    java.lang.String subtype,
719                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
720                    throws com.liferay.portal.kernel.exception.SystemException {
721                    return getPersistence().fetchBySubtype_Last(subtype, orderByComparator);
722            }
723    
724            /**
725            * Returns the roles before and after the current role in the ordered set where subtype = &#63;.
726            *
727            * @param roleId the primary key of the current role
728            * @param subtype the subtype
729            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
730            * @return the previous, current, and next role
731            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
732            * @throws SystemException if a system exception occurred
733            */
734            public static com.liferay.portal.model.Role[] findBySubtype_PrevAndNext(
735                    long roleId, java.lang.String subtype,
736                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
737                    throws com.liferay.portal.NoSuchRoleException,
738                            com.liferay.portal.kernel.exception.SystemException {
739                    return getPersistence()
740                                       .findBySubtype_PrevAndNext(roleId, subtype, orderByComparator);
741            }
742    
743            /**
744            * Returns all the roles that the user has permission to view where subtype = &#63;.
745            *
746            * @param subtype the subtype
747            * @return the matching roles that the user has permission to view
748            * @throws SystemException if a system exception occurred
749            */
750            public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
751                    java.lang.String subtype)
752                    throws com.liferay.portal.kernel.exception.SystemException {
753                    return getPersistence().filterFindBySubtype(subtype);
754            }
755    
756            /**
757            * Returns a range of all the roles that the user has permission to view where subtype = &#63;.
758            *
759            * <p>
760            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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.
761            * </p>
762            *
763            * @param subtype the subtype
764            * @param start the lower bound of the range of roles
765            * @param end the upper bound of the range of roles (not inclusive)
766            * @return the range of matching roles that the user has permission to view
767            * @throws SystemException if a system exception occurred
768            */
769            public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
770                    java.lang.String subtype, int start, int end)
771                    throws com.liferay.portal.kernel.exception.SystemException {
772                    return getPersistence().filterFindBySubtype(subtype, start, end);
773            }
774    
775            /**
776            * Returns an ordered range of all the roles that the user has permissions to view where subtype = &#63;.
777            *
778            * <p>
779            * 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.
780            * </p>
781            *
782            * @param subtype the subtype
783            * @param start the lower bound of the range of roles
784            * @param end the upper bound of the range of roles (not inclusive)
785            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
786            * @return the ordered range of matching roles that the user has permission to view
787            * @throws SystemException if a system exception occurred
788            */
789            public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
790                    java.lang.String subtype, int start, int end,
791                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
792                    throws com.liferay.portal.kernel.exception.SystemException {
793                    return getPersistence()
794                                       .filterFindBySubtype(subtype, start, end, orderByComparator);
795            }
796    
797            /**
798            * 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;.
799            *
800            * @param roleId the primary key of the current role
801            * @param subtype the subtype
802            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
803            * @return the previous, current, and next role
804            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
805            * @throws SystemException if a system exception occurred
806            */
807            public static com.liferay.portal.model.Role[] filterFindBySubtype_PrevAndNext(
808                    long roleId, java.lang.String subtype,
809                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
810                    throws com.liferay.portal.NoSuchRoleException,
811                            com.liferay.portal.kernel.exception.SystemException {
812                    return getPersistence()
813                                       .filterFindBySubtype_PrevAndNext(roleId, subtype,
814                            orderByComparator);
815            }
816    
817            /**
818            * Removes all the roles where subtype = &#63; from the database.
819            *
820            * @param subtype the subtype
821            * @throws SystemException if a system exception occurred
822            */
823            public static void removeBySubtype(java.lang.String subtype)
824                    throws com.liferay.portal.kernel.exception.SystemException {
825                    getPersistence().removeBySubtype(subtype);
826            }
827    
828            /**
829            * Returns the number of roles where subtype = &#63;.
830            *
831            * @param subtype the subtype
832            * @return the number of matching roles
833            * @throws SystemException if a system exception occurred
834            */
835            public static int countBySubtype(java.lang.String subtype)
836                    throws com.liferay.portal.kernel.exception.SystemException {
837                    return getPersistence().countBySubtype(subtype);
838            }
839    
840            /**
841            * Returns the number of roles that the user has permission to view where subtype = &#63;.
842            *
843            * @param subtype the subtype
844            * @return the number of matching roles that the user has permission to view
845            * @throws SystemException if a system exception occurred
846            */
847            public static int filterCountBySubtype(java.lang.String subtype)
848                    throws com.liferay.portal.kernel.exception.SystemException {
849                    return getPersistence().filterCountBySubtype(subtype);
850            }
851    
852            /**
853            * Returns the role where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found.
854            *
855            * @param companyId the company ID
856            * @param name the name
857            * @return the matching role
858            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
859            * @throws SystemException if a system exception occurred
860            */
861            public static com.liferay.portal.model.Role findByC_N(long companyId,
862                    java.lang.String name)
863                    throws com.liferay.portal.NoSuchRoleException,
864                            com.liferay.portal.kernel.exception.SystemException {
865                    return getPersistence().findByC_N(companyId, name);
866            }
867    
868            /**
869            * Returns the role where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
870            *
871            * @param companyId the company ID
872            * @param name the name
873            * @return the matching role, or <code>null</code> if a matching role could not be found
874            * @throws SystemException if a system exception occurred
875            */
876            public static com.liferay.portal.model.Role fetchByC_N(long companyId,
877                    java.lang.String name)
878                    throws com.liferay.portal.kernel.exception.SystemException {
879                    return getPersistence().fetchByC_N(companyId, name);
880            }
881    
882            /**
883            * 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.
884            *
885            * @param companyId the company ID
886            * @param name the name
887            * @param retrieveFromCache whether to use the finder cache
888            * @return the matching role, or <code>null</code> if a matching role could not be found
889            * @throws SystemException if a system exception occurred
890            */
891            public static com.liferay.portal.model.Role fetchByC_N(long companyId,
892                    java.lang.String name, boolean retrieveFromCache)
893                    throws com.liferay.portal.kernel.exception.SystemException {
894                    return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
895            }
896    
897            /**
898            * Removes the role where companyId = &#63; and name = &#63; from the database.
899            *
900            * @param companyId the company ID
901            * @param name the name
902            * @return the role that was removed
903            * @throws SystemException if a system exception occurred
904            */
905            public static com.liferay.portal.model.Role removeByC_N(long companyId,
906                    java.lang.String name)
907                    throws com.liferay.portal.NoSuchRoleException,
908                            com.liferay.portal.kernel.exception.SystemException {
909                    return getPersistence().removeByC_N(companyId, name);
910            }
911    
912            /**
913            * Returns the number of roles where companyId = &#63; and name = &#63;.
914            *
915            * @param companyId the company ID
916            * @param name the name
917            * @return the number of matching roles
918            * @throws SystemException if a system exception occurred
919            */
920            public static int countByC_N(long companyId, java.lang.String name)
921                    throws com.liferay.portal.kernel.exception.SystemException {
922                    return getPersistence().countByC_N(companyId, name);
923            }
924    
925            /**
926            * Returns all the roles where type = &#63; and subtype = &#63;.
927            *
928            * @param type the type
929            * @param subtype the subtype
930            * @return the matching roles
931            * @throws SystemException if a system exception occurred
932            */
933            public static java.util.List<com.liferay.portal.model.Role> findByT_S(
934                    int type, java.lang.String subtype)
935                    throws com.liferay.portal.kernel.exception.SystemException {
936                    return getPersistence().findByT_S(type, subtype);
937            }
938    
939            /**
940            * Returns a range of all the roles where type = &#63; and subtype = &#63;.
941            *
942            * <p>
943            * 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.
944            * </p>
945            *
946            * @param type the type
947            * @param subtype the subtype
948            * @param start the lower bound of the range of roles
949            * @param end the upper bound of the range of roles (not inclusive)
950            * @return the range of matching roles
951            * @throws SystemException if a system exception occurred
952            */
953            public static java.util.List<com.liferay.portal.model.Role> findByT_S(
954                    int type, java.lang.String subtype, int start, int end)
955                    throws com.liferay.portal.kernel.exception.SystemException {
956                    return getPersistence().findByT_S(type, subtype, start, end);
957            }
958    
959            /**
960            * Returns an ordered range of all the roles where type = &#63; and subtype = &#63;.
961            *
962            * <p>
963            * 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.
964            * </p>
965            *
966            * @param type the type
967            * @param subtype the subtype
968            * @param start the lower bound of the range of roles
969            * @param end the upper bound of the range of roles (not inclusive)
970            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
971            * @return the ordered range of matching roles
972            * @throws SystemException if a system exception occurred
973            */
974            public static java.util.List<com.liferay.portal.model.Role> findByT_S(
975                    int type, java.lang.String subtype, int start, int end,
976                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
977                    throws com.liferay.portal.kernel.exception.SystemException {
978                    return getPersistence()
979                                       .findByT_S(type, subtype, start, end, orderByComparator);
980            }
981    
982            /**
983            * Returns the first role in the ordered set where type = &#63; and subtype = &#63;.
984            *
985            * @param type the type
986            * @param subtype the subtype
987            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
988            * @return the first matching role
989            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
990            * @throws SystemException if a system exception occurred
991            */
992            public static com.liferay.portal.model.Role findByT_S_First(int type,
993                    java.lang.String subtype,
994                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
995                    throws com.liferay.portal.NoSuchRoleException,
996                            com.liferay.portal.kernel.exception.SystemException {
997                    return getPersistence().findByT_S_First(type, subtype, orderByComparator);
998            }
999    
1000            /**
1001            * Returns the first role in the ordered set where type = &#63; and subtype = &#63;.
1002            *
1003            * @param type the type
1004            * @param subtype the subtype
1005            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1006            * @return the first matching role, or <code>null</code> if a matching role could not be found
1007            * @throws SystemException if a system exception occurred
1008            */
1009            public static com.liferay.portal.model.Role fetchByT_S_First(int type,
1010                    java.lang.String subtype,
1011                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1012                    throws com.liferay.portal.kernel.exception.SystemException {
1013                    return getPersistence()
1014                                       .fetchByT_S_First(type, subtype, orderByComparator);
1015            }
1016    
1017            /**
1018            * Returns the last role in the ordered set where type = &#63; and subtype = &#63;.
1019            *
1020            * @param type the type
1021            * @param subtype the subtype
1022            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1023            * @return the last matching role
1024            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
1025            * @throws SystemException if a system exception occurred
1026            */
1027            public static com.liferay.portal.model.Role findByT_S_Last(int type,
1028                    java.lang.String subtype,
1029                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1030                    throws com.liferay.portal.NoSuchRoleException,
1031                            com.liferay.portal.kernel.exception.SystemException {
1032                    return getPersistence().findByT_S_Last(type, subtype, orderByComparator);
1033            }
1034    
1035            /**
1036            * Returns the last role in the ordered set where type = &#63; and subtype = &#63;.
1037            *
1038            * @param type the type
1039            * @param subtype the subtype
1040            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1041            * @return the last matching role, or <code>null</code> if a matching role could not be found
1042            * @throws SystemException if a system exception occurred
1043            */
1044            public static com.liferay.portal.model.Role fetchByT_S_Last(int type,
1045                    java.lang.String subtype,
1046                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1047                    throws com.liferay.portal.kernel.exception.SystemException {
1048                    return getPersistence().fetchByT_S_Last(type, subtype, orderByComparator);
1049            }
1050    
1051            /**
1052            * Returns the roles before and after the current role in the ordered set where type = &#63; and subtype = &#63;.
1053            *
1054            * @param roleId the primary key of the current role
1055            * @param type the type
1056            * @param subtype the subtype
1057            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1058            * @return the previous, current, and next role
1059            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1060            * @throws SystemException if a system exception occurred
1061            */
1062            public static com.liferay.portal.model.Role[] findByT_S_PrevAndNext(
1063                    long roleId, int type, java.lang.String subtype,
1064                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1065                    throws com.liferay.portal.NoSuchRoleException,
1066                            com.liferay.portal.kernel.exception.SystemException {
1067                    return getPersistence()
1068                                       .findByT_S_PrevAndNext(roleId, type, subtype,
1069                            orderByComparator);
1070            }
1071    
1072            /**
1073            * Returns all the roles that the user has permission to view where type = &#63; and subtype = &#63;.
1074            *
1075            * @param type the type
1076            * @param subtype the subtype
1077            * @return the matching roles that the user has permission to view
1078            * @throws SystemException if a system exception occurred
1079            */
1080            public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
1081                    int type, java.lang.String subtype)
1082                    throws com.liferay.portal.kernel.exception.SystemException {
1083                    return getPersistence().filterFindByT_S(type, subtype);
1084            }
1085    
1086            /**
1087            * Returns a range of all the roles that the user has permission to view where type = &#63; and subtype = &#63;.
1088            *
1089            * <p>
1090            * 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.
1091            * </p>
1092            *
1093            * @param type the type
1094            * @param subtype the subtype
1095            * @param start the lower bound of the range of roles
1096            * @param end the upper bound of the range of roles (not inclusive)
1097            * @return the range of matching roles that the user has permission to view
1098            * @throws SystemException if a system exception occurred
1099            */
1100            public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
1101                    int type, java.lang.String subtype, int start, int end)
1102                    throws com.liferay.portal.kernel.exception.SystemException {
1103                    return getPersistence().filterFindByT_S(type, subtype, start, end);
1104            }
1105    
1106            /**
1107            * Returns an ordered range of all the roles that the user has permissions to view where type = &#63; and subtype = &#63;.
1108            *
1109            * <p>
1110            * 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.
1111            * </p>
1112            *
1113            * @param type the type
1114            * @param subtype the subtype
1115            * @param start the lower bound of the range of roles
1116            * @param end the upper bound of the range of roles (not inclusive)
1117            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1118            * @return the ordered range of matching roles that the user has permission to view
1119            * @throws SystemException if a system exception occurred
1120            */
1121            public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
1122                    int type, java.lang.String subtype, int start, int end,
1123                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1124                    throws com.liferay.portal.kernel.exception.SystemException {
1125                    return getPersistence()
1126                                       .filterFindByT_S(type, subtype, start, end, orderByComparator);
1127            }
1128    
1129            /**
1130            * 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;.
1131            *
1132            * @param roleId the primary key of the current role
1133            * @param type the type
1134            * @param subtype the subtype
1135            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1136            * @return the previous, current, and next role
1137            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1138            * @throws SystemException if a system exception occurred
1139            */
1140            public static com.liferay.portal.model.Role[] filterFindByT_S_PrevAndNext(
1141                    long roleId, int type, java.lang.String subtype,
1142                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1143                    throws com.liferay.portal.NoSuchRoleException,
1144                            com.liferay.portal.kernel.exception.SystemException {
1145                    return getPersistence()
1146                                       .filterFindByT_S_PrevAndNext(roleId, type, subtype,
1147                            orderByComparator);
1148            }
1149    
1150            /**
1151            * Removes all the roles where type = &#63; and subtype = &#63; from the database.
1152            *
1153            * @param type the type
1154            * @param subtype the subtype
1155            * @throws SystemException if a system exception occurred
1156            */
1157            public static void removeByT_S(int type, java.lang.String subtype)
1158                    throws com.liferay.portal.kernel.exception.SystemException {
1159                    getPersistence().removeByT_S(type, subtype);
1160            }
1161    
1162            /**
1163            * Returns the number of roles where type = &#63; and subtype = &#63;.
1164            *
1165            * @param type the type
1166            * @param subtype the subtype
1167            * @return the number of matching roles
1168            * @throws SystemException if a system exception occurred
1169            */
1170            public static int countByT_S(int type, java.lang.String subtype)
1171                    throws com.liferay.portal.kernel.exception.SystemException {
1172                    return getPersistence().countByT_S(type, subtype);
1173            }
1174    
1175            /**
1176            * Returns the number of roles that the user has permission to view where type = &#63; and subtype = &#63;.
1177            *
1178            * @param type the type
1179            * @param subtype the subtype
1180            * @return the number of matching roles that the user has permission to view
1181            * @throws SystemException if a system exception occurred
1182            */
1183            public static int filterCountByT_S(int type, java.lang.String subtype)
1184                    throws com.liferay.portal.kernel.exception.SystemException {
1185                    return getPersistence().filterCountByT_S(type, subtype);
1186            }
1187    
1188            /**
1189            * 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.
1190            *
1191            * @param companyId the company ID
1192            * @param classNameId the class name ID
1193            * @param classPK the class p k
1194            * @return the matching role
1195            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
1196            * @throws SystemException if a system exception occurred
1197            */
1198            public static com.liferay.portal.model.Role findByC_C_C(long companyId,
1199                    long classNameId, long classPK)
1200                    throws com.liferay.portal.NoSuchRoleException,
1201                            com.liferay.portal.kernel.exception.SystemException {
1202                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
1203            }
1204    
1205            /**
1206            * 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.
1207            *
1208            * @param companyId the company ID
1209            * @param classNameId the class name ID
1210            * @param classPK the class p k
1211            * @return the matching role, or <code>null</code> if a matching role could not be found
1212            * @throws SystemException if a system exception occurred
1213            */
1214            public static com.liferay.portal.model.Role fetchByC_C_C(long companyId,
1215                    long classNameId, long classPK)
1216                    throws com.liferay.portal.kernel.exception.SystemException {
1217                    return getPersistence().fetchByC_C_C(companyId, classNameId, classPK);
1218            }
1219    
1220            /**
1221            * 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.
1222            *
1223            * @param companyId the company ID
1224            * @param classNameId the class name ID
1225            * @param classPK the class p k
1226            * @param retrieveFromCache whether to use the finder cache
1227            * @return the matching role, or <code>null</code> if a matching role could not be found
1228            * @throws SystemException if a system exception occurred
1229            */
1230            public static com.liferay.portal.model.Role fetchByC_C_C(long companyId,
1231                    long classNameId, long classPK, boolean retrieveFromCache)
1232                    throws com.liferay.portal.kernel.exception.SystemException {
1233                    return getPersistence()
1234                                       .fetchByC_C_C(companyId, classNameId, classPK,
1235                            retrieveFromCache);
1236            }
1237    
1238            /**
1239            * Removes the role where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
1240            *
1241            * @param companyId the company ID
1242            * @param classNameId the class name ID
1243            * @param classPK the class p k
1244            * @return the role that was removed
1245            * @throws SystemException if a system exception occurred
1246            */
1247            public static com.liferay.portal.model.Role removeByC_C_C(long companyId,
1248                    long classNameId, long classPK)
1249                    throws com.liferay.portal.NoSuchRoleException,
1250                            com.liferay.portal.kernel.exception.SystemException {
1251                    return getPersistence().removeByC_C_C(companyId, classNameId, classPK);
1252            }
1253    
1254            /**
1255            * Returns the number of roles where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1256            *
1257            * @param companyId the company ID
1258            * @param classNameId the class name ID
1259            * @param classPK the class p k
1260            * @return the number of matching roles
1261            * @throws SystemException if a system exception occurred
1262            */
1263            public static int countByC_C_C(long companyId, long classNameId,
1264                    long classPK)
1265                    throws com.liferay.portal.kernel.exception.SystemException {
1266                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
1267            }
1268    
1269            /**
1270            * Caches the role in the entity cache if it is enabled.
1271            *
1272            * @param role the role
1273            */
1274            public static void cacheResult(com.liferay.portal.model.Role role) {
1275                    getPersistence().cacheResult(role);
1276            }
1277    
1278            /**
1279            * Caches the roles in the entity cache if it is enabled.
1280            *
1281            * @param roles the roles
1282            */
1283            public static void cacheResult(
1284                    java.util.List<com.liferay.portal.model.Role> roles) {
1285                    getPersistence().cacheResult(roles);
1286            }
1287    
1288            /**
1289            * Creates a new role with the primary key. Does not add the role to the database.
1290            *
1291            * @param roleId the primary key for the new role
1292            * @return the new role
1293            */
1294            public static com.liferay.portal.model.Role create(long roleId) {
1295                    return getPersistence().create(roleId);
1296            }
1297    
1298            /**
1299            * Removes the role with the primary key from the database. Also notifies the appropriate model listeners.
1300            *
1301            * @param roleId the primary key of the role
1302            * @return the role that was removed
1303            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1304            * @throws SystemException if a system exception occurred
1305            */
1306            public static com.liferay.portal.model.Role remove(long roleId)
1307                    throws com.liferay.portal.NoSuchRoleException,
1308                            com.liferay.portal.kernel.exception.SystemException {
1309                    return getPersistence().remove(roleId);
1310            }
1311    
1312            public static com.liferay.portal.model.Role updateImpl(
1313                    com.liferay.portal.model.Role role)
1314                    throws com.liferay.portal.kernel.exception.SystemException {
1315                    return getPersistence().updateImpl(role);
1316            }
1317    
1318            /**
1319            * Returns the role with the primary key or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found.
1320            *
1321            * @param roleId the primary key of the role
1322            * @return the role
1323            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
1324            * @throws SystemException if a system exception occurred
1325            */
1326            public static com.liferay.portal.model.Role findByPrimaryKey(long roleId)
1327                    throws com.liferay.portal.NoSuchRoleException,
1328                            com.liferay.portal.kernel.exception.SystemException {
1329                    return getPersistence().findByPrimaryKey(roleId);
1330            }
1331    
1332            /**
1333            * Returns the role with the primary key or returns <code>null</code> if it could not be found.
1334            *
1335            * @param roleId the primary key of the role
1336            * @return the role, or <code>null</code> if a role with the primary key could not be found
1337            * @throws SystemException if a system exception occurred
1338            */
1339            public static com.liferay.portal.model.Role fetchByPrimaryKey(long roleId)
1340                    throws com.liferay.portal.kernel.exception.SystemException {
1341                    return getPersistence().fetchByPrimaryKey(roleId);
1342            }
1343    
1344            /**
1345            * Returns all the roles.
1346            *
1347            * @return the roles
1348            * @throws SystemException if a system exception occurred
1349            */
1350            public static java.util.List<com.liferay.portal.model.Role> findAll()
1351                    throws com.liferay.portal.kernel.exception.SystemException {
1352                    return getPersistence().findAll();
1353            }
1354    
1355            /**
1356            * Returns a range of all the roles.
1357            *
1358            * <p>
1359            * 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.
1360            * </p>
1361            *
1362            * @param start the lower bound of the range of roles
1363            * @param end the upper bound of the range of roles (not inclusive)
1364            * @return the range of roles
1365            * @throws SystemException if a system exception occurred
1366            */
1367            public static java.util.List<com.liferay.portal.model.Role> findAll(
1368                    int start, int end)
1369                    throws com.liferay.portal.kernel.exception.SystemException {
1370                    return getPersistence().findAll(start, end);
1371            }
1372    
1373            /**
1374            * Returns an ordered range of all the roles.
1375            *
1376            * <p>
1377            * 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.
1378            * </p>
1379            *
1380            * @param start the lower bound of the range of roles
1381            * @param end the upper bound of the range of roles (not inclusive)
1382            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1383            * @return the ordered range of roles
1384            * @throws SystemException if a system exception occurred
1385            */
1386            public static java.util.List<com.liferay.portal.model.Role> findAll(
1387                    int start, int end,
1388                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1389                    throws com.liferay.portal.kernel.exception.SystemException {
1390                    return getPersistence().findAll(start, end, orderByComparator);
1391            }
1392    
1393            /**
1394            * Removes all the roles from the database.
1395            *
1396            * @throws SystemException if a system exception occurred
1397            */
1398            public static void removeAll()
1399                    throws com.liferay.portal.kernel.exception.SystemException {
1400                    getPersistence().removeAll();
1401            }
1402    
1403            /**
1404            * Returns the number of roles.
1405            *
1406            * @return the number of roles
1407            * @throws SystemException if a system exception occurred
1408            */
1409            public static int countAll()
1410                    throws com.liferay.portal.kernel.exception.SystemException {
1411                    return getPersistence().countAll();
1412            }
1413    
1414            /**
1415            * Returns all the groups associated with the role.
1416            *
1417            * @param pk the primary key of the role
1418            * @return the groups associated with the role
1419            * @throws SystemException if a system exception occurred
1420            */
1421            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1422                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1423                    return getPersistence().getGroups(pk);
1424            }
1425    
1426            /**
1427            * Returns a range of all the groups associated with the role.
1428            *
1429            * <p>
1430            * 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.
1431            * </p>
1432            *
1433            * @param pk the primary key of the role
1434            * @param start the lower bound of the range of roles
1435            * @param end the upper bound of the range of roles (not inclusive)
1436            * @return the range of groups associated with the role
1437            * @throws SystemException if a system exception occurred
1438            */
1439            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1440                    long pk, int start, int end)
1441                    throws com.liferay.portal.kernel.exception.SystemException {
1442                    return getPersistence().getGroups(pk, start, end);
1443            }
1444    
1445            /**
1446            * Returns an ordered range of all the groups associated with the role.
1447            *
1448            * <p>
1449            * 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.
1450            * </p>
1451            *
1452            * @param pk the primary key of the role
1453            * @param start the lower bound of the range of roles
1454            * @param end the upper bound of the range of roles (not inclusive)
1455            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1456            * @return the ordered range of groups associated with the role
1457            * @throws SystemException if a system exception occurred
1458            */
1459            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1460                    long pk, int start, int end,
1461                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1462                    throws com.liferay.portal.kernel.exception.SystemException {
1463                    return getPersistence().getGroups(pk, start, end, orderByComparator);
1464            }
1465    
1466            /**
1467            * Returns the number of groups associated with the role.
1468            *
1469            * @param pk the primary key of the role
1470            * @return the number of groups associated with the role
1471            * @throws SystemException if a system exception occurred
1472            */
1473            public static int getGroupsSize(long pk)
1474                    throws com.liferay.portal.kernel.exception.SystemException {
1475                    return getPersistence().getGroupsSize(pk);
1476            }
1477    
1478            /**
1479            * Returns <code>true</code> if the group is associated with the role.
1480            *
1481            * @param pk the primary key of the role
1482            * @param groupPK the primary key of the group
1483            * @return <code>true</code> if the group is associated with the role; <code>false</code> otherwise
1484            * @throws SystemException if a system exception occurred
1485            */
1486            public static boolean containsGroup(long pk, long groupPK)
1487                    throws com.liferay.portal.kernel.exception.SystemException {
1488                    return getPersistence().containsGroup(pk, groupPK);
1489            }
1490    
1491            /**
1492            * Returns <code>true</code> if the role has any groups associated with it.
1493            *
1494            * @param pk the primary key of the role to check for associations with groups
1495            * @return <code>true</code> if the role has any groups associated with it; <code>false</code> otherwise
1496            * @throws SystemException if a system exception occurred
1497            */
1498            public static boolean containsGroups(long pk)
1499                    throws com.liferay.portal.kernel.exception.SystemException {
1500                    return getPersistence().containsGroups(pk);
1501            }
1502    
1503            /**
1504            * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1505            *
1506            * @param pk the primary key of the role
1507            * @param groupPK the primary key of the group
1508            * @throws SystemException if a system exception occurred
1509            */
1510            public static void addGroup(long pk, long groupPK)
1511                    throws com.liferay.portal.kernel.exception.SystemException {
1512                    getPersistence().addGroup(pk, groupPK);
1513            }
1514    
1515            /**
1516            * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1517            *
1518            * @param pk the primary key of the role
1519            * @param group the group
1520            * @throws SystemException if a system exception occurred
1521            */
1522            public static void addGroup(long pk, com.liferay.portal.model.Group group)
1523                    throws com.liferay.portal.kernel.exception.SystemException {
1524                    getPersistence().addGroup(pk, group);
1525            }
1526    
1527            /**
1528            * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1529            *
1530            * @param pk the primary key of the role
1531            * @param groupPKs the primary keys of the groups
1532            * @throws SystemException if a system exception occurred
1533            */
1534            public static void addGroups(long pk, long[] groupPKs)
1535                    throws com.liferay.portal.kernel.exception.SystemException {
1536                    getPersistence().addGroups(pk, groupPKs);
1537            }
1538    
1539            /**
1540            * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1541            *
1542            * @param pk the primary key of the role
1543            * @param groups the groups
1544            * @throws SystemException if a system exception occurred
1545            */
1546            public static void addGroups(long pk,
1547                    java.util.List<com.liferay.portal.model.Group> groups)
1548                    throws com.liferay.portal.kernel.exception.SystemException {
1549                    getPersistence().addGroups(pk, groups);
1550            }
1551    
1552            /**
1553            * Clears all associations between the role and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1554            *
1555            * @param pk the primary key of the role to clear the associated groups from
1556            * @throws SystemException if a system exception occurred
1557            */
1558            public static void clearGroups(long pk)
1559                    throws com.liferay.portal.kernel.exception.SystemException {
1560                    getPersistence().clearGroups(pk);
1561            }
1562    
1563            /**
1564            * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1565            *
1566            * @param pk the primary key of the role
1567            * @param groupPK the primary key of the group
1568            * @throws SystemException if a system exception occurred
1569            */
1570            public static void removeGroup(long pk, long groupPK)
1571                    throws com.liferay.portal.kernel.exception.SystemException {
1572                    getPersistence().removeGroup(pk, groupPK);
1573            }
1574    
1575            /**
1576            * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1577            *
1578            * @param pk the primary key of the role
1579            * @param group the group
1580            * @throws SystemException if a system exception occurred
1581            */
1582            public static void removeGroup(long pk, com.liferay.portal.model.Group group)
1583                    throws com.liferay.portal.kernel.exception.SystemException {
1584                    getPersistence().removeGroup(pk, group);
1585            }
1586    
1587            /**
1588            * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1589            *
1590            * @param pk the primary key of the role
1591            * @param groupPKs the primary keys of the groups
1592            * @throws SystemException if a system exception occurred
1593            */
1594            public static void removeGroups(long pk, long[] groupPKs)
1595                    throws com.liferay.portal.kernel.exception.SystemException {
1596                    getPersistence().removeGroups(pk, groupPKs);
1597            }
1598    
1599            /**
1600            * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1601            *
1602            * @param pk the primary key of the role
1603            * @param groups the groups
1604            * @throws SystemException if a system exception occurred
1605            */
1606            public static void removeGroups(long pk,
1607                    java.util.List<com.liferay.portal.model.Group> groups)
1608                    throws com.liferay.portal.kernel.exception.SystemException {
1609                    getPersistence().removeGroups(pk, groups);
1610            }
1611    
1612            /**
1613            * 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.
1614            *
1615            * @param pk the primary key of the role
1616            * @param groupPKs the primary keys of the groups to be associated with the role
1617            * @throws SystemException if a system exception occurred
1618            */
1619            public static void setGroups(long pk, long[] groupPKs)
1620                    throws com.liferay.portal.kernel.exception.SystemException {
1621                    getPersistence().setGroups(pk, groupPKs);
1622            }
1623    
1624            /**
1625            * 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.
1626            *
1627            * @param pk the primary key of the role
1628            * @param groups the groups to be associated with the role
1629            * @throws SystemException if a system exception occurred
1630            */
1631            public static void setGroups(long pk,
1632                    java.util.List<com.liferay.portal.model.Group> groups)
1633                    throws com.liferay.portal.kernel.exception.SystemException {
1634                    getPersistence().setGroups(pk, groups);
1635            }
1636    
1637            /**
1638            * Returns all the users associated with the role.
1639            *
1640            * @param pk the primary key of the role
1641            * @return the users associated with the role
1642            * @throws SystemException if a system exception occurred
1643            */
1644            public static java.util.List<com.liferay.portal.model.User> getUsers(
1645                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1646                    return getPersistence().getUsers(pk);
1647            }
1648    
1649            /**
1650            * Returns a range of all the users associated with the role.
1651            *
1652            * <p>
1653            * 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.
1654            * </p>
1655            *
1656            * @param pk the primary key of the role
1657            * @param start the lower bound of the range of roles
1658            * @param end the upper bound of the range of roles (not inclusive)
1659            * @return the range of users associated with the role
1660            * @throws SystemException if a system exception occurred
1661            */
1662            public static java.util.List<com.liferay.portal.model.User> getUsers(
1663                    long pk, int start, int end)
1664                    throws com.liferay.portal.kernel.exception.SystemException {
1665                    return getPersistence().getUsers(pk, start, end);
1666            }
1667    
1668            /**
1669            * Returns an ordered range of all the users associated with the role.
1670            *
1671            * <p>
1672            * 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.
1673            * </p>
1674            *
1675            * @param pk the primary key of the role
1676            * @param start the lower bound of the range of roles
1677            * @param end the upper bound of the range of roles (not inclusive)
1678            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1679            * @return the ordered range of users associated with the role
1680            * @throws SystemException if a system exception occurred
1681            */
1682            public static java.util.List<com.liferay.portal.model.User> getUsers(
1683                    long pk, int start, int end,
1684                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1685                    throws com.liferay.portal.kernel.exception.SystemException {
1686                    return getPersistence().getUsers(pk, start, end, orderByComparator);
1687            }
1688    
1689            /**
1690            * Returns the number of users associated with the role.
1691            *
1692            * @param pk the primary key of the role
1693            * @return the number of users associated with the role
1694            * @throws SystemException if a system exception occurred
1695            */
1696            public static int getUsersSize(long pk)
1697                    throws com.liferay.portal.kernel.exception.SystemException {
1698                    return getPersistence().getUsersSize(pk);
1699            }
1700    
1701            /**
1702            * Returns <code>true</code> if the user is associated with the role.
1703            *
1704            * @param pk the primary key of the role
1705            * @param userPK the primary key of the user
1706            * @return <code>true</code> if the user is associated with the role; <code>false</code> otherwise
1707            * @throws SystemException if a system exception occurred
1708            */
1709            public static boolean containsUser(long pk, long userPK)
1710                    throws com.liferay.portal.kernel.exception.SystemException {
1711                    return getPersistence().containsUser(pk, userPK);
1712            }
1713    
1714            /**
1715            * Returns <code>true</code> if the role has any users associated with it.
1716            *
1717            * @param pk the primary key of the role to check for associations with users
1718            * @return <code>true</code> if the role has any users associated with it; <code>false</code> otherwise
1719            * @throws SystemException if a system exception occurred
1720            */
1721            public static boolean containsUsers(long pk)
1722                    throws com.liferay.portal.kernel.exception.SystemException {
1723                    return getPersistence().containsUsers(pk);
1724            }
1725    
1726            /**
1727            * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1728            *
1729            * @param pk the primary key of the role
1730            * @param userPK the primary key of the user
1731            * @throws SystemException if a system exception occurred
1732            */
1733            public static void addUser(long pk, long userPK)
1734                    throws com.liferay.portal.kernel.exception.SystemException {
1735                    getPersistence().addUser(pk, userPK);
1736            }
1737    
1738            /**
1739            * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1740            *
1741            * @param pk the primary key of the role
1742            * @param user the user
1743            * @throws SystemException if a system exception occurred
1744            */
1745            public static void addUser(long pk, com.liferay.portal.model.User user)
1746                    throws com.liferay.portal.kernel.exception.SystemException {
1747                    getPersistence().addUser(pk, user);
1748            }
1749    
1750            /**
1751            * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1752            *
1753            * @param pk the primary key of the role
1754            * @param userPKs the primary keys of the users
1755            * @throws SystemException if a system exception occurred
1756            */
1757            public static void addUsers(long pk, long[] userPKs)
1758                    throws com.liferay.portal.kernel.exception.SystemException {
1759                    getPersistence().addUsers(pk, userPKs);
1760            }
1761    
1762            /**
1763            * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1764            *
1765            * @param pk the primary key of the role
1766            * @param users the users
1767            * @throws SystemException if a system exception occurred
1768            */
1769            public static void addUsers(long pk,
1770                    java.util.List<com.liferay.portal.model.User> users)
1771                    throws com.liferay.portal.kernel.exception.SystemException {
1772                    getPersistence().addUsers(pk, users);
1773            }
1774    
1775            /**
1776            * Clears all associations between the role and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1777            *
1778            * @param pk the primary key of the role to clear the associated users from
1779            * @throws SystemException if a system exception occurred
1780            */
1781            public static void clearUsers(long pk)
1782                    throws com.liferay.portal.kernel.exception.SystemException {
1783                    getPersistence().clearUsers(pk);
1784            }
1785    
1786            /**
1787            * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1788            *
1789            * @param pk the primary key of the role
1790            * @param userPK the primary key of the user
1791            * @throws SystemException if a system exception occurred
1792            */
1793            public static void removeUser(long pk, long userPK)
1794                    throws com.liferay.portal.kernel.exception.SystemException {
1795                    getPersistence().removeUser(pk, userPK);
1796            }
1797    
1798            /**
1799            * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1800            *
1801            * @param pk the primary key of the role
1802            * @param user the user
1803            * @throws SystemException if a system exception occurred
1804            */
1805            public static void removeUser(long pk, com.liferay.portal.model.User user)
1806                    throws com.liferay.portal.kernel.exception.SystemException {
1807                    getPersistence().removeUser(pk, user);
1808            }
1809    
1810            /**
1811            * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1812            *
1813            * @param pk the primary key of the role
1814            * @param userPKs the primary keys of the users
1815            * @throws SystemException if a system exception occurred
1816            */
1817            public static void removeUsers(long pk, long[] userPKs)
1818                    throws com.liferay.portal.kernel.exception.SystemException {
1819                    getPersistence().removeUsers(pk, userPKs);
1820            }
1821    
1822            /**
1823            * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1824            *
1825            * @param pk the primary key of the role
1826            * @param users the users
1827            * @throws SystemException if a system exception occurred
1828            */
1829            public static void removeUsers(long pk,
1830                    java.util.List<com.liferay.portal.model.User> users)
1831                    throws com.liferay.portal.kernel.exception.SystemException {
1832                    getPersistence().removeUsers(pk, users);
1833            }
1834    
1835            /**
1836            * 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.
1837            *
1838            * @param pk the primary key of the role
1839            * @param userPKs the primary keys of the users to be associated with the role
1840            * @throws SystemException if a system exception occurred
1841            */
1842            public static void setUsers(long pk, long[] userPKs)
1843                    throws com.liferay.portal.kernel.exception.SystemException {
1844                    getPersistence().setUsers(pk, userPKs);
1845            }
1846    
1847            /**
1848            * 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.
1849            *
1850            * @param pk the primary key of the role
1851            * @param users the users to be associated with the role
1852            * @throws SystemException if a system exception occurred
1853            */
1854            public static void setUsers(long pk,
1855                    java.util.List<com.liferay.portal.model.User> users)
1856                    throws com.liferay.portal.kernel.exception.SystemException {
1857                    getPersistence().setUsers(pk, users);
1858            }
1859    
1860            public static RolePersistence getPersistence() {
1861                    if (_persistence == null) {
1862                            _persistence = (RolePersistence)PortalBeanLocatorUtil.locate(RolePersistence.class.getName());
1863    
1864                            ReferenceRegistry.registerReference(RoleUtil.class, "_persistence");
1865                    }
1866    
1867                    return _persistence;
1868            }
1869    
1870            /**
1871             * @deprecated
1872             */
1873            public void setPersistence(RolePersistence persistence) {
1874            }
1875    
1876            private static RolePersistence _persistence;
1877    }