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