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 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 DLFileEntryFinderUtil {
027            public static int countByExtraSettings()
028                    throws com.liferay.portal.kernel.exception.SystemException {
029                    return getFinder().countByExtraSettings();
030            }
031    
032            public static int countByG_F(long groupId,
033                    java.util.List<java.lang.Long> folderIds,
034                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getFinder().countByG_F(groupId, folderIds, queryDefinition);
037            }
038    
039            public static int countByG_M_R(long groupId,
040                    com.liferay.portal.kernel.util.DateRange dateRange, long repositoryId,
041                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
042                    throws com.liferay.portal.kernel.exception.SystemException {
043                    return getFinder()
044                                       .countByG_M_R(groupId, dateRange, repositoryId,
045                            queryDefinition);
046            }
047    
048            public static int countByG_U_F_M(long groupId, long userId,
049                    java.util.List<java.lang.Long> folderIds, java.lang.String[] mimeTypes,
050                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
051                    throws com.liferay.portal.kernel.exception.SystemException {
052                    return getFinder()
053                                       .countByG_U_F_M(groupId, userId, folderIds, mimeTypes,
054                            queryDefinition);
055            }
056    
057            public static int filterCountByG_U_F_M(long groupId, long userId,
058                    java.util.List<java.lang.Long> folderIds, java.lang.String[] mimeTypes,
059                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
060                    throws com.liferay.portal.kernel.exception.SystemException {
061                    return getFinder()
062                                       .filterCountByG_U_F_M(groupId, userId, folderIds, mimeTypes,
063                            queryDefinition);
064            }
065    
066            public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByAnyImageId(
067                    long imageId)
068                    throws com.liferay.portal.kernel.exception.SystemException {
069                    return getFinder().fetchByAnyImageId(imageId);
070            }
071    
072            public static int filterCountByG_F(long groupId,
073                    java.util.List<java.lang.Long> folderIds,
074                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getFinder().filterCountByG_F(groupId, folderIds, queryDefinition);
077            }
078    
079            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> filterFindByG_F(
080                    long groupId, java.util.List<java.lang.Long> folderIds,
081                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getFinder().filterFindByG_F(groupId, folderIds, queryDefinition);
084            }
085    
086            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> filterFindByG_U_F_M(
087                    long groupId, long userId, java.util.List<java.lang.Long> folderIds,
088                    java.lang.String[] mimeTypes,
089                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
090                    throws com.liferay.portal.kernel.exception.SystemException {
091                    return getFinder()
092                                       .filterFindByG_U_F_M(groupId, userId, folderIds, mimeTypes,
093                            queryDefinition);
094            }
095    
096            public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByAnyImageId(
097                    long imageId)
098                    throws com.liferay.portal.kernel.exception.SystemException,
099                            com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
100                    return getFinder().findByAnyImageId(imageId);
101            }
102    
103            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
104                    long companyId,
105                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getFinder().findByCompanyId(companyId, queryDefinition);
108            }
109    
110            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByDDMStructureIds(
111                    long[] ddmStructureIds, int start, int end)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getFinder().findByDDMStructureIds(ddmStructureIds, start, end);
114            }
115    
116            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByExtraSettings(
117                    int start, int end)
118                    throws com.liferay.portal.kernel.exception.SystemException {
119                    return getFinder().findByExtraSettings(start, end);
120            }
121    
122            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByMisversioned()
123                    throws com.liferay.portal.kernel.exception.SystemException {
124                    return getFinder().findByMisversioned();
125            }
126    
127            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByNoAssets()
128                    throws com.liferay.portal.kernel.exception.SystemException {
129                    return getFinder().findByNoAssets();
130            }
131    
132            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByOrphanedFileEntries()
133                    throws com.liferay.portal.kernel.exception.SystemException {
134                    return getFinder().findByOrphanedFileEntries();
135            }
136    
137            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_F(
138                    long groupId, java.util.List<java.lang.Long> folderIds,
139                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
140                    throws com.liferay.portal.kernel.exception.SystemException {
141                    return getFinder().findByG_F(groupId, folderIds, queryDefinition);
142            }
143    
144            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_U_F_M(
145                    long groupId, long userId, java.util.List<java.lang.Long> folderIds,
146                    java.lang.String[] mimeTypes,
147                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
148                    throws com.liferay.portal.kernel.exception.SystemException {
149                    return getFinder()
150                                       .findByG_U_F_M(groupId, userId, folderIds, mimeTypes,
151                            queryDefinition);
152            }
153    
154            public static DLFileEntryFinder getFinder() {
155                    if (_finder == null) {
156                            _finder = (DLFileEntryFinder)PortalBeanLocatorUtil.locate(DLFileEntryFinder.class.getName());
157    
158                            ReferenceRegistry.registerReference(DLFileEntryFinderUtil.class,
159                                    "_finder");
160                    }
161    
162                    return _finder;
163            }
164    
165            public void setFinder(DLFileEntryFinder finder) {
166                    _finder = finder;
167    
168                    ReferenceRegistry.registerReference(DLFileEntryFinderUtil.class,
169                            "_finder");
170            }
171    
172            private static DLFileEntryFinder _finder;
173    }