001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 nodeId, java.util.Date createDate,
025                    boolean before)
026                    throws com.liferay.portal.kernel.exception.SystemException {
027                    return getFinder().countByCreateDate(nodeId, createDate, before);
028            }
029    
030            public static int countByCreateDate(long nodeId,
031                    java.sql.Timestamp createDate, boolean before)
032                    throws com.liferay.portal.kernel.exception.SystemException {
033                    return getFinder().countByCreateDate(nodeId, createDate, before);
034            }
035    
036            public static com.liferay.portlet.wiki.model.WikiPage findByResourcePrimKey(
037                    long resourcePrimKey)
038                    throws com.liferay.portal.kernel.exception.SystemException,
039                            com.liferay.portlet.wiki.NoSuchPageException {
040                    return getFinder().findByResourcePrimKey(resourcePrimKey);
041            }
042    
043            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> findByCreateDate(
044                    long nodeId, java.util.Date createDate, boolean before, int start,
045                    int end) throws com.liferay.portal.kernel.exception.SystemException {
046                    return getFinder()
047                                       .findByCreateDate(nodeId, createDate, before, start, end);
048            }
049    
050            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> findByCreateDate(
051                    long nodeId, java.sql.Timestamp createDate, boolean before, int start,
052                    int end) throws com.liferay.portal.kernel.exception.SystemException {
053                    return getFinder()
054                                       .findByCreateDate(nodeId, createDate, before, start, end);
055            }
056    
057            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> findByNoAssets()
058                    throws com.liferay.portal.kernel.exception.SystemException {
059                    return getFinder().findByNoAssets();
060            }
061    
062            public static WikiPageFinder getFinder() {
063                    if (_finder == null) {
064                            _finder = (WikiPageFinder)PortalBeanLocatorUtil.locate(WikiPageFinder.class.getName());
065    
066                            ReferenceRegistry.registerReference(WikiPageFinderUtil.class,
067                                    "_finder");
068                    }
069    
070                    return _finder;
071            }
072    
073            public void setFinder(WikiPageFinder finder) {
074                    _finder = finder;
075    
076                    ReferenceRegistry.registerReference(WikiPageFinderUtil.class, "_finder");
077            }
078    
079            private static WikiPageFinder _finder;
080    }