001    /**
002     * Copyright (c) 2000-2010 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    
019    /**
020     * @author Brian Wing Shun Chan
021     */
022    public class WikiPageFinderUtil {
023            public static int countByCreateDate(long nodeId, java.util.Date createDate,
024                    boolean before)
025                    throws com.liferay.portal.kernel.exception.SystemException {
026                    return getFinder().countByCreateDate(nodeId, createDate, before);
027            }
028    
029            public static int countByCreateDate(long nodeId,
030                    java.sql.Timestamp createDate, boolean before)
031                    throws com.liferay.portal.kernel.exception.SystemException {
032                    return getFinder().countByCreateDate(nodeId, createDate, before);
033            }
034    
035            public static com.liferay.portlet.wiki.model.WikiPage findByResourcePrimKey(
036                    long resourcePrimKey)
037                    throws com.liferay.portal.kernel.exception.SystemException,
038                            com.liferay.portlet.wiki.NoSuchPageException {
039                    return getFinder().findByResourcePrimKey(resourcePrimKey);
040            }
041    
042            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> findByCreateDate(
043                    long nodeId, java.util.Date createDate, boolean before, int start,
044                    int end) throws com.liferay.portal.kernel.exception.SystemException {
045                    return getFinder()
046                                       .findByCreateDate(nodeId, createDate, before, start, end);
047            }
048    
049            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> findByCreateDate(
050                    long nodeId, java.sql.Timestamp createDate, boolean before, int start,
051                    int end) throws com.liferay.portal.kernel.exception.SystemException {
052                    return getFinder()
053                                       .findByCreateDate(nodeId, createDate, before, start, end);
054            }
055    
056            public static java.util.List<com.liferay.portlet.wiki.model.WikiPage> findByNoAssets()
057                    throws com.liferay.portal.kernel.exception.SystemException {
058                    return getFinder().findByNoAssets();
059            }
060    
061            public static WikiPageFinder getFinder() {
062                    if (_finder == null) {
063                            _finder = (WikiPageFinder)PortalBeanLocatorUtil.locate(WikiPageFinder.class.getName());
064                    }
065    
066                    return _finder;
067            }
068    
069            public void setFinder(WikiPageFinder finder) {
070                    _finder = finder;
071            }
072    
073            private static WikiPageFinder _finder;
074    }