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.announcements.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link AnnouncementsEntryService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       AnnouncementsEntryService
030     * @generated
031     */
032    public class AnnouncementsEntryServiceUtil {
033            public static com.liferay.portlet.announcements.model.AnnouncementsEntry addEntry(
034                    long plid, long classNameId, long classPK, java.lang.String title,
035                    java.lang.String content, java.lang.String url, java.lang.String type,
036                    int displayDateMonth, int displayDateDay, int displayDateYear,
037                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
038                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
039                    int expirationDateMinute, int priority, boolean alert)
040                    throws com.liferay.portal.kernel.exception.PortalException,
041                            com.liferay.portal.kernel.exception.SystemException {
042                    return getService()
043                                       .addEntry(plid, classNameId, classPK, title, content, url,
044                            type, displayDateMonth, displayDateDay, displayDateYear,
045                            displayDateHour, displayDateMinute, expirationDateMonth,
046                            expirationDateDay, expirationDateYear, expirationDateHour,
047                            expirationDateMinute, priority, alert);
048            }
049    
050            public static void deleteEntry(long entryId)
051                    throws com.liferay.portal.kernel.exception.PortalException,
052                            com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteEntry(entryId);
054            }
055    
056            public static com.liferay.portlet.announcements.model.AnnouncementsEntry updateEntry(
057                    long entryId, java.lang.String title, java.lang.String content,
058                    java.lang.String url, java.lang.String type, int displayDateMonth,
059                    int displayDateDay, int displayDateYear, int displayDateHour,
060                    int displayDateMinute, int expirationDateMonth, int expirationDateDay,
061                    int expirationDateYear, int expirationDateHour,
062                    int expirationDateMinute, int priority)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    return getService()
066                                       .updateEntry(entryId, title, content, url, type,
067                            displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
068                            displayDateMinute, expirationDateMonth, expirationDateDay,
069                            expirationDateYear, expirationDateHour, expirationDateMinute,
070                            priority);
071            }
072    
073            public static AnnouncementsEntryService getService() {
074                    if (_service == null) {
075                            _service = (AnnouncementsEntryService)PortalBeanLocatorUtil.locate(AnnouncementsEntryService.class.getName());
076                    }
077    
078                    return _service;
079            }
080    
081            public void setService(AnnouncementsEntryService service) {
082                    _service = service;
083            }
084    
085            private static AnnouncementsEntryService _service;
086    }