1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.polls.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="PollsQuestionLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link PollsQuestionLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       PollsQuestionLocalService
37   * @generated
38   */
39  public class PollsQuestionLocalServiceUtil {
40      public static com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
41          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addPollsQuestion(pollsQuestion);
44      }
45  
46      public static com.liferay.portlet.polls.model.PollsQuestion createPollsQuestion(
47          long questionId) {
48          return getService().createPollsQuestion(questionId);
49      }
50  
51      public static void deletePollsQuestion(long questionId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deletePollsQuestion(questionId);
55      }
56  
57      public static void deletePollsQuestion(
58          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deletePollsQuestion(pollsQuestion);
61      }
62  
63      @SuppressWarnings("unchecked")
64      public static java.util.List dynamicQuery(
65          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66          throws com.liferay.portal.kernel.exception.SystemException {
67          return getService().dynamicQuery(dynamicQuery);
68      }
69  
70      @SuppressWarnings("unchecked")
71      public static java.util.List dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73          int end) throws com.liferay.portal.kernel.exception.SystemException {
74          return getService().dynamicQuery(dynamicQuery, start, end);
75      }
76  
77      @SuppressWarnings("unchecked")
78      public static java.util.List dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80          int end,
81          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82          throws com.liferay.portal.kernel.exception.SystemException {
83          return getService()
84                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85      }
86  
87      public static long dynamicQueryCount(
88          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().dynamicQueryCount(dynamicQuery);
91      }
92  
93      public static com.liferay.portlet.polls.model.PollsQuestion getPollsQuestion(
94          long questionId)
95          throws com.liferay.portal.kernel.exception.PortalException,
96              com.liferay.portal.kernel.exception.SystemException {
97          return getService().getPollsQuestion(questionId);
98      }
99  
100     public static com.liferay.portlet.polls.model.PollsQuestion getPollsQuestionByUuidAndGroupId(
101         java.lang.String uuid, long groupId)
102         throws com.liferay.portal.kernel.exception.PortalException,
103             com.liferay.portal.kernel.exception.SystemException {
104         return getService().getPollsQuestionByUuidAndGroupId(uuid, groupId);
105     }
106 
107     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
108         int start, int end)
109         throws com.liferay.portal.kernel.exception.SystemException {
110         return getService().getPollsQuestions(start, end);
111     }
112 
113     public static int getPollsQuestionsCount()
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getService().getPollsQuestionsCount();
116     }
117 
118     public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
119         com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getService().updatePollsQuestion(pollsQuestion);
122     }
123 
124     public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
125         com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
126         boolean merge)
127         throws com.liferay.portal.kernel.exception.SystemException {
128         return getService().updatePollsQuestion(pollsQuestion, merge);
129     }
130 
131     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
132         java.lang.String uuid, long userId,
133         java.util.Map<java.util.Locale, java.lang.String> titleMap,
134         java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
135         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
136         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
137         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
138         com.liferay.portal.service.ServiceContext serviceContext)
139         throws com.liferay.portal.kernel.exception.PortalException,
140             com.liferay.portal.kernel.exception.SystemException {
141         return getService()
142                    .addQuestion(uuid, userId, titleMap, descriptionMap,
143             expirationDateMonth, expirationDateDay, expirationDateYear,
144             expirationDateHour, expirationDateMinute, neverExpire, choices,
145             serviceContext);
146     }
147 
148     public static void addQuestionResources(long questionId,
149         boolean addCommunityPermissions, boolean addGuestPermissions)
150         throws com.liferay.portal.kernel.exception.PortalException,
151             com.liferay.portal.kernel.exception.SystemException {
152         getService()
153             .addQuestionResources(questionId, addCommunityPermissions,
154             addGuestPermissions);
155     }
156 
157     public static void addQuestionResources(long questionId,
158         java.lang.String[] communityPermissions,
159         java.lang.String[] guestPermissions)
160         throws com.liferay.portal.kernel.exception.PortalException,
161             com.liferay.portal.kernel.exception.SystemException {
162         getService()
163             .addQuestionResources(questionId, communityPermissions,
164             guestPermissions);
165     }
166 
167     public static void addQuestionResources(
168         com.liferay.portlet.polls.model.PollsQuestion question,
169         boolean addCommunityPermissions, boolean addGuestPermissions)
170         throws com.liferay.portal.kernel.exception.PortalException,
171             com.liferay.portal.kernel.exception.SystemException {
172         getService()
173             .addQuestionResources(question, addCommunityPermissions,
174             addGuestPermissions);
175     }
176 
177     public static void addQuestionResources(
178         com.liferay.portlet.polls.model.PollsQuestion question,
179         java.lang.String[] communityPermissions,
180         java.lang.String[] guestPermissions)
181         throws com.liferay.portal.kernel.exception.PortalException,
182             com.liferay.portal.kernel.exception.SystemException {
183         getService()
184             .addQuestionResources(question, communityPermissions,
185             guestPermissions);
186     }
187 
188     public static void deleteQuestion(long questionId)
189         throws com.liferay.portal.kernel.exception.PortalException,
190             com.liferay.portal.kernel.exception.SystemException {
191         getService().deleteQuestion(questionId);
192     }
193 
194     public static void deleteQuestion(
195         com.liferay.portlet.polls.model.PollsQuestion question)
196         throws com.liferay.portal.kernel.exception.PortalException,
197             com.liferay.portal.kernel.exception.SystemException {
198         getService().deleteQuestion(question);
199     }
200 
201     public static void deleteQuestions(long groupId)
202         throws com.liferay.portal.kernel.exception.PortalException,
203             com.liferay.portal.kernel.exception.SystemException {
204         getService().deleteQuestions(groupId);
205     }
206 
207     public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
208         long questionId)
209         throws com.liferay.portal.kernel.exception.PortalException,
210             com.liferay.portal.kernel.exception.SystemException {
211         return getService().getQuestion(questionId);
212     }
213 
214     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
215         long groupId)
216         throws com.liferay.portal.kernel.exception.SystemException {
217         return getService().getQuestions(groupId);
218     }
219 
220     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
221         long groupId, int start, int end)
222         throws com.liferay.portal.kernel.exception.SystemException {
223         return getService().getQuestions(groupId, start, end);
224     }
225 
226     public static int getQuestionsCount(long groupId)
227         throws com.liferay.portal.kernel.exception.SystemException {
228         return getService().getQuestionsCount(groupId);
229     }
230 
231     public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
232         long userId, long questionId,
233         java.util.Map<java.util.Locale, java.lang.String> titleMap,
234         java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
235         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
236         int expirationDateHour, int expirationDateMinute, boolean neverExpire)
237         throws com.liferay.portal.kernel.exception.PortalException,
238             com.liferay.portal.kernel.exception.SystemException {
239         return getService()
240                    .updateQuestion(userId, questionId, titleMap,
241             descriptionMap, expirationDateMonth, expirationDateDay,
242             expirationDateYear, expirationDateHour, expirationDateMinute,
243             neverExpire);
244     }
245 
246     public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
247         long userId, long questionId,
248         java.util.Map<java.util.Locale, java.lang.String> titleMap,
249         java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
250         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
251         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
252         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
253         com.liferay.portal.service.ServiceContext serviceContext)
254         throws com.liferay.portal.kernel.exception.PortalException,
255             com.liferay.portal.kernel.exception.SystemException {
256         return getService()
257                    .updateQuestion(userId, questionId, titleMap,
258             descriptionMap, expirationDateMonth, expirationDateDay,
259             expirationDateYear, expirationDateHour, expirationDateMinute,
260             neverExpire, choices, serviceContext);
261     }
262 
263     public static PollsQuestionLocalService getService() {
264         if (_service == null) {
265             _service = (PollsQuestionLocalService)PortalBeanLocatorUtil.locate(PollsQuestionLocalService.class.getName());
266         }
267 
268         return _service;
269     }
270 
271     public void setService(PollsQuestionLocalService service) {
272         _service = service;
273     }
274 
275     private static PollsQuestionLocalService _service;
276 }