001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    /**
018     * @author Brian Wing Shun Chan
019     */
020    public interface RoleFinder {
021            public int countByR_U(long roleId, long userId)
022                    throws com.liferay.portal.kernel.exception.SystemException;
023    
024            public int countByU_G_R(long userId, long groupId, long roleId)
025                    throws com.liferay.portal.kernel.exception.SystemException;
026    
027            public int countByC_N_D_T(long companyId, java.lang.String name,
028                    java.lang.String description, java.lang.Integer[] types,
029                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
030                    throws com.liferay.portal.kernel.exception.SystemException;
031    
032            public java.util.List<com.liferay.portal.model.Role> findBySystem(
033                    long companyId)
034                    throws com.liferay.portal.kernel.exception.SystemException;
035    
036            public java.util.List<com.liferay.portal.model.Role> findByUserGroupGroupRole(
037                    long userId, long groupId)
038                    throws com.liferay.portal.kernel.exception.SystemException;
039    
040            public java.util.List<com.liferay.portal.model.Role> findByUserGroupRole(
041                    long userId, long groupId)
042                    throws com.liferay.portal.kernel.exception.SystemException;
043    
044            public com.liferay.portal.model.Role findByC_N(long companyId,
045                    java.lang.String name)
046                    throws com.liferay.portal.NoSuchRoleException,
047                            com.liferay.portal.kernel.exception.SystemException;
048    
049            public java.util.List<com.liferay.portal.model.Role> findByU_G(
050                    long userId, long groupId)
051                    throws com.liferay.portal.kernel.exception.SystemException;
052    
053            public java.util.List<com.liferay.portal.model.Role> findByU_G(
054                    long userId, long[] groupIds)
055                    throws com.liferay.portal.kernel.exception.SystemException;
056    
057            public java.util.List<com.liferay.portal.model.Role> findByU_G(
058                    long userId, java.util.List<com.liferay.portal.model.Group> groups)
059                    throws com.liferay.portal.kernel.exception.SystemException;
060    
061            public java.util.List<com.liferay.portal.model.Role> findByC_N_D_T(
062                    long companyId, java.lang.String name, java.lang.String description,
063                    java.lang.Integer[] types,
064                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
065                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
066                    throws com.liferay.portal.kernel.exception.SystemException;
067    
068            public java.util.Map<java.lang.String, java.util.List<java.lang.String>> findByC_N_S_P(
069                    long companyId, java.lang.String name, int scope,
070                    java.lang.String primKey)
071                    throws com.liferay.portal.kernel.exception.SystemException;
072    }