001
014
015 package com.liferay.portal.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
023 public class ResourcePermissionFinderUtil {
024 public static int countByR_S(long roleId, int[] scopes)
025 throws com.liferay.portal.kernel.exception.SystemException {
026 return getFinder().countByR_S(roleId, scopes);
027 }
028
029 public static int countByC_N_S_P_R_A(long companyId, java.lang.String name,
030 int scope, java.lang.String primKey, long[] roleIds, long actionId)
031 throws com.liferay.portal.kernel.exception.SystemException {
032 return getFinder()
033 .countByC_N_S_P_R_A(companyId, name, scope, primKey,
034 roleIds, actionId);
035 }
036
037 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByResource(
038 long companyId, long groupId, java.lang.String name,
039 java.lang.String primKey)
040 throws com.liferay.portal.kernel.exception.SystemException {
041 return getFinder().findByResource(companyId, groupId, name, primKey);
042 }
043
044 public static java.util.List<com.liferay.portal.model.ResourcePermission> findByR_S(
045 long roleId, int[] scopes, int start, int end)
046 throws com.liferay.portal.kernel.exception.SystemException {
047 return getFinder().findByR_S(roleId, scopes, start, end);
048 }
049
050 public static ResourcePermissionFinder getFinder() {
051 if (_finder == null) {
052 _finder = (ResourcePermissionFinder)PortalBeanLocatorUtil.locate(ResourcePermissionFinder.class.getName());
053
054 ReferenceRegistry.registerReference(ResourcePermissionFinderUtil.class,
055 "_finder");
056 }
057
058 return _finder;
059 }
060
061 public void setFinder(ResourcePermissionFinder finder) {
062 _finder = finder;
063
064 ReferenceRegistry.registerReference(ResourcePermissionFinderUtil.class,
065 "_finder");
066 }
067
068 private static ResourcePermissionFinder _finder;
069 }