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.documentlibrary.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 DLFileEntryTypeFinderUtil {
027            public static int countByKeywords(long companyId, long[] groupIds,
028                    java.lang.String keywords, boolean includeBasicFileEntryType)
029                    throws com.liferay.portal.kernel.exception.SystemException {
030                    return getFinder()
031                                       .countByKeywords(companyId, groupIds, keywords,
032                            includeBasicFileEntryType);
033            }
034    
035            public static int filterCountByKeywords(long companyId, long[] groupIds,
036                    java.lang.String keywords, boolean includeBasicFileEntryType)
037                    throws com.liferay.portal.kernel.exception.SystemException {
038                    return getFinder()
039                                       .filterCountByKeywords(companyId, groupIds, keywords,
040                            includeBasicFileEntryType);
041            }
042    
043            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> filterFindByKeywords(
044                    long companyId, long[] groupIds, java.lang.String keywords,
045                    boolean includeBasicFileEntryType, int start, int end,
046                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
047                    throws com.liferay.portal.kernel.exception.SystemException {
048                    return getFinder()
049                                       .filterFindByKeywords(companyId, groupIds, keywords,
050                            includeBasicFileEntryType, start, end, orderByComparator);
051            }
052    
053            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> findByKeywords(
054                    long companyId, long[] groupIds, java.lang.String keywords,
055                    boolean includeBasicFileEntryType, int start, int end,
056                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
057                    throws com.liferay.portal.kernel.exception.SystemException {
058                    return getFinder()
059                                       .findByKeywords(companyId, groupIds, keywords,
060                            includeBasicFileEntryType, start, end, orderByComparator);
061            }
062    
063            public static DLFileEntryTypeFinder getFinder() {
064                    if (_finder == null) {
065                            _finder = (DLFileEntryTypeFinder)PortalBeanLocatorUtil.locate(DLFileEntryTypeFinder.class.getName());
066    
067                            ReferenceRegistry.registerReference(DLFileEntryTypeFinderUtil.class,
068                                    "_finder");
069                    }
070    
071                    return _finder;
072            }
073    
074            public void setFinder(DLFileEntryTypeFinder finder) {
075                    _finder = finder;
076    
077                    ReferenceRegistry.registerReference(DLFileEntryTypeFinderUtil.class,
078                            "_finder");
079            }
080    
081            private static DLFileEntryTypeFinder _finder;
082    }