1
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.model.Role;
21
22 import java.util.List;
23
24
37 public class RoleUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49 throws SystemException {
50 return getPersistence().findWithDynamicQuery(dynamicQuery);
51 }
52
53
56 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57 int start, int end) throws SystemException {
58 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59 }
60
61
64 public static Role remove(Role role) throws SystemException {
65 return getPersistence().remove(role);
66 }
67
68
71 public static Role update(Role role, boolean merge)
72 throws SystemException {
73 return getPersistence().update(role, merge);
74 }
75
76 public static void cacheResult(com.liferay.portal.model.Role role) {
77 getPersistence().cacheResult(role);
78 }
79
80 public static void cacheResult(
81 java.util.List<com.liferay.portal.model.Role> roles) {
82 getPersistence().cacheResult(roles);
83 }
84
85 public static com.liferay.portal.model.Role create(long roleId) {
86 return getPersistence().create(roleId);
87 }
88
89 public static com.liferay.portal.model.Role remove(long roleId)
90 throws com.liferay.portal.NoSuchRoleException,
91 com.liferay.portal.SystemException {
92 return getPersistence().remove(roleId);
93 }
94
95
98 public static com.liferay.portal.model.Role update(
99 com.liferay.portal.model.Role role)
100 throws com.liferay.portal.SystemException {
101 return getPersistence().update(role);
102 }
103
104 public static com.liferay.portal.model.Role updateImpl(
105 com.liferay.portal.model.Role role, boolean merge)
106 throws com.liferay.portal.SystemException {
107 return getPersistence().updateImpl(role, merge);
108 }
109
110 public static com.liferay.portal.model.Role findByPrimaryKey(long roleId)
111 throws com.liferay.portal.NoSuchRoleException,
112 com.liferay.portal.SystemException {
113 return getPersistence().findByPrimaryKey(roleId);
114 }
115
116 public static com.liferay.portal.model.Role fetchByPrimaryKey(long roleId)
117 throws com.liferay.portal.SystemException {
118 return getPersistence().fetchByPrimaryKey(roleId);
119 }
120
121 public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
122 long companyId) throws com.liferay.portal.SystemException {
123 return getPersistence().findByCompanyId(companyId);
124 }
125
126 public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
127 long companyId, int start, int end)
128 throws com.liferay.portal.SystemException {
129 return getPersistence().findByCompanyId(companyId, start, end);
130 }
131
132 public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
133 long companyId, int start, int end,
134 com.liferay.portal.kernel.util.OrderByComparator obc)
135 throws com.liferay.portal.SystemException {
136 return getPersistence().findByCompanyId(companyId, start, end, obc);
137 }
138
139 public static com.liferay.portal.model.Role findByCompanyId_First(
140 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
141 throws com.liferay.portal.NoSuchRoleException,
142 com.liferay.portal.SystemException {
143 return getPersistence().findByCompanyId_First(companyId, obc);
144 }
145
146 public static com.liferay.portal.model.Role findByCompanyId_Last(
147 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
148 throws com.liferay.portal.NoSuchRoleException,
149 com.liferay.portal.SystemException {
150 return getPersistence().findByCompanyId_Last(companyId, obc);
151 }
152
153 public static com.liferay.portal.model.Role[] findByCompanyId_PrevAndNext(
154 long roleId, long companyId,
155 com.liferay.portal.kernel.util.OrderByComparator obc)
156 throws com.liferay.portal.NoSuchRoleException,
157 com.liferay.portal.SystemException {
158 return getPersistence()
159 .findByCompanyId_PrevAndNext(roleId, companyId, obc);
160 }
161
162 public static com.liferay.portal.model.Role findByC_N(long companyId,
163 java.lang.String name)
164 throws com.liferay.portal.NoSuchRoleException,
165 com.liferay.portal.SystemException {
166 return getPersistence().findByC_N(companyId, name);
167 }
168
169 public static com.liferay.portal.model.Role fetchByC_N(long companyId,
170 java.lang.String name) throws com.liferay.portal.SystemException {
171 return getPersistence().fetchByC_N(companyId, name);
172 }
173
174 public static com.liferay.portal.model.Role fetchByC_N(long companyId,
175 java.lang.String name, boolean retrieveFromCache)
176 throws com.liferay.portal.SystemException {
177 return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
178 }
179
180 public static com.liferay.portal.model.Role findByC_C_C(long companyId,
181 long classNameId, long classPK)
182 throws com.liferay.portal.NoSuchRoleException,
183 com.liferay.portal.SystemException {
184 return getPersistence().findByC_C_C(companyId, classNameId, classPK);
185 }
186
187 public static com.liferay.portal.model.Role fetchByC_C_C(long companyId,
188 long classNameId, long classPK)
189 throws com.liferay.portal.SystemException {
190 return getPersistence().fetchByC_C_C(companyId, classNameId, classPK);
191 }
192
193 public static com.liferay.portal.model.Role fetchByC_C_C(long companyId,
194 long classNameId, long classPK, boolean retrieveFromCache)
195 throws com.liferay.portal.SystemException {
196 return getPersistence()
197 .fetchByC_C_C(companyId, classNameId, classPK,
198 retrieveFromCache);
199 }
200
201 public static java.util.List<com.liferay.portal.model.Role> findAll()
202 throws com.liferay.portal.SystemException {
203 return getPersistence().findAll();
204 }
205
206 public static java.util.List<com.liferay.portal.model.Role> findAll(
207 int start, int end) throws com.liferay.portal.SystemException {
208 return getPersistence().findAll(start, end);
209 }
210
211 public static java.util.List<com.liferay.portal.model.Role> findAll(
212 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
213 throws com.liferay.portal.SystemException {
214 return getPersistence().findAll(start, end, obc);
215 }
216
217 public static void removeByCompanyId(long companyId)
218 throws com.liferay.portal.SystemException {
219 getPersistence().removeByCompanyId(companyId);
220 }
221
222 public static void removeByC_N(long companyId, java.lang.String name)
223 throws com.liferay.portal.NoSuchRoleException,
224 com.liferay.portal.SystemException {
225 getPersistence().removeByC_N(companyId, name);
226 }
227
228 public static void removeByC_C_C(long companyId, long classNameId,
229 long classPK)
230 throws com.liferay.portal.NoSuchRoleException,
231 com.liferay.portal.SystemException {
232 getPersistence().removeByC_C_C(companyId, classNameId, classPK);
233 }
234
235 public static void removeAll() throws com.liferay.portal.SystemException {
236 getPersistence().removeAll();
237 }
238
239 public static int countByCompanyId(long companyId)
240 throws com.liferay.portal.SystemException {
241 return getPersistence().countByCompanyId(companyId);
242 }
243
244 public static int countByC_N(long companyId, java.lang.String name)
245 throws com.liferay.portal.SystemException {
246 return getPersistence().countByC_N(companyId, name);
247 }
248
249 public static int countByC_C_C(long companyId, long classNameId,
250 long classPK) throws com.liferay.portal.SystemException {
251 return getPersistence().countByC_C_C(companyId, classNameId, classPK);
252 }
253
254 public static int countAll() throws com.liferay.portal.SystemException {
255 return getPersistence().countAll();
256 }
257
258 public static java.util.List<com.liferay.portal.model.Group> getGroups(
259 long pk) throws com.liferay.portal.SystemException {
260 return getPersistence().getGroups(pk);
261 }
262
263 public static java.util.List<com.liferay.portal.model.Group> getGroups(
264 long pk, int start, int end) throws com.liferay.portal.SystemException {
265 return getPersistence().getGroups(pk, start, end);
266 }
267
268 public static java.util.List<com.liferay.portal.model.Group> getGroups(
269 long pk, int start, int end,
270 com.liferay.portal.kernel.util.OrderByComparator obc)
271 throws com.liferay.portal.SystemException {
272 return getPersistence().getGroups(pk, start, end, obc);
273 }
274
275 public static int getGroupsSize(long pk)
276 throws com.liferay.portal.SystemException {
277 return getPersistence().getGroupsSize(pk);
278 }
279
280 public static boolean containsGroup(long pk, long groupPK)
281 throws com.liferay.portal.SystemException {
282 return getPersistence().containsGroup(pk, groupPK);
283 }
284
285 public static boolean containsGroups(long pk)
286 throws com.liferay.portal.SystemException {
287 return getPersistence().containsGroups(pk);
288 }
289
290 public static void addGroup(long pk, long groupPK)
291 throws com.liferay.portal.SystemException {
292 getPersistence().addGroup(pk, groupPK);
293 }
294
295 public static void addGroup(long pk, com.liferay.portal.model.Group group)
296 throws com.liferay.portal.SystemException {
297 getPersistence().addGroup(pk, group);
298 }
299
300 public static void addGroups(long pk, long[] groupPKs)
301 throws com.liferay.portal.SystemException {
302 getPersistence().addGroups(pk, groupPKs);
303 }
304
305 public static void addGroups(long pk,
306 java.util.List<com.liferay.portal.model.Group> groups)
307 throws com.liferay.portal.SystemException {
308 getPersistence().addGroups(pk, groups);
309 }
310
311 public static void clearGroups(long pk)
312 throws com.liferay.portal.SystemException {
313 getPersistence().clearGroups(pk);
314 }
315
316 public static void removeGroup(long pk, long groupPK)
317 throws com.liferay.portal.SystemException {
318 getPersistence().removeGroup(pk, groupPK);
319 }
320
321 public static void removeGroup(long pk, com.liferay.portal.model.Group group)
322 throws com.liferay.portal.SystemException {
323 getPersistence().removeGroup(pk, group);
324 }
325
326 public static void removeGroups(long pk, long[] groupPKs)
327 throws com.liferay.portal.SystemException {
328 getPersistence().removeGroups(pk, groupPKs);
329 }
330
331 public static void removeGroups(long pk,
332 java.util.List<com.liferay.portal.model.Group> groups)
333 throws com.liferay.portal.SystemException {
334 getPersistence().removeGroups(pk, groups);
335 }
336
337 public static void setGroups(long pk, long[] groupPKs)
338 throws com.liferay.portal.SystemException {
339 getPersistence().setGroups(pk, groupPKs);
340 }
341
342 public static void setGroups(long pk,
343 java.util.List<com.liferay.portal.model.Group> groups)
344 throws com.liferay.portal.SystemException {
345 getPersistence().setGroups(pk, groups);
346 }
347
348 public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
349 long pk) throws com.liferay.portal.SystemException {
350 return getPersistence().getPermissions(pk);
351 }
352
353 public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
354 long pk, int start, int end) throws com.liferay.portal.SystemException {
355 return getPersistence().getPermissions(pk, start, end);
356 }
357
358 public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
359 long pk, int start, int end,
360 com.liferay.portal.kernel.util.OrderByComparator obc)
361 throws com.liferay.portal.SystemException {
362 return getPersistence().getPermissions(pk, start, end, obc);
363 }
364
365 public static int getPermissionsSize(long pk)
366 throws com.liferay.portal.SystemException {
367 return getPersistence().getPermissionsSize(pk);
368 }
369
370 public static boolean containsPermission(long pk, long permissionPK)
371 throws com.liferay.portal.SystemException {
372 return getPersistence().containsPermission(pk, permissionPK);
373 }
374
375 public static boolean containsPermissions(long pk)
376 throws com.liferay.portal.SystemException {
377 return getPersistence().containsPermissions(pk);
378 }
379
380 public static void addPermission(long pk, long permissionPK)
381 throws com.liferay.portal.SystemException {
382 getPersistence().addPermission(pk, permissionPK);
383 }
384
385 public static void addPermission(long pk,
386 com.liferay.portal.model.Permission permission)
387 throws com.liferay.portal.SystemException {
388 getPersistence().addPermission(pk, permission);
389 }
390
391 public static void addPermissions(long pk, long[] permissionPKs)
392 throws com.liferay.portal.SystemException {
393 getPersistence().addPermissions(pk, permissionPKs);
394 }
395
396 public static void addPermissions(long pk,
397 java.util.List<com.liferay.portal.model.Permission> permissions)
398 throws com.liferay.portal.SystemException {
399 getPersistence().addPermissions(pk, permissions);
400 }
401
402 public static void clearPermissions(long pk)
403 throws com.liferay.portal.SystemException {
404 getPersistence().clearPermissions(pk);
405 }
406
407 public static void removePermission(long pk, long permissionPK)
408 throws com.liferay.portal.SystemException {
409 getPersistence().removePermission(pk, permissionPK);
410 }
411
412 public static void removePermission(long pk,
413 com.liferay.portal.model.Permission permission)
414 throws com.liferay.portal.SystemException {
415 getPersistence().removePermission(pk, permission);
416 }
417
418 public static void removePermissions(long pk, long[] permissionPKs)
419 throws com.liferay.portal.SystemException {
420 getPersistence().removePermissions(pk, permissionPKs);
421 }
422
423 public static void removePermissions(long pk,
424 java.util.List<com.liferay.portal.model.Permission> permissions)
425 throws com.liferay.portal.SystemException {
426 getPersistence().removePermissions(pk, permissions);
427 }
428
429 public static void setPermissions(long pk, long[] permissionPKs)
430 throws com.liferay.portal.SystemException {
431 getPersistence().setPermissions(pk, permissionPKs);
432 }
433
434 public static void setPermissions(long pk,
435 java.util.List<com.liferay.portal.model.Permission> permissions)
436 throws com.liferay.portal.SystemException {
437 getPersistence().setPermissions(pk, permissions);
438 }
439
440 public static java.util.List<com.liferay.portal.model.User> getUsers(
441 long pk) throws com.liferay.portal.SystemException {
442 return getPersistence().getUsers(pk);
443 }
444
445 public static java.util.List<com.liferay.portal.model.User> getUsers(
446 long pk, int start, int end) throws com.liferay.portal.SystemException {
447 return getPersistence().getUsers(pk, start, end);
448 }
449
450 public static java.util.List<com.liferay.portal.model.User> getUsers(
451 long pk, int start, int end,
452 com.liferay.portal.kernel.util.OrderByComparator obc)
453 throws com.liferay.portal.SystemException {
454 return getPersistence().getUsers(pk, start, end, obc);
455 }
456
457 public static int getUsersSize(long pk)
458 throws com.liferay.portal.SystemException {
459 return getPersistence().getUsersSize(pk);
460 }
461
462 public static boolean containsUser(long pk, long userPK)
463 throws com.liferay.portal.SystemException {
464 return getPersistence().containsUser(pk, userPK);
465 }
466
467 public static boolean containsUsers(long pk)
468 throws com.liferay.portal.SystemException {
469 return getPersistence().containsUsers(pk);
470 }
471
472 public static void addUser(long pk, long userPK)
473 throws com.liferay.portal.SystemException {
474 getPersistence().addUser(pk, userPK);
475 }
476
477 public static void addUser(long pk, com.liferay.portal.model.User user)
478 throws com.liferay.portal.SystemException {
479 getPersistence().addUser(pk, user);
480 }
481
482 public static void addUsers(long pk, long[] userPKs)
483 throws com.liferay.portal.SystemException {
484 getPersistence().addUsers(pk, userPKs);
485 }
486
487 public static void addUsers(long pk,
488 java.util.List<com.liferay.portal.model.User> users)
489 throws com.liferay.portal.SystemException {
490 getPersistence().addUsers(pk, users);
491 }
492
493 public static void clearUsers(long pk)
494 throws com.liferay.portal.SystemException {
495 getPersistence().clearUsers(pk);
496 }
497
498 public static void removeUser(long pk, long userPK)
499 throws com.liferay.portal.SystemException {
500 getPersistence().removeUser(pk, userPK);
501 }
502
503 public static void removeUser(long pk, com.liferay.portal.model.User user)
504 throws com.liferay.portal.SystemException {
505 getPersistence().removeUser(pk, user);
506 }
507
508 public static void removeUsers(long pk, long[] userPKs)
509 throws com.liferay.portal.SystemException {
510 getPersistence().removeUsers(pk, userPKs);
511 }
512
513 public static void removeUsers(long pk,
514 java.util.List<com.liferay.portal.model.User> users)
515 throws com.liferay.portal.SystemException {
516 getPersistence().removeUsers(pk, users);
517 }
518
519 public static void setUsers(long pk, long[] userPKs)
520 throws com.liferay.portal.SystemException {
521 getPersistence().setUsers(pk, userPKs);
522 }
523
524 public static void setUsers(long pk,
525 java.util.List<com.liferay.portal.model.User> users)
526 throws com.liferay.portal.SystemException {
527 getPersistence().setUsers(pk, users);
528 }
529
530 public static RolePersistence getPersistence() {
531 if (_persistence == null) {
532 _persistence = (RolePersistence)PortalBeanLocatorUtil.locate(RolePersistence.class.getName());
533 }
534
535 return _persistence;
536 }
537
538 public void setPersistence(RolePersistence persistence) {
539 _persistence = persistence;
540 }
541
542 private static RolePersistence _persistence;
543 }