001    /**
002     * Copyright (c) 2000-present 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<com.liferay.portlet.messageboards.model.MBCategory> queryDefinition) {
030                    return getFinder()
031                                       .countByS_G_U_P(groupId, userId, parentCategoryIds,
032                            queryDefinition);
033            }
034    
035            public static int filterCountByS_G_U_P(long groupId, long userId,
036                    long[] parentCategoryIds,
037                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBCategory> queryDefinition) {
038                    return getFinder()
039                                       .filterCountByS_G_U_P(groupId, userId, parentCategoryIds,
040                            queryDefinition);
041            }
042    
043            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> filterFindByS_G_U_P(
044                    long groupId, long userId, long[] parentCategoryIds,
045                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBCategory> queryDefinition) {
046                    return getFinder()
047                                       .filterFindByS_G_U_P(groupId, userId, parentCategoryIds,
048                            queryDefinition);
049            }
050    
051            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByS_G_U_P(
052                    long groupId, long userId, long[] parentCategoryIds,
053                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBCategory> queryDefinition) {
054                    return getFinder()
055                                       .findByS_G_U_P(groupId, userId, parentCategoryIds,
056                            queryDefinition);
057            }
058    
059            public static MBCategoryFinder getFinder() {
060                    if (_finder == null) {
061                            _finder = (MBCategoryFinder)PortalBeanLocatorUtil.locate(MBCategoryFinder.class.getName());
062    
063                            ReferenceRegistry.registerReference(MBCategoryFinderUtil.class,
064                                    "_finder");
065                    }
066    
067                    return _finder;
068            }
069    
070            public void setFinder(MBCategoryFinder finder) {
071                    _finder = finder;
072    
073                    ReferenceRegistry.registerReference(MBCategoryFinderUtil.class,
074                            "_finder");
075            }
076    
077            private static MBCategoryFinder _finder;
078    }