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.polls.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link PollsQuestionLocalService} 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       PollsQuestionLocalService
030     * @generated
031     */
032    public class PollsQuestionLocalServiceUtil {
033            public static com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
034                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addPollsQuestion(pollsQuestion);
037            }
038    
039            public static com.liferay.portlet.polls.model.PollsQuestion createPollsQuestion(
040                    long questionId) {
041                    return getService().createPollsQuestion(questionId);
042            }
043    
044            public static void deletePollsQuestion(long questionId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deletePollsQuestion(questionId);
048            }
049    
050            public static void deletePollsQuestion(
051                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deletePollsQuestion(pollsQuestion);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.polls.model.PollsQuestion getPollsQuestion(
087                    long questionId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getPollsQuestion(questionId);
091            }
092    
093            public static com.liferay.portlet.polls.model.PollsQuestion getPollsQuestionByUuidAndGroupId(
094                    java.lang.String uuid, long groupId)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    return getService().getPollsQuestionByUuidAndGroupId(uuid, groupId);
098            }
099    
100            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
101                    int start, int end)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return getService().getPollsQuestions(start, end);
104            }
105    
106            public static int getPollsQuestionsCount()
107                    throws com.liferay.portal.kernel.exception.SystemException {
108                    return getService().getPollsQuestionsCount();
109            }
110    
111            public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
112                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updatePollsQuestion(pollsQuestion);
115            }
116    
117            public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
118                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
119                    boolean merge)
120                    throws com.liferay.portal.kernel.exception.SystemException {
121                    return getService().updatePollsQuestion(pollsQuestion, merge);
122            }
123    
124            public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
125                    long userId,
126                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
127                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
128                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
129                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
130                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
131                    com.liferay.portal.service.ServiceContext serviceContext)
132                    throws com.liferay.portal.kernel.exception.PortalException,
133                            com.liferay.portal.kernel.exception.SystemException {
134                    return getService()
135                                       .addQuestion(userId, titleMap, descriptionMap,
136                            expirationDateMonth, expirationDateDay, expirationDateYear,
137                            expirationDateHour, expirationDateMinute, neverExpire, choices,
138                            serviceContext);
139            }
140    
141            public static void addQuestionResources(long questionId,
142                    boolean addCommunityPermissions, boolean addGuestPermissions)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException {
145                    getService()
146                            .addQuestionResources(questionId, addCommunityPermissions,
147                            addGuestPermissions);
148            }
149    
150            public static void addQuestionResources(long questionId,
151                    java.lang.String[] communityPermissions,
152                    java.lang.String[] guestPermissions)
153                    throws com.liferay.portal.kernel.exception.PortalException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    getService()
156                            .addQuestionResources(questionId, communityPermissions,
157                            guestPermissions);
158            }
159    
160            public static void addQuestionResources(
161                    com.liferay.portlet.polls.model.PollsQuestion question,
162                    boolean addCommunityPermissions, boolean addGuestPermissions)
163                    throws com.liferay.portal.kernel.exception.PortalException,
164                            com.liferay.portal.kernel.exception.SystemException {
165                    getService()
166                            .addQuestionResources(question, addCommunityPermissions,
167                            addGuestPermissions);
168            }
169    
170            public static void addQuestionResources(
171                    com.liferay.portlet.polls.model.PollsQuestion question,
172                    java.lang.String[] communityPermissions,
173                    java.lang.String[] guestPermissions)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    getService()
177                            .addQuestionResources(question, communityPermissions,
178                            guestPermissions);
179            }
180    
181            public static void deleteQuestion(long questionId)
182                    throws com.liferay.portal.kernel.exception.PortalException,
183                            com.liferay.portal.kernel.exception.SystemException {
184                    getService().deleteQuestion(questionId);
185            }
186    
187            public static void deleteQuestion(
188                    com.liferay.portlet.polls.model.PollsQuestion question)
189                    throws com.liferay.portal.kernel.exception.PortalException,
190                            com.liferay.portal.kernel.exception.SystemException {
191                    getService().deleteQuestion(question);
192            }
193    
194            public static void deleteQuestions(long groupId)
195                    throws com.liferay.portal.kernel.exception.PortalException,
196                            com.liferay.portal.kernel.exception.SystemException {
197                    getService().deleteQuestions(groupId);
198            }
199    
200            public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
201                    long questionId)
202                    throws com.liferay.portal.kernel.exception.PortalException,
203                            com.liferay.portal.kernel.exception.SystemException {
204                    return getService().getQuestion(questionId);
205            }
206    
207            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
208                    long groupId)
209                    throws com.liferay.portal.kernel.exception.SystemException {
210                    return getService().getQuestions(groupId);
211            }
212    
213            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
214                    long groupId, int start, int end)
215                    throws com.liferay.portal.kernel.exception.SystemException {
216                    return getService().getQuestions(groupId, start, end);
217            }
218    
219            public static int getQuestionsCount(long groupId)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getService().getQuestionsCount(groupId);
222            }
223    
224            public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
225                    long userId, long questionId,
226                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
227                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
228                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
229                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
230                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
231                    com.liferay.portal.service.ServiceContext serviceContext)
232                    throws com.liferay.portal.kernel.exception.PortalException,
233                            com.liferay.portal.kernel.exception.SystemException {
234                    return getService()
235                                       .updateQuestion(userId, questionId, titleMap,
236                            descriptionMap, expirationDateMonth, expirationDateDay,
237                            expirationDateYear, expirationDateHour, expirationDateMinute,
238                            neverExpire, choices, serviceContext);
239            }
240    
241            public static PollsQuestionLocalService getService() {
242                    if (_service == null) {
243                            _service = (PollsQuestionLocalService)PortalBeanLocatorUtil.locate(PollsQuestionLocalService.class.getName());
244                    }
245    
246                    return _service;
247            }
248    
249            public void setService(PollsQuestionLocalService service) {
250                    _service = service;
251            }
252    
253            private static PollsQuestionLocalService _service;
254    }