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.bookmarks.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link BookmarksEntryService} 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       BookmarksEntryService
030     * @generated
031     */
032    public class BookmarksEntryServiceUtil {
033            public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
034                    long groupId, long folderId, java.lang.String name,
035                    java.lang.String url, java.lang.String comments,
036                    com.liferay.portal.service.ServiceContext serviceContext)
037                    throws com.liferay.portal.kernel.exception.PortalException,
038                            com.liferay.portal.kernel.exception.SystemException {
039                    return getService()
040                                       .addEntry(groupId, folderId, name, url, comments,
041                            serviceContext);
042            }
043    
044            public static void deleteEntry(long entryId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteEntry(entryId);
048            }
049    
050            public static com.liferay.portlet.bookmarks.model.BookmarksEntry getEntry(
051                    long entryId)
052                    throws com.liferay.portal.kernel.exception.PortalException,
053                            com.liferay.portal.kernel.exception.SystemException {
054                    return getService().getEntry(entryId);
055            }
056    
057            public static com.liferay.portlet.bookmarks.model.BookmarksEntry openEntry(
058                    long entryId)
059                    throws com.liferay.portal.kernel.exception.PortalException,
060                            com.liferay.portal.kernel.exception.SystemException {
061                    return getService().openEntry(entryId);
062            }
063    
064            public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateEntry(
065                    long entryId, long groupId, long folderId, java.lang.String name,
066                    java.lang.String url, java.lang.String comments,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    return getService()
071                                       .updateEntry(entryId, groupId, folderId, name, url,
072                            comments, serviceContext);
073            }
074    
075            public static BookmarksEntryService getService() {
076                    if (_service == null) {
077                            _service = (BookmarksEntryService)PortalBeanLocatorUtil.locate(BookmarksEntryService.class.getName());
078                    }
079    
080                    return _service;
081            }
082    
083            public void setService(BookmarksEntryService service) {
084                    _service = service;
085            }
086    
087            private static BookmarksEntryService _service;
088    }