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