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