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 AssetTagFinderUtil {
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[] tagProperties)
032                    throws com.liferay.portal.kernel.exception.SystemException {
033                    return getFinder().countByG_N_P(groupId, name, tagProperties);
034            }
035    
036            public static int filterCountByG_N(long groupId, java.lang.String name)
037                    throws com.liferay.portal.kernel.exception.SystemException {
038                    return getFinder().filterCountByG_N(groupId, name);
039            }
040    
041            public static int filterCountByG_C_N(long groupId, long classNameId,
042                    java.lang.String name)
043                    throws com.liferay.portal.kernel.exception.SystemException {
044                    return getFinder().filterCountByG_C_N(groupId, classNameId, name);
045            }
046    
047            public static int filterCountByG_N_P(long groupId, java.lang.String name,
048                    java.lang.String[] tagProperties)
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getFinder().filterCountByG_N_P(groupId, name, tagProperties);
051            }
052    
053            public static com.liferay.portlet.asset.model.AssetTag filterFindByG_N(
054                    long groupId, java.lang.String name)
055                    throws com.liferay.portal.kernel.exception.SystemException,
056                            com.liferay.portlet.asset.NoSuchTagException {
057                    return getFinder().filterFindByG_N(groupId, name);
058            }
059    
060            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByG_C_N(
061                    long groupId, long classNameId, java.lang.String name, int start,
062                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
063                    throws com.liferay.portal.kernel.exception.SystemException {
064                    return getFinder()
065                                       .filterFindByG_C_N(groupId, classNameId, name, start, end,
066                            obc);
067            }
068    
069            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> filterFindByG_N_P(
070                    long[] groupIds, java.lang.String name,
071                    java.lang.String[] tagProperties, int start, int end,
072                    com.liferay.portal.kernel.util.OrderByComparator obc)
073                    throws com.liferay.portal.kernel.exception.SystemException {
074                    return getFinder()
075                                       .filterFindByG_N_P(groupIds, name, tagProperties, start,
076                            end, obc);
077            }
078    
079            public static com.liferay.portlet.asset.model.AssetTag findByG_N(
080                    long groupId, java.lang.String name)
081                    throws com.liferay.portal.kernel.exception.SystemException,
082                            com.liferay.portlet.asset.NoSuchTagException {
083                    return getFinder().findByG_N(groupId, name);
084            }
085    
086            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findByG_C_N(
087                    long groupId, long classNameId, java.lang.String name, int start,
088                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
089                    throws com.liferay.portal.kernel.exception.SystemException {
090                    return getFinder()
091                                       .findByG_C_N(groupId, classNameId, name, start, end, obc);
092            }
093    
094            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findByG_N_P(
095                    long[] groupIds, java.lang.String name,
096                    java.lang.String[] tagProperties, int start, int end,
097                    com.liferay.portal.kernel.util.OrderByComparator obc)
098                    throws com.liferay.portal.kernel.exception.SystemException {
099                    return getFinder()
100                                       .findByG_N_P(groupIds, name, tagProperties, start, end, obc);
101            }
102    
103            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> findByG_N_S_E(
104                    long groupId, java.lang.String name, int startPeriod, int endPeriod,
105                    int periodLength)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getFinder()
108                                       .findByG_N_S_E(groupId, name, startPeriod, endPeriod,
109                            periodLength);
110            }
111    
112            public static AssetTagFinder getFinder() {
113                    if (_finder == null) {
114                            _finder = (AssetTagFinder)PortalBeanLocatorUtil.locate(AssetTagFinder.class.getName());
115    
116                            ReferenceRegistry.registerReference(AssetTagFinderUtil.class,
117                                    "_finder");
118                    }
119    
120                    return _finder;
121            }
122    
123            public void setFinder(AssetTagFinder finder) {
124                    _finder = finder;
125    
126                    ReferenceRegistry.registerReference(AssetTagFinderUtil.class, "_finder");
127            }
128    
129            private static AssetTagFinder _finder;
130    }