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