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.announcements.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 AnnouncementsEntryFinderUtil {
024            public static int countByScope(long userId, long classNameId,
025                    long[] classPKs, int displayDateMonth, int displayDateDay,
026                    int displayDateYear, int displayDateHour, int displayDateMinute,
027                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
028                    int expirationDateHour, int expirationDateMinute, boolean alert,
029                    int flagValue)
030                    throws com.liferay.portal.kernel.exception.SystemException {
031                    return getFinder()
032                                       .countByScope(userId, classNameId, classPKs,
033                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
034                            displayDateMinute, expirationDateMonth, expirationDateDay,
035                            expirationDateYear, expirationDateHour, expirationDateMinute,
036                            alert, flagValue);
037            }
038    
039            public static int countByScopes(long userId,
040                    java.util.LinkedHashMap<java.lang.Long, long[]> scopes,
041                    int displayDateMonth, int displayDateDay, int displayDateYear,
042                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
043                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
044                    int expirationDateMinute, boolean alert, int flagValue)
045                    throws com.liferay.portal.kernel.exception.SystemException {
046                    return getFinder()
047                                       .countByScopes(userId, scopes, displayDateMonth,
048                            displayDateDay, displayDateYear, displayDateHour,
049                            displayDateMinute, expirationDateMonth, expirationDateDay,
050                            expirationDateYear, expirationDateHour, expirationDateMinute,
051                            alert, flagValue);
052            }
053    
054            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByDisplayDate(
055                    java.util.Date displayDateLT, java.util.Date displayDateGT)
056                    throws com.liferay.portal.kernel.exception.SystemException {
057                    return getFinder().findByDisplayDate(displayDateLT, displayDateGT);
058            }
059    
060            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByScope(
061                    long userId, long classNameId, long[] classPKs, int displayDateMonth,
062                    int displayDateDay, int displayDateYear, int displayDateHour,
063                    int displayDateMinute, int expirationDateMonth, int expirationDateDay,
064                    int expirationDateYear, int expirationDateHour,
065                    int expirationDateMinute, boolean alert, int flagValue, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getFinder()
068                                       .findByScope(userId, classNameId, classPKs,
069                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
070                            displayDateMinute, expirationDateMonth, expirationDateDay,
071                            expirationDateYear, expirationDateHour, expirationDateMinute,
072                            alert, flagValue, start, end);
073            }
074    
075            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByScopes(
076                    long userId, java.util.LinkedHashMap<java.lang.Long, long[]> scopes,
077                    int displayDateMonth, int displayDateDay, int displayDateYear,
078                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
079                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
080                    int expirationDateMinute, boolean alert, int flagValue, int start,
081                    int end) throws com.liferay.portal.kernel.exception.SystemException {
082                    return getFinder()
083                                       .findByScopes(userId, scopes, displayDateMonth,
084                            displayDateDay, displayDateYear, displayDateHour,
085                            displayDateMinute, expirationDateMonth, expirationDateDay,
086                            expirationDateYear, expirationDateHour, expirationDateMinute,
087                            alert, flagValue, start, end);
088            }
089    
090            public static AnnouncementsEntryFinder getFinder() {
091                    if (_finder == null) {
092                            _finder = (AnnouncementsEntryFinder)PortalBeanLocatorUtil.locate(AnnouncementsEntryFinder.class.getName());
093    
094                            ReferenceRegistry.registerReference(AnnouncementsEntryFinderUtil.class,
095                                    "_finder");
096                    }
097    
098                    return _finder;
099            }
100    
101            public void setFinder(AnnouncementsEntryFinder finder) {
102                    _finder = finder;
103    
104                    ReferenceRegistry.registerReference(AnnouncementsEntryFinderUtil.class,
105                            "_finder");
106            }
107    
108            private static AnnouncementsEntryFinder _finder;
109    }