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 DLFileEntryFinderUtil {
024            public static int countByExtraSettings()
025                    throws com.liferay.portal.kernel.exception.SystemException {
026                    return getFinder().countByExtraSettings();
027            }
028    
029            public static int countByG_F_S(long groupId,
030                    java.util.List<java.lang.Long> folderIds, int status)
031                    throws com.liferay.portal.kernel.exception.SystemException {
032                    return getFinder().countByG_F_S(groupId, folderIds, status);
033            }
034    
035            public static int countByG_U_F_M_S(long groupId, long userId,
036                    java.util.List<java.lang.Long> folderIds, java.lang.String[] mimeTypes,
037                    int status) throws com.liferay.portal.kernel.exception.SystemException {
038                    return getFinder()
039                                       .countByG_U_F_M_S(groupId, userId, folderIds, mimeTypes,
040                            status);
041            }
042    
043            public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByAnyImageId(
044                    long imageId)
045                    throws com.liferay.portal.kernel.exception.SystemException {
046                    return getFinder().fetchByAnyImageId(imageId);
047            }
048    
049            public static int filterCountByG_F_S(long groupId,
050                    java.util.List<java.lang.Long> folderIds, int status)
051                    throws com.liferay.portal.kernel.exception.SystemException {
052                    return getFinder().filterCountByG_F_S(groupId, folderIds, status);
053            }
054    
055            public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByAnyImageId(
056                    long imageId)
057                    throws com.liferay.portal.kernel.exception.SystemException,
058                            com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
059                    return getFinder().findByAnyImageId(imageId);
060            }
061    
062            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByExtraSettings(
063                    int start, int end)
064                    throws com.liferay.portal.kernel.exception.SystemException {
065                    return getFinder().findByExtraSettings(start, end);
066            }
067    
068            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByMisversioned()
069                    throws com.liferay.portal.kernel.exception.SystemException {
070                    return getFinder().findByMisversioned();
071            }
072    
073            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByNoAssets()
074                    throws com.liferay.portal.kernel.exception.SystemException {
075                    return getFinder().findByNoAssets();
076            }
077    
078            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByOrphanedFileEntries()
079                    throws com.liferay.portal.kernel.exception.SystemException {
080                    return getFinder().findByOrphanedFileEntries();
081            }
082    
083            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_U_F_M_S(
084                    long groupId, long userId, java.util.List<java.lang.Long> folderIds,
085                    java.lang.String[] mimeTypes, int status, int start, int end,
086                    com.liferay.portal.kernel.util.OrderByComparator obc)
087                    throws com.liferay.portal.kernel.exception.SystemException {
088                    return getFinder()
089                                       .findByG_U_F_M_S(groupId, userId, folderIds, mimeTypes,
090                            status, start, end, obc);
091            }
092    
093            public static DLFileEntryFinder getFinder() {
094                    if (_finder == null) {
095                            _finder = (DLFileEntryFinder)PortalBeanLocatorUtil.locate(DLFileEntryFinder.class.getName());
096    
097                            ReferenceRegistry.registerReference(DLFileEntryFinderUtil.class,
098                                    "_finder");
099                    }
100    
101                    return _finder;
102            }
103    
104            public void setFinder(DLFileEntryFinder finder) {
105                    _finder = finder;
106    
107                    ReferenceRegistry.registerReference(DLFileEntryFinderUtil.class,
108                            "_finder");
109            }
110    
111            private static DLFileEntryFinder _finder;
112    }