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, boolean draft)
27          throws com.liferay.portal.SystemException {
28          return getFinder()
29                     .countByOrganizationId(organizationId, displayDate, draft);
30      }
31  
32      public static int countByOrganizationIds(
33          java.util.List<Long> organizationIds, java.util.Date displayDate,
34          boolean draft) throws com.liferay.portal.SystemException {
35          return getFinder()
36                     .countByOrganizationIds(organizationIds, displayDate, draft);
37      }
38  
39      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByGroupIds(
40          long companyId, long groupId, int start, int end)
41          throws com.liferay.portal.SystemException {
42          return getFinder().findByGroupIds(companyId, groupId, start, end);
43      }
44  
45      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByOrganizationId(
46          long organizationId, java.util.Date displayDate, boolean draft,
47          int start, int end) throws com.liferay.portal.SystemException {
48          return getFinder()
49                     .findByOrganizationId(organizationId, displayDate, draft,
50              start, end);
51      }
52  
53      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByOrganizationIds(
54          java.util.List<Long> organizationIds, java.util.Date displayDate,
55          boolean draft, int start, int end)
56          throws com.liferay.portal.SystemException {
57          return getFinder()
58                     .findByOrganizationIds(organizationIds, displayDate, draft,
59              start, end);
60      }
61  
62      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByNoAssets()
63          throws com.liferay.portal.SystemException {
64          return getFinder().findByNoAssets();
65      }
66  
67      public static BlogsEntryFinder getFinder() {
68          if (_finder == null) {
69              _finder = (BlogsEntryFinder)PortalBeanLocatorUtil.locate(BlogsEntryFinder.class.getName());
70          }
71  
72          return _finder;
73      }
74  
75      public void setFinder(BlogsEntryFinder finder) {
76          _finder = finder;
77      }
78  
79      private static BlogsEntryFinder _finder;
80  }