001    /**
002     * Copyright (c) 2000-2011 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    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * @author Brian Wing Shun Chan
022     */
023    public class GroupFinderUtil {
024            public static int countByG_U(long groupId, long userId)
025                    throws com.liferay.portal.kernel.exception.SystemException {
026                    return getFinder().countByG_U(groupId, userId);
027            }
028    
029            public static int countByG_U(long groupId, long userId, boolean inherit)
030                    throws com.liferay.portal.kernel.exception.SystemException {
031                    return getFinder().countByG_U(groupId, userId, inherit);
032            }
033    
034            public static int countByC_N_D(long companyId, java.lang.String name,
035                    java.lang.String realName, java.lang.String description,
036                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
037                    throws com.liferay.portal.kernel.exception.SystemException {
038                    return getFinder()
039                                       .countByC_N_D(companyId, name, realName, description, params);
040            }
041    
042            public static int countByC_C_N_D(long companyId, long[] classNameIds,
043                    java.lang.String name, java.lang.String realName,
044                    java.lang.String description,
045                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
046                    throws com.liferay.portal.kernel.exception.SystemException {
047                    return getFinder()
048                                       .countByC_C_N_D(companyId, classNameIds, name, realName,
049                            description, params);
050            }
051    
052            public static java.util.List<com.liferay.portal.model.Group> findByLiveGroups()
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getFinder().findByLiveGroups();
055            }
056    
057            public static java.util.List<com.liferay.portal.model.Group> findByNoLayouts(
058                    long classNameId, boolean privateLayout, int start, int end)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getFinder()
061                                       .findByNoLayouts(classNameId, privateLayout, start, end);
062            }
063    
064            public static java.util.List<com.liferay.portal.model.Group> findByNullFriendlyURL()
065                    throws com.liferay.portal.kernel.exception.SystemException {
066                    return getFinder().findByNullFriendlyURL();
067            }
068    
069            public static java.util.List<com.liferay.portal.model.Group> findBySystem(
070                    long companyId)
071                    throws com.liferay.portal.kernel.exception.SystemException {
072                    return getFinder().findBySystem(companyId);
073            }
074    
075            public static com.liferay.portal.model.Group findByC_N(long companyId,
076                    java.lang.String name)
077                    throws com.liferay.portal.NoSuchGroupException,
078                            com.liferay.portal.kernel.exception.SystemException {
079                    return getFinder().findByC_N(companyId, name);
080            }
081    
082            public static java.util.List<com.liferay.portal.model.Group> findByC_N_D(
083                    long companyId, java.lang.String name, java.lang.String realName,
084                    java.lang.String description,
085                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
086                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
087                    throws com.liferay.portal.kernel.exception.SystemException {
088                    return getFinder()
089                                       .findByC_N_D(companyId, name, realName, description, params,
090                            start, end, obc);
091            }
092    
093            public static java.util.List<com.liferay.portal.model.Group> findByC_C_N_D(
094                    long companyId, long[] classNameIds, java.lang.String name,
095                    java.lang.String realName, java.lang.String description,
096                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
097                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
098                    throws com.liferay.portal.kernel.exception.SystemException {
099                    return getFinder()
100                                       .findByC_C_N_D(companyId, classNameIds, name, realName,
101                            description, params, start, end, obc);
102            }
103    
104            public static GroupFinder getFinder() {
105                    if (_finder == null) {
106                            _finder = (GroupFinder)PortalBeanLocatorUtil.locate(GroupFinder.class.getName());
107    
108                            ReferenceRegistry.registerReference(GroupFinderUtil.class, "_finder");
109                    }
110    
111                    return _finder;
112            }
113    
114            public void setFinder(GroupFinder finder) {
115                    _finder = finder;
116    
117                    ReferenceRegistry.registerReference(GroupFinderUtil.class, "_finder");
118            }
119    
120            private static GroupFinder _finder;
121    }