001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service.persistence;
022:
023: /**
024: * <a href="RoleFinderUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class RoleFinderUtil {
030: public static int countByR_U(long roleId, long userId)
031: throws com.liferay.portal.SystemException {
032: return getFinder().countByR_U(roleId, userId);
033: }
034:
035: public static int countByC_N_D_T(long companyId,
036: java.lang.String name, java.lang.String description,
037: java.lang.Integer type, java.util.LinkedHashMap params)
038: throws com.liferay.portal.SystemException {
039: return getFinder().countByC_N_D_T(companyId, name, description,
040: type, params);
041: }
042:
043: public static java.util.List findByUserGroupRole(long userId,
044: long groupId) throws com.liferay.portal.SystemException {
045: return getFinder().findByUserGroupRole(userId, groupId);
046: }
047:
048: public static com.liferay.portal.model.Role findByC_N(
049: long companyId, java.lang.String name)
050: throws com.liferay.portal.SystemException,
051: com.liferay.portal.NoSuchRoleException {
052: return getFinder().findByC_N(companyId, name);
053: }
054:
055: public static java.util.List findByU_G(long userId, long groupId)
056: throws com.liferay.portal.SystemException {
057: return getFinder().findByU_G(userId, groupId);
058: }
059:
060: public static java.util.List findByU_G(long userId, long[] groupIds)
061: throws com.liferay.portal.SystemException {
062: return getFinder().findByU_G(userId, groupIds);
063: }
064:
065: public static java.util.List findByU_G(long userId,
066: java.util.List groups)
067: throws com.liferay.portal.SystemException {
068: return getFinder().findByU_G(userId, groups);
069: }
070:
071: public static java.util.List findByC_N_D_T(long companyId,
072: java.lang.String name, java.lang.String description,
073: java.lang.Integer type, java.util.LinkedHashMap params,
074: int begin, int end,
075: com.liferay.portal.kernel.util.OrderByComparator obc)
076: throws com.liferay.portal.SystemException {
077: return getFinder().findByC_N_D_T(companyId, name, description,
078: type, params, begin, end, obc);
079: }
080:
081: public static java.util.Map findByC_N_S_P(long companyId,
082: java.lang.String name, int scope, java.lang.String primKey)
083: throws com.liferay.portal.SystemException {
084: return getFinder().findByC_N_S_P(companyId, name, scope,
085: primKey);
086: }
087:
088: public static RoleFinder getFinder() {
089: return _getUtil()._finder;
090: }
091:
092: public void setFinder(RoleFinder finder) {
093: _finder = finder;
094: }
095:
096: private static RoleFinderUtil _getUtil() {
097: if (_util == null) {
098: _util = (RoleFinderUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
099: .locate(_UTIL);
100: }
101:
102: return _util;
103: }
104:
105: private static final String _UTIL = RoleFinderUtil.class.getName();
106: private static RoleFinderUtil _util;
107: private RoleFinder _finder;
108: }
|