001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * @author Brian Wing Shun Chan
024     * @generated
025     */
026    @ProviderType
027    public class ResourcePermissionFinderUtil {
028            public static int countByR_S(long roleId, int[] scopes) {
029                    return getFinder().countByR_S(roleId, scopes);
030            }
031    
032            public static int countByC_N_S_P_R_A(long companyId, java.lang.String name,
033                    int scope, java.lang.String primKey, long[] roleIds, long actionId) {
034                    return getFinder()
035                                       .countByC_N_S_P_R_A(companyId, name, scope, primKey,
036                            roleIds, actionId);
037            }
038    
039            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByResource(
040                    long companyId, long groupId, java.lang.String name,
041                    java.lang.String primKey) {
042                    return getFinder().findByResource(companyId, groupId, name, primKey);
043            }
044    
045            public static java.util.Map<java.io.Serializable, com.liferay.portal.model.ResourcePermission> fetchByPrimaryKeys(
046                    java.util.Set<java.io.Serializable> primaryKeys) {
047                    return getFinder().fetchByPrimaryKeys(primaryKeys);
048            }
049    
050            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByR_S(
051                    long roleId, int[] scopes, int start, int end) {
052                    return getFinder().findByR_S(roleId, scopes, start, end);
053            }
054    
055            public static ResourcePermissionFinder getFinder() {
056                    if (_finder == null) {
057                            _finder = (ResourcePermissionFinder)PortalBeanLocatorUtil.locate(ResourcePermissionFinder.class.getName());
058    
059                            ReferenceRegistry.registerReference(ResourcePermissionFinderUtil.class,
060                                    "_finder");
061                    }
062    
063                    return _finder;
064            }
065    
066            public void setFinder(ResourcePermissionFinder finder) {
067                    _finder = finder;
068    
069                    ReferenceRegistry.registerReference(ResourcePermissionFinderUtil.class,
070                            "_finder");
071            }
072    
073            private static ResourcePermissionFinder _finder;
074    }