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.wiki.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 WikiPageFinderUtil {
024            public static int countByCreateDate(long groupId, long nodeId,
025                    java.util.Date createDate, boolean before)
026                    throws com.liferay.portal.kernel.exception.SystemException {
027                    return getFinder().countByCreateDate(groupId, nodeId, createDate, before);
028            }
029    
030            public static int countByCreateDate(long groupId, long nodeId,
031                    java.sql.Timestamp createDate, boolean before)
032                    throws com.liferay.portal.kernel.exception.SystemException {
033                    return getFinder().countByCreateDate(groupId, nodeId, createDate, before);
034            }
035    
036            public static int filterCountByCreateDate(long groupId, long nodeId,
037                    java.util.Date createDate, boolean before)
038                    throws com.liferay.portal.kernel.exception.SystemException {
039                    return getFinder()
040                                       .filterCountByCreateDate(groupId, nodeId, createDate, before);
041            }
042    
043            public static int filterCountByCreateDate(long groupId, long nodeId,
044                    java.sql.Timestamp createDate, boolean before)
045                    throws com.liferay.portal.kernel.exception.SystemException {
046                    return getFinder()
047                                       .filterCountByCreateDate(groupId, nodeId, createDate, before);
048            }
049    
050            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> filterFindByCreateDate(
051                    long groupId, long nodeId, java.util.Date createDate, boolean before,
052                    int start, int end)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getFinder()
055                                       .filterFindByCreateDate(groupId, nodeId, createDate, before,
056                            start, end);
057            }
058    
059            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> filterFindByCreateDate(
060                    long groupId, long nodeId, java.sql.Timestamp createDate,
061                    boolean before, int start, int end)
062                    throws com.liferay.portal.kernel.exception.SystemException {
063                    return getFinder()
064                                       .filterFindByCreateDate(groupId, nodeId, createDate, before,
065                            start, end);
066            }
067    
068            public static com.liferay.portlet.wiki.model.WikiPage findByResourcePrimKey(
069                    long resourcePrimKey)
070                    throws com.liferay.portal.kernel.exception.SystemException,
071                            com.liferay.portlet.wiki.NoSuchPageException {
072                    return getFinder().findByResourcePrimKey(resourcePrimKey);
073            }
074    
075            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> findByCreateDate(
076                    long groupId, long nodeId, java.util.Date createDate, boolean before,
077                    int start, int end)
078                    throws com.liferay.portal.kernel.exception.SystemException {
079                    return getFinder()
080                                       .findByCreateDate(groupId, nodeId, createDate, before,
081                            start, end);
082            }
083    
084            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> findByCreateDate(
085                    long groupId, long nodeId, java.sql.Timestamp createDate,
086                    boolean before, int start, int end)
087                    throws com.liferay.portal.kernel.exception.SystemException {
088                    return getFinder()
089                                       .findByCreateDate(groupId, nodeId, createDate, before,
090                            start, end);
091            }
092    
093            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> findByNoAssets()
094                    throws com.liferay.portal.kernel.exception.SystemException {
095                    return getFinder().findByNoAssets();
096            }
097    
098            public static WikiPageFinder getFinder() {
099                    if (_finder == null) {
100                            _finder = (WikiPageFinder)PortalBeanLocatorUtil.locate(WikiPageFinder.class.getName());
101    
102                            ReferenceRegistry.registerReference(WikiPageFinderUtil.class,
103                                    "_finder");
104                    }
105    
106                    return _finder;
107            }
108    
109            public void setFinder(WikiPageFinder finder) {
110                    _finder = finder;
111    
112                    ReferenceRegistry.registerReference(WikiPageFinderUtil.class, "_finder");
113            }
114    
115            private static WikiPageFinder _finder;
116    }