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    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 java.util.List<com.liferay.portal.model.Group> findByLiveGroups()
037                    throws com.liferay.portal.kernel.exception.SystemException {
038                    return getFinder().findByLiveGroups();
039            }
040    
041            public static java.util.List<com.liferay.portal.model.Group> findByNoLayouts(
042                    long classNameId, boolean privateLayout, int start, int end)
043                    throws com.liferay.portal.kernel.exception.SystemException {
044                    return getFinder()
045                                       .findByNoLayouts(classNameId, privateLayout, start, end);
046            }
047    
048            public static java.util.List<com.liferay.portal.model.Group> findByNullFriendlyURL()
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getFinder().findByNullFriendlyURL();
051            }
052    
053            public static java.util.List<com.liferay.portal.model.Group> findBySystem(
054                    long companyId)
055                    throws com.liferay.portal.kernel.exception.SystemException {
056                    return getFinder().findBySystem(companyId);
057            }
058    
059            public static com.liferay.portal.model.Group findByC_N(long companyId,
060                    java.lang.String name)
061                    throws com.liferay.portal.NoSuchGroupException,
062                            com.liferay.portal.kernel.exception.SystemException {
063                    return getFinder().findByC_N(companyId, name);
064            }
065    
066            public static java.util.List<com.liferay.portal.model.Group> findByC_N_D(
067                    long companyId, java.lang.String name, java.lang.String realName,
068                    java.lang.String description,
069                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
070                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
071                    throws com.liferay.portal.kernel.exception.SystemException {
072                    return getFinder()
073                                       .findByC_N_D(companyId, name, realName, description, params,
074                            start, end, obc);
075            }
076    
077            public static GroupFinder getFinder() {
078                    if (_finder == null) {
079                            _finder = (GroupFinder)PortalBeanLocatorUtil.locate(GroupFinder.class.getName());
080                    }
081    
082                    return _finder;
083            }
084    
085            public void setFinder(GroupFinder finder) {
086                    _finder = finder;
087            }
088    
089            private static GroupFinder _finder;
090    }