001    /**
002     * Copyright (c) 2000-2011 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 countByC_N_D(long companyId, java.lang.String name,
025                    java.lang.String description,
026                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
027                    throws com.liferay.portal.kernel.exception.SystemException {
028                    return getFinder().countByC_N_D(companyId, name, description, params);
029            }
030    
031            public static com.liferay.portal.model.UserGroup findByC_N(long companyId,
032                    java.lang.String name)
033                    throws com.liferay.portal.NoSuchUserGroupException,
034                            com.liferay.portal.kernel.exception.SystemException {
035                    return getFinder().findByC_N(companyId, name);
036            }
037    
038            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_N_D(
039                    long companyId, java.lang.String name, java.lang.String description,
040                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
041                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
042                    throws com.liferay.portal.kernel.exception.SystemException {
043                    return getFinder()
044                                       .findByC_N_D(companyId, name, description, params, start,
045                            end, obc);
046            }
047    
048            public static UserGroupFinder getFinder() {
049                    if (_finder == null) {
050                            _finder = (UserGroupFinder)PortalBeanLocatorUtil.locate(UserGroupFinder.class.getName());
051    
052                            ReferenceRegistry.registerReference(UserGroupFinderUtil.class,
053                                    "_finder");
054                    }
055    
056                    return _finder;
057            }
058    
059            public void setFinder(UserGroupFinder finder) {
060                    _finder = finder;
061    
062                    ReferenceRegistry.registerReference(UserGroupFinderUtil.class, "_finder");
063            }
064    
065            private static UserGroupFinder _finder;
066    }