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