001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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    }