1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.ResourcePermission;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="ResourcePermissionUtil.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       ResourcePermissionPersistence
34   * @see       ResourcePermissionPersistenceImpl
35   * @generated
36   */
37  public class ResourcePermissionUtil {
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 ResourcePermission remove(
65          ResourcePermission resourcePermission) throws SystemException {
66          return getPersistence().remove(resourcePermission);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
72      public static ResourcePermission update(
73          ResourcePermission resourcePermission, boolean merge)
74          throws SystemException {
75          return getPersistence().update(resourcePermission, merge);
76      }
77  
78      public static void cacheResult(
79          com.liferay.portal.model.ResourcePermission resourcePermission) {
80          getPersistence().cacheResult(resourcePermission);
81      }
82  
83      public static void cacheResult(
84          java.util.List<com.liferay.portal.model.ResourcePermission> resourcePermissions) {
85          getPersistence().cacheResult(resourcePermissions);
86      }
87  
88      public static com.liferay.portal.model.ResourcePermission create(
89          long resourcePermissionId) {
90          return getPersistence().create(resourcePermissionId);
91      }
92  
93      public static com.liferay.portal.model.ResourcePermission remove(
94          long resourcePermissionId)
95          throws com.liferay.portal.NoSuchResourcePermissionException,
96              com.liferay.portal.kernel.exception.SystemException {
97          return getPersistence().remove(resourcePermissionId);
98      }
99  
100     public static com.liferay.portal.model.ResourcePermission updateImpl(
101         com.liferay.portal.model.ResourcePermission resourcePermission,
102         boolean merge)
103         throws com.liferay.portal.kernel.exception.SystemException {
104         return getPersistence().updateImpl(resourcePermission, merge);
105     }
106 
107     public static com.liferay.portal.model.ResourcePermission findByPrimaryKey(
108         long resourcePermissionId)
109         throws com.liferay.portal.NoSuchResourcePermissionException,
110             com.liferay.portal.kernel.exception.SystemException {
111         return getPersistence().findByPrimaryKey(resourcePermissionId);
112     }
113 
114     public static com.liferay.portal.model.ResourcePermission fetchByPrimaryKey(
115         long resourcePermissionId)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getPersistence().fetchByPrimaryKey(resourcePermissionId);
118     }
119 
120     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
121         long roleId) throws com.liferay.portal.kernel.exception.SystemException {
122         return getPersistence().findByRoleId(roleId);
123     }
124 
125     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
126         long roleId, int start, int end)
127         throws com.liferay.portal.kernel.exception.SystemException {
128         return getPersistence().findByRoleId(roleId, start, end);
129     }
130 
131     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
132         long roleId, int start, int end,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.kernel.exception.SystemException {
135         return getPersistence().findByRoleId(roleId, start, end, obc);
136     }
137 
138     public static com.liferay.portal.model.ResourcePermission findByRoleId_First(
139         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.NoSuchResourcePermissionException,
141             com.liferay.portal.kernel.exception.SystemException {
142         return getPersistence().findByRoleId_First(roleId, obc);
143     }
144 
145     public static com.liferay.portal.model.ResourcePermission findByRoleId_Last(
146         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.NoSuchResourcePermissionException,
148             com.liferay.portal.kernel.exception.SystemException {
149         return getPersistence().findByRoleId_Last(roleId, obc);
150     }
151 
152     public static com.liferay.portal.model.ResourcePermission[] findByRoleId_PrevAndNext(
153         long resourcePermissionId, long roleId,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.NoSuchResourcePermissionException,
156             com.liferay.portal.kernel.exception.SystemException {
157         return getPersistence()
158                    .findByRoleId_PrevAndNext(resourcePermissionId, roleId, obc);
159     }
160 
161     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByR_S(
162         long roleId, int scope)
163         throws com.liferay.portal.kernel.exception.SystemException {
164         return getPersistence().findByR_S(roleId, scope);
165     }
166 
167     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByR_S(
168         long roleId, int scope, int start, int end)
169         throws com.liferay.portal.kernel.exception.SystemException {
170         return getPersistence().findByR_S(roleId, scope, start, end);
171     }
172 
173     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByR_S(
174         long roleId, int scope, int start, int end,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.kernel.exception.SystemException {
177         return getPersistence().findByR_S(roleId, scope, start, end, obc);
178     }
179 
180     public static com.liferay.portal.model.ResourcePermission findByR_S_First(
181         long roleId, int scope,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.NoSuchResourcePermissionException,
184             com.liferay.portal.kernel.exception.SystemException {
185         return getPersistence().findByR_S_First(roleId, scope, obc);
186     }
187 
188     public static com.liferay.portal.model.ResourcePermission findByR_S_Last(
189         long roleId, int scope,
190         com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.NoSuchResourcePermissionException,
192             com.liferay.portal.kernel.exception.SystemException {
193         return getPersistence().findByR_S_Last(roleId, scope, obc);
194     }
195 
196     public static com.liferay.portal.model.ResourcePermission[] findByR_S_PrevAndNext(
197         long resourcePermissionId, long roleId, int scope,
198         com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.NoSuchResourcePermissionException,
200             com.liferay.portal.kernel.exception.SystemException {
201         return getPersistence()
202                    .findByR_S_PrevAndNext(resourcePermissionId, roleId, scope,
203             obc);
204     }
205 
206     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
207         long companyId, java.lang.String name, int scope)
208         throws com.liferay.portal.kernel.exception.SystemException {
209         return getPersistence().findByC_N_S(companyId, name, scope);
210     }
211 
212     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
213         long companyId, java.lang.String name, int scope, int start, int end)
214         throws com.liferay.portal.kernel.exception.SystemException {
215         return getPersistence().findByC_N_S(companyId, name, scope, start, end);
216     }
217 
218     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
219         long companyId, java.lang.String name, int scope, int start, int end,
220         com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.kernel.exception.SystemException {
222         return getPersistence()
223                    .findByC_N_S(companyId, name, scope, start, end, obc);
224     }
225 
226     public static com.liferay.portal.model.ResourcePermission findByC_N_S_First(
227         long companyId, java.lang.String name, int scope,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.NoSuchResourcePermissionException,
230             com.liferay.portal.kernel.exception.SystemException {
231         return getPersistence().findByC_N_S_First(companyId, name, scope, obc);
232     }
233 
234     public static com.liferay.portal.model.ResourcePermission findByC_N_S_Last(
235         long companyId, java.lang.String name, int scope,
236         com.liferay.portal.kernel.util.OrderByComparator obc)
237         throws com.liferay.portal.NoSuchResourcePermissionException,
238             com.liferay.portal.kernel.exception.SystemException {
239         return getPersistence().findByC_N_S_Last(companyId, name, scope, obc);
240     }
241 
242     public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_PrevAndNext(
243         long resourcePermissionId, long companyId, java.lang.String name,
244         int scope, com.liferay.portal.kernel.util.OrderByComparator obc)
245         throws com.liferay.portal.NoSuchResourcePermissionException,
246             com.liferay.portal.kernel.exception.SystemException {
247         return getPersistence()
248                    .findByC_N_S_PrevAndNext(resourcePermissionId, companyId,
249             name, scope, obc);
250     }
251 
252     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
253         long companyId, java.lang.String name, int scope,
254         java.lang.String primKey)
255         throws com.liferay.portal.kernel.exception.SystemException {
256         return getPersistence().findByC_N_S_P(companyId, name, scope, primKey);
257     }
258 
259     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
260         long companyId, java.lang.String name, int scope,
261         java.lang.String primKey, int start, int end)
262         throws com.liferay.portal.kernel.exception.SystemException {
263         return getPersistence()
264                    .findByC_N_S_P(companyId, name, scope, primKey, start, end);
265     }
266 
267     public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
268         long companyId, java.lang.String name, int scope,
269         java.lang.String primKey, int start, int end,
270         com.liferay.portal.kernel.util.OrderByComparator obc)
271         throws com.liferay.portal.kernel.exception.SystemException {
272         return getPersistence()
273                    .findByC_N_S_P(companyId, name, scope, primKey, start, end,
274             obc);
275     }
276 
277     public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_First(
278         long companyId, java.lang.String name, int scope,
279         java.lang.String primKey,
280         com.liferay.portal.kernel.util.OrderByComparator obc)
281         throws com.liferay.portal.NoSuchResourcePermissionException,
282             com.liferay.portal.kernel.exception.SystemException {
283         return getPersistence()
284                    .findByC_N_S_P_First(companyId, name, scope, primKey, obc);
285     }
286 
287     public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_Last(
288         long companyId, java.lang.String name, int scope,
289         java.lang.String primKey,
290         com.liferay.portal.kernel.util.OrderByComparator obc)
291         throws com.liferay.portal.NoSuchResourcePermissionException,
292             com.liferay.portal.kernel.exception.SystemException {
293         return getPersistence()
294                    .findByC_N_S_P_Last(companyId, name, scope, primKey, obc);
295     }
296 
297     public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_P_PrevAndNext(
298         long resourcePermissionId, long companyId, java.lang.String name,
299         int scope, java.lang.String primKey,
300         com.liferay.portal.kernel.util.OrderByComparator obc)
301         throws com.liferay.portal.NoSuchResourcePermissionException,
302             com.liferay.portal.kernel.exception.SystemException {
303         return getPersistence()
304                    .findByC_N_S_P_PrevAndNext(resourcePermissionId, companyId,
305             name, scope, primKey, obc);
306     }
307 
308     public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_R(
309         long companyId, java.lang.String name, int scope,
310         java.lang.String primKey, long roleId)
311         throws com.liferay.portal.NoSuchResourcePermissionException,
312             com.liferay.portal.kernel.exception.SystemException {
313         return getPersistence()
314                    .findByC_N_S_P_R(companyId, name, scope, primKey, roleId);
315     }
316 
317     public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R(
318         long companyId, java.lang.String name, int scope,
319         java.lang.String primKey, long roleId)
320         throws com.liferay.portal.kernel.exception.SystemException {
321         return getPersistence()
322                    .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId);
323     }
324 
325     public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R(
326         long companyId, java.lang.String name, int scope,
327         java.lang.String primKey, long roleId, boolean retrieveFromCache)
328         throws com.liferay.portal.kernel.exception.SystemException {
329         return getPersistence()
330                    .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId,
331             retrieveFromCache);
332     }
333 
334     public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll()
335         throws com.liferay.portal.kernel.exception.SystemException {
336         return getPersistence().findAll();
337     }
338 
339     public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
340         int start, int end)
341         throws com.liferay.portal.kernel.exception.SystemException {
342         return getPersistence().findAll(start, end);
343     }
344 
345     public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
346         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
347         throws com.liferay.portal.kernel.exception.SystemException {
348         return getPersistence().findAll(start, end, obc);
349     }
350 
351     public static void removeByRoleId(long roleId)
352         throws com.liferay.portal.kernel.exception.SystemException {
353         getPersistence().removeByRoleId(roleId);
354     }
355 
356     public static void removeByR_S(long roleId, int scope)
357         throws com.liferay.portal.kernel.exception.SystemException {
358         getPersistence().removeByR_S(roleId, scope);
359     }
360 
361     public static void removeByC_N_S(long companyId, java.lang.String name,
362         int scope) throws com.liferay.portal.kernel.exception.SystemException {
363         getPersistence().removeByC_N_S(companyId, name, scope);
364     }
365 
366     public static void removeByC_N_S_P(long companyId, java.lang.String name,
367         int scope, java.lang.String primKey)
368         throws com.liferay.portal.kernel.exception.SystemException {
369         getPersistence().removeByC_N_S_P(companyId, name, scope, primKey);
370     }
371 
372     public static void removeByC_N_S_P_R(long companyId, java.lang.String name,
373         int scope, java.lang.String primKey, long roleId)
374         throws com.liferay.portal.NoSuchResourcePermissionException,
375             com.liferay.portal.kernel.exception.SystemException {
376         getPersistence()
377             .removeByC_N_S_P_R(companyId, name, scope, primKey, roleId);
378     }
379 
380     public static void removeAll()
381         throws com.liferay.portal.kernel.exception.SystemException {
382         getPersistence().removeAll();
383     }
384 
385     public static int countByRoleId(long roleId)
386         throws com.liferay.portal.kernel.exception.SystemException {
387         return getPersistence().countByRoleId(roleId);
388     }
389 
390     public static int countByR_S(long roleId, int scope)
391         throws com.liferay.portal.kernel.exception.SystemException {
392         return getPersistence().countByR_S(roleId, scope);
393     }
394 
395     public static int countByC_N_S(long companyId, java.lang.String name,
396         int scope) throws com.liferay.portal.kernel.exception.SystemException {
397         return getPersistence().countByC_N_S(companyId, name, scope);
398     }
399 
400     public static int countByC_N_S_P(long companyId, java.lang.String name,
401         int scope, java.lang.String primKey)
402         throws com.liferay.portal.kernel.exception.SystemException {
403         return getPersistence().countByC_N_S_P(companyId, name, scope, primKey);
404     }
405 
406     public static int countByC_N_S_P_R(long companyId, java.lang.String name,
407         int scope, java.lang.String primKey, long roleId)
408         throws com.liferay.portal.kernel.exception.SystemException {
409         return getPersistence()
410                    .countByC_N_S_P_R(companyId, name, scope, primKey, roleId);
411     }
412 
413     public static int countAll()
414         throws com.liferay.portal.kernel.exception.SystemException {
415         return getPersistence().countAll();
416     }
417 
418     public static ResourcePermissionPersistence getPersistence() {
419         if (_persistence == null) {
420             _persistence = (ResourcePermissionPersistence)PortalBeanLocatorUtil.locate(ResourcePermissionPersistence.class.getName());
421         }
422 
423         return _persistence;
424     }
425 
426     public void setPersistence(ResourcePermissionPersistence persistence) {
427         _persistence = persistence;
428     }
429 
430     private static ResourcePermissionPersistence _persistence;
431 }