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(long groupId,
030                    java.util.List<java.lang.Long> folderIds,
031                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
032                    throws com.liferay.portal.kernel.exception.SystemException {
033                    return getFinder().countByG_F(groupId, folderIds, queryDefinition);
034            }
035    
036            public static int countByG_U_F_M(long groupId, long userId,
037                    java.util.List<java.lang.Long> folderIds, java.lang.String[] mimeTypes,
038                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
039                    throws com.liferay.portal.kernel.exception.SystemException {
040                    return getFinder()
041                                       .countByG_U_F_M(groupId, userId, folderIds, mimeTypes,
042                            queryDefinition);
043            }
044    
045            public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByAnyImageId(
046                    long imageId)
047                    throws com.liferay.portal.kernel.exception.SystemException {
048                    return getFinder().fetchByAnyImageId(imageId);
049            }
050    
051            public static int filterCountByG_F(long groupId,
052                    java.util.List<java.lang.Long> folderIds,
053                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
054                    throws com.liferay.portal.kernel.exception.SystemException {
055                    return getFinder().filterCountByG_F(groupId, folderIds, queryDefinition);
056            }
057    
058            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> filterFindByG_F(
059                    long groupId, java.util.List<java.lang.Long> folderIds,
060                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
061                    throws com.liferay.portal.kernel.exception.SystemException {
062                    return getFinder().filterFindByG_F(groupId, folderIds, queryDefinition);
063            }
064    
065            public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByAnyImageId(
066                    long imageId)
067                    throws com.liferay.portal.kernel.exception.SystemException,
068                            com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
069                    return getFinder().findByAnyImageId(imageId);
070            }
071    
072            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByDDMStructureIds(
073                    long[] ddmStructureIds, int start, int end)
074                    throws com.liferay.portal.kernel.exception.SystemException {
075                    return getFinder().findByDDMStructureIds(ddmStructureIds, start, end);
076            }
077    
078            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByExtraSettings(
079                    int start, int end)
080                    throws com.liferay.portal.kernel.exception.SystemException {
081                    return getFinder().findByExtraSettings(start, end);
082            }
083    
084            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByMisversioned()
085                    throws com.liferay.portal.kernel.exception.SystemException {
086                    return getFinder().findByMisversioned();
087            }
088    
089            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByNoAssets()
090                    throws com.liferay.portal.kernel.exception.SystemException {
091                    return getFinder().findByNoAssets();
092            }
093    
094            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByOrphanedFileEntries()
095                    throws com.liferay.portal.kernel.exception.SystemException {
096                    return getFinder().findByOrphanedFileEntries();
097            }
098    
099            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_F(
100                    long groupId, java.util.List<java.lang.Long> folderIds,
101                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return getFinder().findByG_F(groupId, folderIds, queryDefinition);
104            }
105    
106            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_U_F_M(
107                    long groupId, long userId, java.util.List<java.lang.Long> folderIds,
108                    java.lang.String[] mimeTypes,
109                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
110                    throws com.liferay.portal.kernel.exception.SystemException {
111                    return getFinder()
112                                       .findByG_U_F_M(groupId, userId, folderIds, mimeTypes,
113                            queryDefinition);
114            }
115    
116            public static DLFileEntryFinder getFinder() {
117                    if (_finder == null) {
118                            _finder = (DLFileEntryFinder)PortalBeanLocatorUtil.locate(DLFileEntryFinder.class.getName());
119    
120                            ReferenceRegistry.registerReference(DLFileEntryFinderUtil.class,
121                                    "_finder");
122                    }
123    
124                    return _finder;
125            }
126    
127            public void setFinder(DLFileEntryFinder finder) {
128                    _finder = finder;
129    
130                    ReferenceRegistry.registerReference(DLFileEntryFinderUtil.class,
131                            "_finder");
132            }
133    
134            private static DLFileEntryFinder _finder;
135    }