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