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