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