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