001    /**
002     * Copyright (c) 2000-2012 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 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    }