001    /**
002     * Copyright (c) 2000-present 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                    return getFinder().countByKeywords(companyId, keywords, params);
031            }
032    
033            public static int countByC_N_D(long companyId, java.lang.String name,
034                    java.lang.String description,
035                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
036                    boolean andOperator) {
037                    return getFinder()
038                                       .countByC_N_D(companyId, name, description, params,
039                            andOperator);
040            }
041    
042            public static int countByC_N_D(long companyId, java.lang.String[] names,
043                    java.lang.String[] descriptions,
044                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
045                    boolean andOperator) {
046                    return getFinder()
047                                       .countByC_N_D(companyId, names, descriptions, params,
048                            andOperator);
049            }
050    
051            public static java.util.List<com.liferay.portal.model.UserGroup> findByKeywords(
052                    long companyId, java.lang.String keywords,
053                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
054                    int start, int end,
055                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> obc) {
056                    return getFinder()
057                                       .findByKeywords(companyId, keywords, params, start, end, obc);
058            }
059    
060            public static com.liferay.portal.model.UserGroup findByC_N(long companyId,
061                    java.lang.String name)
062                    throws com.liferay.portal.NoSuchUserGroupException {
063                    return getFinder().findByC_N(companyId, name);
064            }
065    
066            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_N_D(
067                    long companyId, java.lang.String name, java.lang.String description,
068                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
069                    boolean andOperator, int start, int end,
070                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> obc) {
071                    return getFinder()
072                                       .findByC_N_D(companyId, name, description, params,
073                            andOperator, start, end, obc);
074            }
075    
076            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_N_D(
077                    long companyId, java.lang.String[] names,
078                    java.lang.String[] descriptions,
079                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
080                    boolean andOperator, int start, int end,
081                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> obc) {
082                    return getFinder()
083                                       .findByC_N_D(companyId, names, descriptions, params,
084                            andOperator, start, end, obc);
085            }
086    
087            public static UserGroupFinder getFinder() {
088                    if (_finder == null) {
089                            _finder = (UserGroupFinder)PortalBeanLocatorUtil.locate(UserGroupFinder.class.getName());
090    
091                            ReferenceRegistry.registerReference(UserGroupFinderUtil.class,
092                                    "_finder");
093                    }
094    
095                    return _finder;
096            }
097    
098            public void setFinder(UserGroupFinder finder) {
099                    _finder = finder;
100    
101                    ReferenceRegistry.registerReference(UserGroupFinderUtil.class, "_finder");
102            }
103    
104            private static UserGroupFinder _finder;
105    }