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.portlet.blogs.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 BlogsStatsUserFinderUtil {
027            public static int countByOrganizationId(long organizationId)
028                    throws com.liferay.portal.kernel.exception.SystemException {
029                    return getFinder().countByOrganizationId(organizationId);
030            }
031    
032            public static int countByOrganizationIds(
033                    java.util.List<java.lang.Long> organizationIds)
034                    throws com.liferay.portal.kernel.exception.SystemException {
035                    return getFinder().countByOrganizationIds(organizationIds);
036            }
037    
038            public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByGroupIds(
039                    long companyId, long groupId, int start, int end)
040                    throws com.liferay.portal.kernel.exception.SystemException {
041                    return getFinder().findByGroupIds(companyId, groupId, start, end);
042            }
043    
044            public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByOrganizationId(
045                    long organizationId, int start, int end,
046                    com.liferay.portal.kernel.util.OrderByComparator obc)
047                    throws com.liferay.portal.kernel.exception.SystemException {
048                    return getFinder().findByOrganizationId(organizationId, start, end, obc);
049            }
050    
051            public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByOrganizationIds(
052                    java.util.List<java.lang.Long> organizationIds, int start, int end,
053                    com.liferay.portal.kernel.util.OrderByComparator obc)
054                    throws com.liferay.portal.kernel.exception.SystemException {
055                    return getFinder()
056                                       .findByOrganizationIds(organizationIds, start, end, obc);
057            }
058    
059            public static BlogsStatsUserFinder getFinder() {
060                    if (_finder == null) {
061                            _finder = (BlogsStatsUserFinder)PortalBeanLocatorUtil.locate(BlogsStatsUserFinder.class.getName());
062    
063                            ReferenceRegistry.registerReference(BlogsStatsUserFinderUtil.class,
064                                    "_finder");
065                    }
066    
067                    return _finder;
068            }
069    
070            public void setFinder(BlogsStatsUserFinder finder) {
071                    _finder = finder;
072    
073                    ReferenceRegistry.registerReference(BlogsStatsUserFinderUtil.class,
074                            "_finder");
075            }
076    
077            private static BlogsStatsUserFinder _finder;
078    }