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 UserGroupFinderUtil {
024            public static int countByKeywords(long companyId,
025                    java.lang.String keywords,
026                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
027                    throws com.liferay.portal.kernel.exception.SystemException {
028                    return getFinder().countByKeywords(companyId, keywords, params);
029            }
030    
031            public static int countByC_N_D(long companyId, java.lang.String name,
032                    java.lang.String description,
033                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
034                    boolean andOperator)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getFinder()
037                                       .countByC_N_D(companyId, name, description, params,
038                            andOperator);
039            }
040    
041            public static int countByC_N_D(long companyId, java.lang.String[] names,
042                    java.lang.String[] descriptions,
043                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
044                    boolean andOperator)
045                    throws com.liferay.portal.kernel.exception.SystemException {
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, com.liferay.portal.kernel.util.OrderByComparator obc)
055                    throws com.liferay.portal.kernel.exception.SystemException {
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                            com.liferay.portal.kernel.exception.SystemException {
064                    return getFinder().findByC_N(companyId, name);
065            }
066    
067            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_N_D(
068                    long companyId, java.lang.String name, java.lang.String description,
069                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
070                    boolean andOperator, int start, int end,
071                    com.liferay.portal.kernel.util.OrderByComparator obc)
072                    throws com.liferay.portal.kernel.exception.SystemException {
073                    return getFinder()
074                                       .findByC_N_D(companyId, name, description, params,
075                            andOperator, start, end, obc);
076            }
077    
078            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_N_D(
079                    long companyId, java.lang.String[] names,
080                    java.lang.String[] descriptions,
081                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
082                    boolean andOperator, int start, int end,
083                    com.liferay.portal.kernel.util.OrderByComparator obc)
084                    throws com.liferay.portal.kernel.exception.SystemException {
085                    return getFinder()
086                                       .findByC_N_D(companyId, names, descriptions, params,
087                            andOperator, start, end, obc);
088            }
089    
090            public static UserGroupFinder getFinder() {
091                    if (_finder == null) {
092                            _finder = (UserGroupFinder)PortalBeanLocatorUtil.locate(UserGroupFinder.class.getName());
093    
094                            ReferenceRegistry.registerReference(UserGroupFinderUtil.class,
095                                    "_finder");
096                    }
097    
098                    return _finder;
099            }
100    
101            public void setFinder(UserGroupFinder finder) {
102                    _finder = finder;
103    
104                    ReferenceRegistry.registerReference(UserGroupFinderUtil.class, "_finder");
105            }
106    
107            private static UserGroupFinder _finder;
108    }