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.messageboards.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.ReferenceRegistry;
19  
20  /**
21   * <a href="MBMessageFinderUtil.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Brian Wing Shun Chan
24   */
25  public class MBMessageFinderUtil {
26      public static int countByG_U(long groupId, long userId)
27          throws com.liferay.portal.SystemException {
28          return getFinder().countByG_U(groupId, userId);
29      }
30  
31      public static int countByC_T(java.util.Date createDate, long threadId)
32          throws com.liferay.portal.SystemException {
33          return getFinder().countByC_T(createDate, threadId);
34      }
35  
36      public static int countByG_U_A(long groupId, long userId, boolean anonymous)
37          throws com.liferay.portal.SystemException {
38          return getFinder().countByG_U_A(groupId, userId, anonymous);
39      }
40  
41      public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByNoAssets()
42          throws com.liferay.portal.SystemException {
43          return getFinder().findByNoAssets();
44      }
45  
46      public static java.util.List<java.lang.Long> findByG_U(long groupId,
47          long userId, int start, int end)
48          throws com.liferay.portal.SystemException {
49          return getFinder().findByG_U(groupId, userId, start, end);
50      }
51  
52      public static java.util.List<java.lang.Long> findByG_U_A(long groupId,
53          long userId, boolean anonymous, int start, int end)
54          throws com.liferay.portal.SystemException {
55          return getFinder().findByG_U_A(groupId, userId, anonymous, start, end);
56      }
57  
58      public static MBMessageFinder getFinder() {
59          if (_finder == null) {
60              _finder = (MBMessageFinder)PortalBeanLocatorUtil.locate(MBMessageFinder.class.getName());
61  
62              ReferenceRegistry.registerReference(MBMessageFinderUtil.class,
63                  "_finder");
64          }
65  
66          return _finder;
67      }
68  
69      public void setFinder(MBMessageFinder finder) {
70          _finder = finder;
71  
72          ReferenceRegistry.registerReference(MBMessageFinderUtil.class, "_finder");
73      }
74  
75      private static MBMessageFinder _finder;
76  }