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