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