1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  import com.liferay.portal.model.Role;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="RoleUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       RolePersistence
35   * @see       RolePersistenceImpl
36   * @generated
37   */
38  public class RoleUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(Role)
48       */
49      public static void clearCache(Role role) {
50          getPersistence().clearCache(role);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static Role remove(Role role) throws SystemException {
81          return getPersistence().remove(role);
82      }
83  
84      /**
85       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
86       */
87      public static Role update(Role role, boolean merge)
88          throws SystemException {
89          return getPersistence().update(role, merge);
90      }
91  
92      public static void cacheResult(com.liferay.portal.model.Role role) {
93          getPersistence().cacheResult(role);
94      }
95  
96      public static void cacheResult(
97          java.util.List<com.liferay.portal.model.Role> roles) {
98          getPersistence().cacheResult(roles);
99      }
100 
101     public static com.liferay.portal.model.Role create(long roleId) {
102         return getPersistence().create(roleId);
103     }
104 
105     public static com.liferay.portal.model.Role remove(long roleId)
106         throws com.liferay.portal.NoSuchRoleException,
107             com.liferay.portal.SystemException {
108         return getPersistence().remove(roleId);
109     }
110 
111     /**
112      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
113      */
114     public static com.liferay.portal.model.Role update(
115         com.liferay.portal.model.Role role)
116         throws com.liferay.portal.SystemException {
117         return getPersistence().update(role);
118     }
119 
120     public static com.liferay.portal.model.Role updateImpl(
121         com.liferay.portal.model.Role role, boolean merge)
122         throws com.liferay.portal.SystemException {
123         return getPersistence().updateImpl(role, merge);
124     }
125 
126     public static com.liferay.portal.model.Role findByPrimaryKey(long roleId)
127         throws com.liferay.portal.NoSuchRoleException,
128             com.liferay.portal.SystemException {
129         return getPersistence().findByPrimaryKey(roleId);
130     }
131 
132     public static com.liferay.portal.model.Role fetchByPrimaryKey(long roleId)
133         throws com.liferay.portal.SystemException {
134         return getPersistence().fetchByPrimaryKey(roleId);
135     }
136 
137     public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
138         long companyId) throws com.liferay.portal.SystemException {
139         return getPersistence().findByCompanyId(companyId);
140     }
141 
142     public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
143         long companyId, int start, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByCompanyId(companyId, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
149         long companyId, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151         throws com.liferay.portal.SystemException {
152         return getPersistence()
153                    .findByCompanyId(companyId, start, end, orderByComparator);
154     }
155 
156     public static com.liferay.portal.model.Role findByCompanyId_First(
157         long companyId,
158         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159         throws com.liferay.portal.NoSuchRoleException,
160             com.liferay.portal.SystemException {
161         return getPersistence()
162                    .findByCompanyId_First(companyId, orderByComparator);
163     }
164 
165     public static com.liferay.portal.model.Role findByCompanyId_Last(
166         long companyId,
167         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168         throws com.liferay.portal.NoSuchRoleException,
169             com.liferay.portal.SystemException {
170         return getPersistence()
171                    .findByCompanyId_Last(companyId, orderByComparator);
172     }
173 
174     public static com.liferay.portal.model.Role[] findByCompanyId_PrevAndNext(
175         long roleId, long companyId,
176         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
177         throws com.liferay.portal.NoSuchRoleException,
178             com.liferay.portal.SystemException {
179         return getPersistence()
180                    .findByCompanyId_PrevAndNext(roleId, companyId,
181             orderByComparator);
182     }
183 
184     public static java.util.List<com.liferay.portal.model.Role> findBySubtype(
185         java.lang.String subtype) throws com.liferay.portal.SystemException {
186         return getPersistence().findBySubtype(subtype);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.Role> findBySubtype(
190         java.lang.String subtype, int start, int end)
191         throws com.liferay.portal.SystemException {
192         return getPersistence().findBySubtype(subtype, start, end);
193     }
194 
195     public static java.util.List<com.liferay.portal.model.Role> findBySubtype(
196         java.lang.String subtype, int start, int end,
197         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
198         throws com.liferay.portal.SystemException {
199         return getPersistence()
200                    .findBySubtype(subtype, start, end, orderByComparator);
201     }
202 
203     public static com.liferay.portal.model.Role findBySubtype_First(
204         java.lang.String subtype,
205         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
206         throws com.liferay.portal.NoSuchRoleException,
207             com.liferay.portal.SystemException {
208         return getPersistence().findBySubtype_First(subtype, orderByComparator);
209     }
210 
211     public static com.liferay.portal.model.Role findBySubtype_Last(
212         java.lang.String subtype,
213         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214         throws com.liferay.portal.NoSuchRoleException,
215             com.liferay.portal.SystemException {
216         return getPersistence().findBySubtype_Last(subtype, orderByComparator);
217     }
218 
219     public static com.liferay.portal.model.Role[] findBySubtype_PrevAndNext(
220         long roleId, java.lang.String subtype,
221         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222         throws com.liferay.portal.NoSuchRoleException,
223             com.liferay.portal.SystemException {
224         return getPersistence()
225                    .findBySubtype_PrevAndNext(roleId, subtype, orderByComparator);
226     }
227 
228     public static com.liferay.portal.model.Role findByC_N(long companyId,
229         java.lang.String name)
230         throws com.liferay.portal.NoSuchRoleException,
231             com.liferay.portal.SystemException {
232         return getPersistence().findByC_N(companyId, name);
233     }
234 
235     public static com.liferay.portal.model.Role fetchByC_N(long companyId,
236         java.lang.String name) throws com.liferay.portal.SystemException {
237         return getPersistence().fetchByC_N(companyId, name);
238     }
239 
240     public static com.liferay.portal.model.Role fetchByC_N(long companyId,
241         java.lang.String name, boolean retrieveFromCache)
242         throws com.liferay.portal.SystemException {
243         return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
244     }
245 
246     public static java.util.List<com.liferay.portal.model.Role> findByT_S(
247         int type, java.lang.String subtype)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().findByT_S(type, subtype);
250     }
251 
252     public static java.util.List<com.liferay.portal.model.Role> findByT_S(
253         int type, java.lang.String subtype, int start, int end)
254         throws com.liferay.portal.SystemException {
255         return getPersistence().findByT_S(type, subtype, start, end);
256     }
257 
258     public static java.util.List<com.liferay.portal.model.Role> findByT_S(
259         int type, java.lang.String subtype, int start, int end,
260         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261         throws com.liferay.portal.SystemException {
262         return getPersistence()
263                    .findByT_S(type, subtype, start, end, orderByComparator);
264     }
265 
266     public static com.liferay.portal.model.Role findByT_S_First(int type,
267         java.lang.String subtype,
268         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
269         throws com.liferay.portal.NoSuchRoleException,
270             com.liferay.portal.SystemException {
271         return getPersistence().findByT_S_First(type, subtype, orderByComparator);
272     }
273 
274     public static com.liferay.portal.model.Role findByT_S_Last(int type,
275         java.lang.String subtype,
276         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
277         throws com.liferay.portal.NoSuchRoleException,
278             com.liferay.portal.SystemException {
279         return getPersistence().findByT_S_Last(type, subtype, orderByComparator);
280     }
281 
282     public static com.liferay.portal.model.Role[] findByT_S_PrevAndNext(
283         long roleId, int type, java.lang.String subtype,
284         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285         throws com.liferay.portal.NoSuchRoleException,
286             com.liferay.portal.SystemException {
287         return getPersistence()
288                    .findByT_S_PrevAndNext(roleId, type, subtype,
289             orderByComparator);
290     }
291 
292     public static com.liferay.portal.model.Role findByC_C_C(long companyId,
293         long classNameId, long classPK)
294         throws com.liferay.portal.NoSuchRoleException,
295             com.liferay.portal.SystemException {
296         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
297     }
298 
299     public static com.liferay.portal.model.Role fetchByC_C_C(long companyId,
300         long classNameId, long classPK)
301         throws com.liferay.portal.SystemException {
302         return getPersistence().fetchByC_C_C(companyId, classNameId, classPK);
303     }
304 
305     public static com.liferay.portal.model.Role fetchByC_C_C(long companyId,
306         long classNameId, long classPK, boolean retrieveFromCache)
307         throws com.liferay.portal.SystemException {
308         return getPersistence()
309                    .fetchByC_C_C(companyId, classNameId, classPK,
310             retrieveFromCache);
311     }
312 
313     public static java.util.List<com.liferay.portal.model.Role> findAll()
314         throws com.liferay.portal.SystemException {
315         return getPersistence().findAll();
316     }
317 
318     public static java.util.List<com.liferay.portal.model.Role> findAll(
319         int start, int end) throws com.liferay.portal.SystemException {
320         return getPersistence().findAll(start, end);
321     }
322 
323     public static java.util.List<com.liferay.portal.model.Role> findAll(
324         int start, int end,
325         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
326         throws com.liferay.portal.SystemException {
327         return getPersistence().findAll(start, end, orderByComparator);
328     }
329 
330     public static void removeByCompanyId(long companyId)
331         throws com.liferay.portal.SystemException {
332         getPersistence().removeByCompanyId(companyId);
333     }
334 
335     public static void removeBySubtype(java.lang.String subtype)
336         throws com.liferay.portal.SystemException {
337         getPersistence().removeBySubtype(subtype);
338     }
339 
340     public static void removeByC_N(long companyId, java.lang.String name)
341         throws com.liferay.portal.NoSuchRoleException,
342             com.liferay.portal.SystemException {
343         getPersistence().removeByC_N(companyId, name);
344     }
345 
346     public static void removeByT_S(int type, java.lang.String subtype)
347         throws com.liferay.portal.SystemException {
348         getPersistence().removeByT_S(type, subtype);
349     }
350 
351     public static void removeByC_C_C(long companyId, long classNameId,
352         long classPK)
353         throws com.liferay.portal.NoSuchRoleException,
354             com.liferay.portal.SystemException {
355         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
356     }
357 
358     public static void removeAll() throws com.liferay.portal.SystemException {
359         getPersistence().removeAll();
360     }
361 
362     public static int countByCompanyId(long companyId)
363         throws com.liferay.portal.SystemException {
364         return getPersistence().countByCompanyId(companyId);
365     }
366 
367     public static int countBySubtype(java.lang.String subtype)
368         throws com.liferay.portal.SystemException {
369         return getPersistence().countBySubtype(subtype);
370     }
371 
372     public static int countByC_N(long companyId, java.lang.String name)
373         throws com.liferay.portal.SystemException {
374         return getPersistence().countByC_N(companyId, name);
375     }
376 
377     public static int countByT_S(int type, java.lang.String subtype)
378         throws com.liferay.portal.SystemException {
379         return getPersistence().countByT_S(type, subtype);
380     }
381 
382     public static int countByC_C_C(long companyId, long classNameId,
383         long classPK) throws com.liferay.portal.SystemException {
384         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
385     }
386 
387     public static int countAll() throws com.liferay.portal.SystemException {
388         return getPersistence().countAll();
389     }
390 
391     public static java.util.List<com.liferay.portal.model.Group> getGroups(
392         long pk) throws com.liferay.portal.SystemException {
393         return getPersistence().getGroups(pk);
394     }
395 
396     public static java.util.List<com.liferay.portal.model.Group> getGroups(
397         long pk, int start, int end) throws com.liferay.portal.SystemException {
398         return getPersistence().getGroups(pk, start, end);
399     }
400 
401     public static java.util.List<com.liferay.portal.model.Group> getGroups(
402         long pk, int start, int end,
403         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
404         throws com.liferay.portal.SystemException {
405         return getPersistence().getGroups(pk, start, end, orderByComparator);
406     }
407 
408     public static int getGroupsSize(long pk)
409         throws com.liferay.portal.SystemException {
410         return getPersistence().getGroupsSize(pk);
411     }
412 
413     public static boolean containsGroup(long pk, long groupPK)
414         throws com.liferay.portal.SystemException {
415         return getPersistence().containsGroup(pk, groupPK);
416     }
417 
418     public static boolean containsGroups(long pk)
419         throws com.liferay.portal.SystemException {
420         return getPersistence().containsGroups(pk);
421     }
422 
423     public static void addGroup(long pk, long groupPK)
424         throws com.liferay.portal.SystemException {
425         getPersistence().addGroup(pk, groupPK);
426     }
427 
428     public static void addGroup(long pk, com.liferay.portal.model.Group group)
429         throws com.liferay.portal.SystemException {
430         getPersistence().addGroup(pk, group);
431     }
432 
433     public static void addGroups(long pk, long[] groupPKs)
434         throws com.liferay.portal.SystemException {
435         getPersistence().addGroups(pk, groupPKs);
436     }
437 
438     public static void addGroups(long pk,
439         java.util.List<com.liferay.portal.model.Group> groups)
440         throws com.liferay.portal.SystemException {
441         getPersistence().addGroups(pk, groups);
442     }
443 
444     public static void clearGroups(long pk)
445         throws com.liferay.portal.SystemException {
446         getPersistence().clearGroups(pk);
447     }
448 
449     public static void removeGroup(long pk, long groupPK)
450         throws com.liferay.portal.SystemException {
451         getPersistence().removeGroup(pk, groupPK);
452     }
453 
454     public static void removeGroup(long pk, com.liferay.portal.model.Group group)
455         throws com.liferay.portal.SystemException {
456         getPersistence().removeGroup(pk, group);
457     }
458 
459     public static void removeGroups(long pk, long[] groupPKs)
460         throws com.liferay.portal.SystemException {
461         getPersistence().removeGroups(pk, groupPKs);
462     }
463 
464     public static void removeGroups(long pk,
465         java.util.List<com.liferay.portal.model.Group> groups)
466         throws com.liferay.portal.SystemException {
467         getPersistence().removeGroups(pk, groups);
468     }
469 
470     public static void setGroups(long pk, long[] groupPKs)
471         throws com.liferay.portal.SystemException {
472         getPersistence().setGroups(pk, groupPKs);
473     }
474 
475     public static void setGroups(long pk,
476         java.util.List<com.liferay.portal.model.Group> groups)
477         throws com.liferay.portal.SystemException {
478         getPersistence().setGroups(pk, groups);
479     }
480 
481     public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
482         long pk) throws com.liferay.portal.SystemException {
483         return getPersistence().getPermissions(pk);
484     }
485 
486     public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
487         long pk, int start, int end) throws com.liferay.portal.SystemException {
488         return getPersistence().getPermissions(pk, start, end);
489     }
490 
491     public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
492         long pk, int start, int end,
493         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
494         throws com.liferay.portal.SystemException {
495         return getPersistence().getPermissions(pk, start, end, orderByComparator);
496     }
497 
498     public static int getPermissionsSize(long pk)
499         throws com.liferay.portal.SystemException {
500         return getPersistence().getPermissionsSize(pk);
501     }
502 
503     public static boolean containsPermission(long pk, long permissionPK)
504         throws com.liferay.portal.SystemException {
505         return getPersistence().containsPermission(pk, permissionPK);
506     }
507 
508     public static boolean containsPermissions(long pk)
509         throws com.liferay.portal.SystemException {
510         return getPersistence().containsPermissions(pk);
511     }
512 
513     public static void addPermission(long pk, long permissionPK)
514         throws com.liferay.portal.SystemException {
515         getPersistence().addPermission(pk, permissionPK);
516     }
517 
518     public static void addPermission(long pk,
519         com.liferay.portal.model.Permission permission)
520         throws com.liferay.portal.SystemException {
521         getPersistence().addPermission(pk, permission);
522     }
523 
524     public static void addPermissions(long pk, long[] permissionPKs)
525         throws com.liferay.portal.SystemException {
526         getPersistence().addPermissions(pk, permissionPKs);
527     }
528 
529     public static void addPermissions(long pk,
530         java.util.List<com.liferay.portal.model.Permission> permissions)
531         throws com.liferay.portal.SystemException {
532         getPersistence().addPermissions(pk, permissions);
533     }
534 
535     public static void clearPermissions(long pk)
536         throws com.liferay.portal.SystemException {
537         getPersistence().clearPermissions(pk);
538     }
539 
540     public static void removePermission(long pk, long permissionPK)
541         throws com.liferay.portal.SystemException {
542         getPersistence().removePermission(pk, permissionPK);
543     }
544 
545     public static void removePermission(long pk,
546         com.liferay.portal.model.Permission permission)
547         throws com.liferay.portal.SystemException {
548         getPersistence().removePermission(pk, permission);
549     }
550 
551     public static void removePermissions(long pk, long[] permissionPKs)
552         throws com.liferay.portal.SystemException {
553         getPersistence().removePermissions(pk, permissionPKs);
554     }
555 
556     public static void removePermissions(long pk,
557         java.util.List<com.liferay.portal.model.Permission> permissions)
558         throws com.liferay.portal.SystemException {
559         getPersistence().removePermissions(pk, permissions);
560     }
561 
562     public static void setPermissions(long pk, long[] permissionPKs)
563         throws com.liferay.portal.SystemException {
564         getPersistence().setPermissions(pk, permissionPKs);
565     }
566 
567     public static void setPermissions(long pk,
568         java.util.List<com.liferay.portal.model.Permission> permissions)
569         throws com.liferay.portal.SystemException {
570         getPersistence().setPermissions(pk, permissions);
571     }
572 
573     public static java.util.List<com.liferay.portal.model.User> getUsers(
574         long pk) throws com.liferay.portal.SystemException {
575         return getPersistence().getUsers(pk);
576     }
577 
578     public static java.util.List<com.liferay.portal.model.User> getUsers(
579         long pk, int start, int end) throws com.liferay.portal.SystemException {
580         return getPersistence().getUsers(pk, start, end);
581     }
582 
583     public static java.util.List<com.liferay.portal.model.User> getUsers(
584         long pk, int start, int end,
585         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
586         throws com.liferay.portal.SystemException {
587         return getPersistence().getUsers(pk, start, end, orderByComparator);
588     }
589 
590     public static int getUsersSize(long pk)
591         throws com.liferay.portal.SystemException {
592         return getPersistence().getUsersSize(pk);
593     }
594 
595     public static boolean containsUser(long pk, long userPK)
596         throws com.liferay.portal.SystemException {
597         return getPersistence().containsUser(pk, userPK);
598     }
599 
600     public static boolean containsUsers(long pk)
601         throws com.liferay.portal.SystemException {
602         return getPersistence().containsUsers(pk);
603     }
604 
605     public static void addUser(long pk, long userPK)
606         throws com.liferay.portal.SystemException {
607         getPersistence().addUser(pk, userPK);
608     }
609 
610     public static void addUser(long pk, com.liferay.portal.model.User user)
611         throws com.liferay.portal.SystemException {
612         getPersistence().addUser(pk, user);
613     }
614 
615     public static void addUsers(long pk, long[] userPKs)
616         throws com.liferay.portal.SystemException {
617         getPersistence().addUsers(pk, userPKs);
618     }
619 
620     public static void addUsers(long pk,
621         java.util.List<com.liferay.portal.model.User> users)
622         throws com.liferay.portal.SystemException {
623         getPersistence().addUsers(pk, users);
624     }
625 
626     public static void clearUsers(long pk)
627         throws com.liferay.portal.SystemException {
628         getPersistence().clearUsers(pk);
629     }
630 
631     public static void removeUser(long pk, long userPK)
632         throws com.liferay.portal.SystemException {
633         getPersistence().removeUser(pk, userPK);
634     }
635 
636     public static void removeUser(long pk, com.liferay.portal.model.User user)
637         throws com.liferay.portal.SystemException {
638         getPersistence().removeUser(pk, user);
639     }
640 
641     public static void removeUsers(long pk, long[] userPKs)
642         throws com.liferay.portal.SystemException {
643         getPersistence().removeUsers(pk, userPKs);
644     }
645 
646     public static void removeUsers(long pk,
647         java.util.List<com.liferay.portal.model.User> users)
648         throws com.liferay.portal.SystemException {
649         getPersistence().removeUsers(pk, users);
650     }
651 
652     public static void setUsers(long pk, long[] userPKs)
653         throws com.liferay.portal.SystemException {
654         getPersistence().setUsers(pk, userPKs);
655     }
656 
657     public static void setUsers(long pk,
658         java.util.List<com.liferay.portal.model.User> users)
659         throws com.liferay.portal.SystemException {
660         getPersistence().setUsers(pk, users);
661     }
662 
663     public static RolePersistence getPersistence() {
664         if (_persistence == null) {
665             _persistence = (RolePersistence)PortalBeanLocatorUtil.locate(RolePersistence.class.getName());
666 
667             ReferenceRegistry.registerReference(RoleUtil.class, "_persistence");
668         }
669 
670         return _persistence;
671     }
672 
673     public void setPersistence(RolePersistence persistence) {
674         _persistence = persistence;
675 
676         ReferenceRegistry.registerReference(RoleUtil.class, "_persistence");
677     }
678 
679     private static RolePersistence _persistence;
680 }