001    /**
002     * Copyright (c) 2000-2013 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    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * @author Brian Wing Shun Chan
022     */
023    public class MBCategoryFinderUtil {
024            public static int countByS_G_U_P(long groupId, long userId,
025                    long[] parentCategoryIds)
026                    throws com.liferay.portal.kernel.exception.SystemException {
027                    return getFinder().countByS_G_U_P(groupId, userId, parentCategoryIds);
028            }
029    
030            public static int filterCountByS_G_U_P(long groupId, long userId,
031                    long[] parentCategoryIds)
032                    throws com.liferay.portal.kernel.exception.SystemException {
033                    return getFinder()
034                                       .filterCountByS_G_U_P(groupId, userId, parentCategoryIds);
035            }
036    
037            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> filterFindByS_G_U_P(
038                    long groupId, long userId, long[] parentCategoryIds, int start, int end)
039                    throws com.liferay.portal.kernel.exception.SystemException {
040                    return getFinder()
041                                       .filterFindByS_G_U_P(groupId, userId, parentCategoryIds,
042                            start, end);
043            }
044    
045            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByS_G_U_P(
046                    long groupId, long userId, long[] parentCategoryIds, int start, int end)
047                    throws com.liferay.portal.kernel.exception.SystemException {
048                    return getFinder()
049                                       .findByS_G_U_P(groupId, userId, parentCategoryIds, start, end);
050            }
051    
052            public static MBCategoryFinder getFinder() {
053                    if (_finder == null) {
054                            _finder = (MBCategoryFinder)PortalBeanLocatorUtil.locate(MBCategoryFinder.class.getName());
055    
056                            ReferenceRegistry.registerReference(MBCategoryFinderUtil.class,
057                                    "_finder");
058                    }
059    
060                    return _finder;
061            }
062    
063            public void setFinder(MBCategoryFinder finder) {
064                    _finder = finder;
065    
066                    ReferenceRegistry.registerReference(MBCategoryFinderUtil.class,
067                            "_finder");
068            }
069    
070            private static MBCategoryFinder _finder;
071    }