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