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 com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByAnyImageId(
058                    long imageId)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getFinder().fetchByAnyImageId(imageId);
061            }
062    
063            public static int filterCountByG_F(long groupId,
064                    java.util.List<java.lang.Long> folderIds,
065                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
066                    throws com.liferay.portal.kernel.exception.SystemException {
067                    return getFinder().filterCountByG_F(groupId, folderIds, queryDefinition);
068            }
069    
070            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> filterFindByG_F(
071                    long groupId, java.util.List<java.lang.Long> folderIds,
072                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
073                    throws com.liferay.portal.kernel.exception.SystemException {
074                    return getFinder().filterFindByG_F(groupId, folderIds, queryDefinition);
075            }
076    
077            public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByAnyImageId(
078                    long imageId)
079                    throws com.liferay.portal.kernel.exception.SystemException,
080                            com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
081                    return getFinder().findByAnyImageId(imageId);
082            }
083    
084            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
085                    long companyId,
086                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
087                    throws com.liferay.portal.kernel.exception.SystemException {
088                    return getFinder().findByCompanyId(companyId, queryDefinition);
089            }
090    
091            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByDDMStructureIds(
092                    long[] ddmStructureIds, int start, int end)
093                    throws com.liferay.portal.kernel.exception.SystemException {
094                    return getFinder().findByDDMStructureIds(ddmStructureIds, start, end);
095            }
096    
097            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByExtraSettings(
098                    int start, int end)
099                    throws com.liferay.portal.kernel.exception.SystemException {
100                    return getFinder().findByExtraSettings(start, end);
101            }
102    
103            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByMisversioned()
104                    throws com.liferay.portal.kernel.exception.SystemException {
105                    return getFinder().findByMisversioned();
106            }
107    
108            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByNoAssets()
109                    throws com.liferay.portal.kernel.exception.SystemException {
110                    return getFinder().findByNoAssets();
111            }
112    
113            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByOrphanedFileEntries()
114                    throws com.liferay.portal.kernel.exception.SystemException {
115                    return getFinder().findByOrphanedFileEntries();
116            }
117    
118            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_F(
119                    long groupId, java.util.List<java.lang.Long> folderIds,
120                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
121                    throws com.liferay.portal.kernel.exception.SystemException {
122                    return getFinder().findByG_F(groupId, folderIds, queryDefinition);
123            }
124    
125            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_U_F_M(
126                    long groupId, long userId, java.util.List<java.lang.Long> folderIds,
127                    java.lang.String[] mimeTypes,
128                    com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
129                    throws com.liferay.portal.kernel.exception.SystemException {
130                    return getFinder()
131                                       .findByG_U_F_M(groupId, userId, folderIds, mimeTypes,
132                            queryDefinition);
133            }
134    
135            public static DLFileEntryFinder getFinder() {
136                    if (_finder == null) {
137                            _finder = (DLFileEntryFinder)PortalBeanLocatorUtil.locate(DLFileEntryFinder.class.getName());
138    
139                            ReferenceRegistry.registerReference(DLFileEntryFinderUtil.class,
140                                    "_finder");
141                    }
142    
143                    return _finder;
144            }
145    
146            public void setFinder(DLFileEntryFinder finder) {
147                    _finder = finder;
148    
149                    ReferenceRegistry.registerReference(DLFileEntryFinderUtil.class,
150                            "_finder");
151            }
152    
153            private static DLFileEntryFinder _finder;
154    }