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