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.calendar.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 CalEventFinderUtil {
024            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByFutureReminders()
025                    throws com.liferay.portal.kernel.exception.SystemException {
026                    return getFinder().findByFutureReminders();
027            }
028    
029            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByNoAssets()
030                    throws com.liferay.portal.kernel.exception.SystemException {
031                    return getFinder().findByNoAssets();
032            }
033    
034            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_SD(
035                    long groupId, java.util.Date startDateGT, java.util.Date startDateLT,
036                    boolean timeZoneSensitive)
037                    throws com.liferay.portal.kernel.exception.SystemException {
038                    return getFinder()
039                                       .findByG_SD(groupId, startDateGT, startDateLT,
040                            timeZoneSensitive);
041            }
042    
043            public static CalEventFinder getFinder() {
044                    if (_finder == null) {
045                            _finder = (CalEventFinder)PortalBeanLocatorUtil.locate(CalEventFinder.class.getName());
046    
047                            ReferenceRegistry.registerReference(CalEventFinderUtil.class,
048                                    "_finder");
049                    }
050    
051                    return _finder;
052            }
053    
054            public void setFinder(CalEventFinder finder) {
055                    _finder = finder;
056    
057                    ReferenceRegistry.registerReference(CalEventFinderUtil.class, "_finder");
058            }
059    
060            private static CalEventFinder _finder;
061    }