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