1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.blogs.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.ReferenceRegistry;
19  
20  /**
21   * <a href="BlogsEntryFinderUtil.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Brian Wing Shun Chan
24   */
25  public class BlogsEntryFinderUtil {
26      public static int countByOrganizationId(long organizationId,
27          java.util.Date displayDate, boolean draft)
28          throws com.liferay.portal.SystemException {
29          return getFinder()
30                     .countByOrganizationId(organizationId, displayDate, draft);
31      }
32  
33      public static int countByOrganizationIds(
34          java.util.List<java.lang.Long> organizationIds,
35          java.util.Date displayDate, boolean draft)
36          throws com.liferay.portal.SystemException {
37          return getFinder()
38                     .countByOrganizationIds(organizationIds, displayDate, draft);
39      }
40  
41      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByGroupIds(
42          long companyId, long groupId, int start, int end)
43          throws com.liferay.portal.SystemException {
44          return getFinder().findByGroupIds(companyId, groupId, start, end);
45      }
46  
47      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByOrganizationId(
48          long organizationId, java.util.Date displayDate, boolean draft,
49          int start, int end) throws com.liferay.portal.SystemException {
50          return getFinder()
51                     .findByOrganizationId(organizationId, displayDate, draft,
52              start, end);
53      }
54  
55      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByOrganizationIds(
56          java.util.List<java.lang.Long> organizationIds,
57          java.util.Date displayDate, boolean draft, int start, int end)
58          throws com.liferay.portal.SystemException {
59          return getFinder()
60                     .findByOrganizationIds(organizationIds, displayDate, draft,
61              start, end);
62      }
63  
64      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByNoAssets()
65          throws com.liferay.portal.SystemException {
66          return getFinder().findByNoAssets();
67      }
68  
69      public static BlogsEntryFinder getFinder() {
70          if (_finder == null) {
71              _finder = (BlogsEntryFinder)PortalBeanLocatorUtil.locate(BlogsEntryFinder.class.getName());
72  
73              ReferenceRegistry.registerReference(BlogsEntryFinderUtil.class,
74                  "_finder");
75          }
76  
77          return _finder;
78      }
79  
80      public void setFinder(BlogsEntryFinder finder) {
81          _finder = finder;
82  
83          ReferenceRegistry.registerReference(BlogsEntryFinderUtil.class,
84              "_finder");
85      }
86  
87      private static BlogsEntryFinder _finder;
88  }