001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     */
022    public class MBThreadFinderUtil {
023            public static int countByG_C_S(long groupId, long categoryId, int status)
024                    throws com.liferay.portal.kernel.exception.SystemException {
025                    return getFinder().countByG_C_S(groupId, categoryId, status);
026            }
027    
028            public static int countByS_G_U_C_S(long groupId, long userId,
029                    long[] categoryIds, int status)
030                    throws com.liferay.portal.kernel.exception.SystemException {
031                    return getFinder().countByS_G_U_C_S(groupId, userId, categoryIds, status);
032            }
033    
034            public static int filterCountByG_C(long groupId, long categoryId)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getFinder().filterCountByG_C(groupId, categoryId);
037            }
038    
039            public static int filterCountByG_C_S(long groupId, long categoryId,
040                    int status) throws com.liferay.portal.kernel.exception.SystemException {
041                    return getFinder().filterCountByG_C_S(groupId, categoryId, status);
042            }
043    
044            public static int filterCountByS_G_U_C_S(long groupId, long userId,
045                    long[] categoryIds, int status)
046                    throws com.liferay.portal.kernel.exception.SystemException {
047                    return getFinder()
048                                       .filterCountByS_G_U_C_S(groupId, userId, categoryIds, status);
049            }
050    
051            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> filterFindByG_C(
052                    long groupId, long categoryId, int start, int end)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getFinder().filterFindByG_C(groupId, categoryId, start, end);
055            }
056    
057            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> filterFindByG_C_S(
058                    long groupId, long categoryId, int status, int start, int end)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getFinder()
061                                       .filterFindByG_C_S(groupId, categoryId, status, start, end);
062            }
063    
064            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> filterFindByS_G_U_C_S(
065                    long groupId, long userId, long[] categoryIds, int status, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getFinder()
068                                       .filterFindByS_G_U_C_S(groupId, userId, categoryIds, status,
069                            start, end);
070            }
071    
072            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByG_C_S(
073                    long groupId, long categoryId, int status, int start, int end)
074                    throws com.liferay.portal.kernel.exception.SystemException {
075                    return getFinder().findByG_C_S(groupId, categoryId, status, start, end);
076            }
077    
078            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByS_G_U_C_S(
079                    long groupId, long userId, long[] categoryIds, int status, int start,
080                    int end) throws com.liferay.portal.kernel.exception.SystemException {
081                    return getFinder()
082                                       .findByS_G_U_C_S(groupId, userId, categoryIds, status,
083                            start, end);
084            }
085    
086            public static MBThreadFinder getFinder() {
087                    if (_finder == null) {
088                            _finder = (MBThreadFinder)PortalBeanLocatorUtil.locate(MBThreadFinder.class.getName());
089                    }
090    
091                    return _finder;
092            }
093    
094            public void setFinder(MBThreadFinder finder) {
095                    _finder = finder;
096            }
097    
098            private static MBThreadFinder _finder;
099    }