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