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