1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.blogs.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="BlogsEntryFinderUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * @author Brian Wing Shun Chan
23   */
24  public class BlogsEntryFinderUtil {
25      public static int countByOrganizationId(long organizationId,
26          java.util.Date displayDate, int status)
27          throws com.liferay.portal.kernel.exception.SystemException {
28          return getFinder()
29                     .countByOrganizationId(organizationId, displayDate, status);
30      }
31  
32      public static int countByOrganizationIds(
33          java.util.List<Long> organizationIds, java.util.Date displayDate,
34          int status) throws com.liferay.portal.kernel.exception.SystemException {
35          return getFinder()
36                     .countByOrganizationIds(organizationIds, displayDate, status);
37      }
38  
39      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByOrganizationId(
40          long organizationId, java.util.Date displayDate, int status, int start,
41          int end) throws com.liferay.portal.kernel.exception.SystemException {
42          return getFinder()
43                     .findByOrganizationId(organizationId, displayDate, status,
44              start, end);
45      }
46  
47      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByOrganizationIds(
48          java.util.List<Long> organizationIds, java.util.Date displayDate,
49          int status, int start, int end)
50          throws com.liferay.portal.kernel.exception.SystemException {
51          return getFinder()
52                     .findByOrganizationIds(organizationIds, displayDate, status,
53              start, end);
54      }
55  
56      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByNoAssets()
57          throws com.liferay.portal.kernel.exception.SystemException {
58          return getFinder().findByNoAssets();
59      }
60  
61      public static BlogsEntryFinder getFinder() {
62          if (_finder == null) {
63              _finder = (BlogsEntryFinder)PortalBeanLocatorUtil.locate(BlogsEntryFinder.class.getName());
64          }
65  
66          return _finder;
67      }
68  
69      public void setFinder(BlogsEntryFinder finder) {
70          _finder = finder;
71      }
72  
73      private static BlogsEntryFinder _finder;
74  }