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