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