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.asset.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 AssetCategoryFinderUtil {
027            public static int countByG_C_N(long groupId, long classNameId,
028                    java.lang.String name)
029                    throws com.liferay.portal.kernel.exception.SystemException {
030                    return getFinder().countByG_C_N(groupId, classNameId, name);
031            }
032    
033            public static int countByG_N_P(long groupId, java.lang.String name,
034                    java.lang.String[] categoryProperties)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getFinder().countByG_N_P(groupId, name, categoryProperties);
037            }
038    
039            public static java.util.List<java.lang.Long> findByG_L(
040                    java.lang.Long parentCategoryId)
041                    throws com.liferay.portal.kernel.exception.SystemException {
042                    return getFinder().findByG_L(parentCategoryId);
043            }
044    
045            public static com.liferay.portlet.asset.model.AssetCategory findByG_N(
046                    long groupId, java.lang.String name)
047                    throws com.liferay.portal.kernel.exception.SystemException,
048                            com.liferay.portlet.asset.NoSuchCategoryException {
049                    return getFinder().findByG_N(groupId, name);
050            }
051    
052            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> findByG_N_P(
053                    long groupId, java.lang.String name,
054                    java.lang.String[] categoryProperties)
055                    throws com.liferay.portal.kernel.exception.SystemException {
056                    return getFinder().findByG_N_P(groupId, name, categoryProperties);
057            }
058    
059            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> findByG_N_P(
060                    long groupId, java.lang.String name,
061                    java.lang.String[] categoryProperties, int start, int end)
062                    throws com.liferay.portal.kernel.exception.SystemException {
063                    return getFinder()
064                                       .findByG_N_P(groupId, name, categoryProperties, start, end);
065            }
066    
067            public static AssetCategoryFinder getFinder() {
068                    if (_finder == null) {
069                            _finder = (AssetCategoryFinder)PortalBeanLocatorUtil.locate(AssetCategoryFinder.class.getName());
070    
071                            ReferenceRegistry.registerReference(AssetCategoryFinderUtil.class,
072                                    "_finder");
073                    }
074    
075                    return _finder;
076            }
077    
078            public void setFinder(AssetCategoryFinder finder) {
079                    _finder = finder;
080    
081                    ReferenceRegistry.registerReference(AssetCategoryFinderUtil.class,
082                            "_finder");
083            }
084    
085            private static AssetCategoryFinder _finder;
086    }