001    /**
002     * Copyright (c) 2000-2010 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    /**
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    }