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