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