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