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.model.Permission;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="PermissionUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       PermissionPersistence
34   * @see       PermissionPersistenceImpl
35   * @generated
36   */
37  public class PermissionUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
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      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static Permission remove(Permission permission)
65          throws SystemException {
66          return getPersistence().remove(permission);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
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      /**
98       * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
99       */
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 orderByComparator)
138         throws com.liferay.portal.SystemException {
139         return getPersistence()
140                    .findByResourceId(resourceId, start, end, orderByComparator);
141     }
142 
143     public static com.liferay.portal.model.Permission findByResourceId_First(
144         long resourceId,
145         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
146         throws com.liferay.portal.NoSuchPermissionException,
147             com.liferay.portal.SystemException {
148         return getPersistence()
149                    .findByResourceId_First(resourceId, orderByComparator);
150     }
151 
152     public static com.liferay.portal.model.Permission findByResourceId_Last(
153         long resourceId,
154         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
155         throws com.liferay.portal.NoSuchPermissionException,
156             com.liferay.portal.SystemException {
157         return getPersistence()
158                    .findByResourceId_Last(resourceId, orderByComparator);
159     }
160 
161     public static com.liferay.portal.model.Permission[] findByResourceId_PrevAndNext(
162         long permissionId, long resourceId,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.NoSuchPermissionException,
165             com.liferay.portal.SystemException {
166         return getPersistence()
167                    .findByResourceId_PrevAndNext(permissionId, resourceId,
168             orderByComparator);
169     }
170 
171     public static com.liferay.portal.model.Permission findByA_R(
172         java.lang.String actionId, long resourceId)
173         throws com.liferay.portal.NoSuchPermissionException,
174             com.liferay.portal.SystemException {
175         return getPersistence().findByA_R(actionId, resourceId);
176     }
177 
178     public static com.liferay.portal.model.Permission fetchByA_R(
179         java.lang.String actionId, long resourceId)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().fetchByA_R(actionId, resourceId);
182     }
183 
184     public static com.liferay.portal.model.Permission fetchByA_R(
185         java.lang.String actionId, long resourceId, boolean retrieveFromCache)
186         throws com.liferay.portal.SystemException {
187         return getPersistence()
188                    .fetchByA_R(actionId, resourceId, retrieveFromCache);
189     }
190 
191     public static java.util.List<com.liferay.portal.model.Permission> findAll()
192         throws com.liferay.portal.SystemException {
193         return getPersistence().findAll();
194     }
195 
196     public static java.util.List<com.liferay.portal.model.Permission> findAll(
197         int start, int end) throws com.liferay.portal.SystemException {
198         return getPersistence().findAll(start, end);
199     }
200 
201     public static java.util.List<com.liferay.portal.model.Permission> findAll(
202         int start, int end,
203         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204         throws com.liferay.portal.SystemException {
205         return getPersistence().findAll(start, end, orderByComparator);
206     }
207 
208     public static void removeByResourceId(long resourceId)
209         throws com.liferay.portal.SystemException {
210         getPersistence().removeByResourceId(resourceId);
211     }
212 
213     public static void removeByA_R(java.lang.String actionId, long resourceId)
214         throws com.liferay.portal.NoSuchPermissionException,
215             com.liferay.portal.SystemException {
216         getPersistence().removeByA_R(actionId, resourceId);
217     }
218 
219     public static void removeAll() throws com.liferay.portal.SystemException {
220         getPersistence().removeAll();
221     }
222 
223     public static int countByResourceId(long resourceId)
224         throws com.liferay.portal.SystemException {
225         return getPersistence().countByResourceId(resourceId);
226     }
227 
228     public static int countByA_R(java.lang.String actionId, long resourceId)
229         throws com.liferay.portal.SystemException {
230         return getPersistence().countByA_R(actionId, resourceId);
231     }
232 
233     public static int countAll() throws com.liferay.portal.SystemException {
234         return getPersistence().countAll();
235     }
236 
237     public static java.util.List<com.liferay.portal.model.Group> getGroups(
238         long pk) throws com.liferay.portal.SystemException {
239         return getPersistence().getGroups(pk);
240     }
241 
242     public static java.util.List<com.liferay.portal.model.Group> getGroups(
243         long pk, int start, int end) throws com.liferay.portal.SystemException {
244         return getPersistence().getGroups(pk, start, end);
245     }
246 
247     public static java.util.List<com.liferay.portal.model.Group> getGroups(
248         long pk, int start, int end,
249         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
250         throws com.liferay.portal.SystemException {
251         return getPersistence().getGroups(pk, start, end, orderByComparator);
252     }
253 
254     public static int getGroupsSize(long pk)
255         throws com.liferay.portal.SystemException {
256         return getPersistence().getGroupsSize(pk);
257     }
258 
259     public static boolean containsGroup(long pk, long groupPK)
260         throws com.liferay.portal.SystemException {
261         return getPersistence().containsGroup(pk, groupPK);
262     }
263 
264     public static boolean containsGroups(long pk)
265         throws com.liferay.portal.SystemException {
266         return getPersistence().containsGroups(pk);
267     }
268 
269     public static void addGroup(long pk, long groupPK)
270         throws com.liferay.portal.SystemException {
271         getPersistence().addGroup(pk, groupPK);
272     }
273 
274     public static void addGroup(long pk, com.liferay.portal.model.Group group)
275         throws com.liferay.portal.SystemException {
276         getPersistence().addGroup(pk, group);
277     }
278 
279     public static void addGroups(long pk, long[] groupPKs)
280         throws com.liferay.portal.SystemException {
281         getPersistence().addGroups(pk, groupPKs);
282     }
283 
284     public static void addGroups(long pk,
285         java.util.List<com.liferay.portal.model.Group> groups)
286         throws com.liferay.portal.SystemException {
287         getPersistence().addGroups(pk, groups);
288     }
289 
290     public static void clearGroups(long pk)
291         throws com.liferay.portal.SystemException {
292         getPersistence().clearGroups(pk);
293     }
294 
295     public static void removeGroup(long pk, long groupPK)
296         throws com.liferay.portal.SystemException {
297         getPersistence().removeGroup(pk, groupPK);
298     }
299 
300     public static void removeGroup(long pk, com.liferay.portal.model.Group group)
301         throws com.liferay.portal.SystemException {
302         getPersistence().removeGroup(pk, group);
303     }
304 
305     public static void removeGroups(long pk, long[] groupPKs)
306         throws com.liferay.portal.SystemException {
307         getPersistence().removeGroups(pk, groupPKs);
308     }
309 
310     public static void removeGroups(long pk,
311         java.util.List<com.liferay.portal.model.Group> groups)
312         throws com.liferay.portal.SystemException {
313         getPersistence().removeGroups(pk, groups);
314     }
315 
316     public static void setGroups(long pk, long[] groupPKs)
317         throws com.liferay.portal.SystemException {
318         getPersistence().setGroups(pk, groupPKs);
319     }
320 
321     public static void setGroups(long pk,
322         java.util.List<com.liferay.portal.model.Group> groups)
323         throws com.liferay.portal.SystemException {
324         getPersistence().setGroups(pk, groups);
325     }
326 
327     public static java.util.List<com.liferay.portal.model.Role> getRoles(
328         long pk) throws com.liferay.portal.SystemException {
329         return getPersistence().getRoles(pk);
330     }
331 
332     public static java.util.List<com.liferay.portal.model.Role> getRoles(
333         long pk, int start, int end) throws com.liferay.portal.SystemException {
334         return getPersistence().getRoles(pk, start, end);
335     }
336 
337     public static java.util.List<com.liferay.portal.model.Role> getRoles(
338         long pk, int start, int end,
339         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
340         throws com.liferay.portal.SystemException {
341         return getPersistence().getRoles(pk, start, end, orderByComparator);
342     }
343 
344     public static int getRolesSize(long pk)
345         throws com.liferay.portal.SystemException {
346         return getPersistence().getRolesSize(pk);
347     }
348 
349     public static boolean containsRole(long pk, long rolePK)
350         throws com.liferay.portal.SystemException {
351         return getPersistence().containsRole(pk, rolePK);
352     }
353 
354     public static boolean containsRoles(long pk)
355         throws com.liferay.portal.SystemException {
356         return getPersistence().containsRoles(pk);
357     }
358 
359     public static void addRole(long pk, long rolePK)
360         throws com.liferay.portal.SystemException {
361         getPersistence().addRole(pk, rolePK);
362     }
363 
364     public static void addRole(long pk, com.liferay.portal.model.Role role)
365         throws com.liferay.portal.SystemException {
366         getPersistence().addRole(pk, role);
367     }
368 
369     public static void addRoles(long pk, long[] rolePKs)
370         throws com.liferay.portal.SystemException {
371         getPersistence().addRoles(pk, rolePKs);
372     }
373 
374     public static void addRoles(long pk,
375         java.util.List<com.liferay.portal.model.Role> roles)
376         throws com.liferay.portal.SystemException {
377         getPersistence().addRoles(pk, roles);
378     }
379 
380     public static void clearRoles(long pk)
381         throws com.liferay.portal.SystemException {
382         getPersistence().clearRoles(pk);
383     }
384 
385     public static void removeRole(long pk, long rolePK)
386         throws com.liferay.portal.SystemException {
387         getPersistence().removeRole(pk, rolePK);
388     }
389 
390     public static void removeRole(long pk, com.liferay.portal.model.Role role)
391         throws com.liferay.portal.SystemException {
392         getPersistence().removeRole(pk, role);
393     }
394 
395     public static void removeRoles(long pk, long[] rolePKs)
396         throws com.liferay.portal.SystemException {
397         getPersistence().removeRoles(pk, rolePKs);
398     }
399 
400     public static void removeRoles(long pk,
401         java.util.List<com.liferay.portal.model.Role> roles)
402         throws com.liferay.portal.SystemException {
403         getPersistence().removeRoles(pk, roles);
404     }
405 
406     public static void setRoles(long pk, long[] rolePKs)
407         throws com.liferay.portal.SystemException {
408         getPersistence().setRoles(pk, rolePKs);
409     }
410 
411     public static void setRoles(long pk,
412         java.util.List<com.liferay.portal.model.Role> roles)
413         throws com.liferay.portal.SystemException {
414         getPersistence().setRoles(pk, roles);
415     }
416 
417     public static java.util.List<com.liferay.portal.model.User> getUsers(
418         long pk) throws com.liferay.portal.SystemException {
419         return getPersistence().getUsers(pk);
420     }
421 
422     public static java.util.List<com.liferay.portal.model.User> getUsers(
423         long pk, int start, int end) throws com.liferay.portal.SystemException {
424         return getPersistence().getUsers(pk, start, end);
425     }
426 
427     public static java.util.List<com.liferay.portal.model.User> getUsers(
428         long pk, int start, int end,
429         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
430         throws com.liferay.portal.SystemException {
431         return getPersistence().getUsers(pk, start, end, orderByComparator);
432     }
433 
434     public static int getUsersSize(long pk)
435         throws com.liferay.portal.SystemException {
436         return getPersistence().getUsersSize(pk);
437     }
438 
439     public static boolean containsUser(long pk, long userPK)
440         throws com.liferay.portal.SystemException {
441         return getPersistence().containsUser(pk, userPK);
442     }
443 
444     public static boolean containsUsers(long pk)
445         throws com.liferay.portal.SystemException {
446         return getPersistence().containsUsers(pk);
447     }
448 
449     public static void addUser(long pk, long userPK)
450         throws com.liferay.portal.SystemException {
451         getPersistence().addUser(pk, userPK);
452     }
453 
454     public static void addUser(long pk, com.liferay.portal.model.User user)
455         throws com.liferay.portal.SystemException {
456         getPersistence().addUser(pk, user);
457     }
458 
459     public static void addUsers(long pk, long[] userPKs)
460         throws com.liferay.portal.SystemException {
461         getPersistence().addUsers(pk, userPKs);
462     }
463 
464     public static void addUsers(long pk,
465         java.util.List<com.liferay.portal.model.User> users)
466         throws com.liferay.portal.SystemException {
467         getPersistence().addUsers(pk, users);
468     }
469 
470     public static void clearUsers(long pk)
471         throws com.liferay.portal.SystemException {
472         getPersistence().clearUsers(pk);
473     }
474 
475     public static void removeUser(long pk, long userPK)
476         throws com.liferay.portal.SystemException {
477         getPersistence().removeUser(pk, userPK);
478     }
479 
480     public static void removeUser(long pk, com.liferay.portal.model.User user)
481         throws com.liferay.portal.SystemException {
482         getPersistence().removeUser(pk, user);
483     }
484 
485     public static void removeUsers(long pk, long[] userPKs)
486         throws com.liferay.portal.SystemException {
487         getPersistence().removeUsers(pk, userPKs);
488     }
489 
490     public static void removeUsers(long pk,
491         java.util.List<com.liferay.portal.model.User> users)
492         throws com.liferay.portal.SystemException {
493         getPersistence().removeUsers(pk, users);
494     }
495 
496     public static void setUsers(long pk, long[] userPKs)
497         throws com.liferay.portal.SystemException {
498         getPersistence().setUsers(pk, userPKs);
499     }
500 
501     public static void setUsers(long pk,
502         java.util.List<com.liferay.portal.model.User> users)
503         throws com.liferay.portal.SystemException {
504         getPersistence().setUsers(pk, users);
505     }
506 
507     public static PermissionPersistence getPersistence() {
508         if (_persistence == null) {
509             _persistence = (PermissionPersistence)PortalBeanLocatorUtil.locate(PermissionPersistence.class.getName());
510         }
511 
512         return _persistence;
513     }
514 
515     public void setPersistence(PermissionPersistence persistence) {
516         _persistence = persistence;
517     }
518 
519     private static PermissionPersistence _persistence;
520 }