001    /**
002     * Copyright (c) 2000-2011 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.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<com.liferay.portlet.asset.model.AssetCategory> findByEntryId(
037                    long entryId)
038                    throws com.liferay.portal.kernel.exception.SystemException {
039                    return getFinder().findByEntryId(entryId);
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> findByC_C(
050                    long classNameId, long classPK)
051                    throws com.liferay.portal.kernel.exception.SystemException {
052                    return getFinder().findByC_C(classNameId, classPK);
053            }
054    
055            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> findByG_N_P(
056                    long groupId, java.lang.String name,
057                    java.lang.String[] categoryProperties)
058                    throws com.liferay.portal.kernel.exception.SystemException {
059                    return getFinder().findByG_N_P(groupId, name, categoryProperties);
060            }
061    
062            public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> findByG_N_P(
063                    long groupId, java.lang.String name,
064                    java.lang.String[] categoryProperties, int start, int end)
065                    throws com.liferay.portal.kernel.exception.SystemException {
066                    return getFinder()
067                                       .findByG_N_P(groupId, name, categoryProperties, start, end);
068            }
069    
070            public static AssetCategoryFinder getFinder() {
071                    if (_finder == null) {
072                            _finder = (AssetCategoryFinder)PortalBeanLocatorUtil.locate(AssetCategoryFinder.class.getName());
073    
074                            ReferenceRegistry.registerReference(AssetCategoryFinderUtil.class,
075                                    "_finder");
076                    }
077    
078                    return _finder;
079            }
080    
081            public void setFinder(AssetCategoryFinder finder) {
082                    _finder = finder;
083    
084                    ReferenceRegistry.registerReference(AssetCategoryFinderUtil.class,
085                            "_finder");
086            }
087    
088            private static AssetCategoryFinder _finder;
089    }