1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
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.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.PortalException,
53              com.liferay.portal.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.SystemException {
60          getService().deletePollsQuestion(pollsQuestion);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static com.liferay.portlet.polls.model.PollsQuestion getPollsQuestion(
76          long questionId)
77          throws com.liferay.portal.PortalException,
78              com.liferay.portal.SystemException {
79          return getService().getPollsQuestion(questionId);
80      }
81  
82      public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
83          int start, int end) throws com.liferay.portal.SystemException {
84          return getService().getPollsQuestions(start, end);
85      }
86  
87      public static int getPollsQuestionsCount()
88          throws com.liferay.portal.SystemException {
89          return getService().getPollsQuestionsCount();
90      }
91  
92      public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
93          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
94          throws com.liferay.portal.SystemException {
95          return getService().updatePollsQuestion(pollsQuestion);
96      }
97  
98      public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
99          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
100         boolean merge) throws com.liferay.portal.SystemException {
101         return getService().updatePollsQuestion(pollsQuestion, merge);
102     }
103 
104     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
105         long userId, long plid, java.lang.String title,
106         java.lang.String description, int expirationDateMonth,
107         int expirationDateDay, int expirationDateYear, int expirationDateHour,
108         int expirationDateMinute, boolean neverExpire,
109         boolean addCommunityPermissions, boolean addGuestPermissions)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException {
112         return getService()
113                    .addQuestion(userId, plid, title, description,
114             expirationDateMonth, expirationDateDay, expirationDateYear,
115             expirationDateHour, expirationDateMinute, neverExpire,
116             addCommunityPermissions, addGuestPermissions);
117     }
118 
119     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
120         long userId, long plid, java.lang.String title,
121         java.lang.String description, int expirationDateMonth,
122         int expirationDateDay, int expirationDateYear, int expirationDateHour,
123         int expirationDateMinute, boolean neverExpire,
124         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
125         boolean addCommunityPermissions, boolean addGuestPermissions)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         return getService()
129                    .addQuestion(userId, plid, title, description,
130             expirationDateMonth, expirationDateDay, expirationDateYear,
131             expirationDateHour, expirationDateMinute, neverExpire, choices,
132             addCommunityPermissions, addGuestPermissions);
133     }
134 
135     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
136         long userId, long plid, java.lang.String title,
137         java.lang.String description, int expirationDateMonth,
138         int expirationDateDay, int expirationDateYear, int expirationDateHour,
139         int expirationDateMinute, boolean neverExpire,
140         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
141         java.lang.String[] communityPermissions,
142         java.lang.String[] guestPermissions)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         return getService()
146                    .addQuestion(userId, plid, title, description,
147             expirationDateMonth, expirationDateDay, expirationDateYear,
148             expirationDateHour, expirationDateMinute, neverExpire, choices,
149             communityPermissions, guestPermissions);
150     }
151 
152     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
153         java.lang.String uuid, long userId, long plid, java.lang.String title,
154         java.lang.String description, int expirationDateMonth,
155         int expirationDateDay, int expirationDateYear, int expirationDateHour,
156         int expirationDateMinute, boolean neverExpire,
157         boolean addCommunityPermissions, boolean addGuestPermissions)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException {
160         return getService()
161                    .addQuestion(uuid, userId, plid, title, description,
162             expirationDateMonth, expirationDateDay, expirationDateYear,
163             expirationDateHour, expirationDateMinute, neverExpire,
164             addCommunityPermissions, addGuestPermissions);
165     }
166 
167     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
168         java.lang.String uuid, long userId, long plid, java.lang.String title,
169         java.lang.String description, int expirationDateMonth,
170         int expirationDateDay, int expirationDateYear, int expirationDateHour,
171         int expirationDateMinute, boolean neverExpire,
172         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
173         java.lang.Boolean addCommunityPermissions,
174         java.lang.Boolean addGuestPermissions,
175         java.lang.String[] communityPermissions,
176         java.lang.String[] guestPermissions)
177         throws com.liferay.portal.PortalException,
178             com.liferay.portal.SystemException {
179         return getService()
180                    .addQuestion(uuid, userId, plid, title, description,
181             expirationDateMonth, expirationDateDay, expirationDateYear,
182             expirationDateHour, expirationDateMinute, neverExpire, choices,
183             addCommunityPermissions, addGuestPermissions, communityPermissions,
184             guestPermissions);
185     }
186 
187     public static void addQuestionResources(long questionId,
188         boolean addCommunityPermissions, boolean addGuestPermissions)
189         throws com.liferay.portal.PortalException,
190             com.liferay.portal.SystemException {
191         getService()
192             .addQuestionResources(questionId, addCommunityPermissions,
193             addGuestPermissions);
194     }
195 
196     public static void addQuestionResources(long questionId,
197         java.lang.String[] communityPermissions,
198         java.lang.String[] guestPermissions)
199         throws com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException {
201         getService()
202             .addQuestionResources(questionId, communityPermissions,
203             guestPermissions);
204     }
205 
206     public static void addQuestionResources(
207         com.liferay.portlet.polls.model.PollsQuestion question,
208         boolean addCommunityPermissions, boolean addGuestPermissions)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException {
211         getService()
212             .addQuestionResources(question, addCommunityPermissions,
213             addGuestPermissions);
214     }
215 
216     public static void addQuestionResources(
217         com.liferay.portlet.polls.model.PollsQuestion question,
218         java.lang.String[] communityPermissions,
219         java.lang.String[] guestPermissions)
220         throws com.liferay.portal.PortalException,
221             com.liferay.portal.SystemException {
222         getService()
223             .addQuestionResources(question, communityPermissions,
224             guestPermissions);
225     }
226 
227     public static void deleteQuestion(long questionId)
228         throws com.liferay.portal.PortalException,
229             com.liferay.portal.SystemException {
230         getService().deleteQuestion(questionId);
231     }
232 
233     public static void deleteQuestion(
234         com.liferay.portlet.polls.model.PollsQuestion question)
235         throws com.liferay.portal.PortalException,
236             com.liferay.portal.SystemException {
237         getService().deleteQuestion(question);
238     }
239 
240     public static void deleteQuestions(long groupId)
241         throws com.liferay.portal.PortalException,
242             com.liferay.portal.SystemException {
243         getService().deleteQuestions(groupId);
244     }
245 
246     public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
247         long questionId)
248         throws com.liferay.portal.PortalException,
249             com.liferay.portal.SystemException {
250         return getService().getQuestion(questionId);
251     }
252 
253     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
254         long groupId) throws com.liferay.portal.SystemException {
255         return getService().getQuestions(groupId);
256     }
257 
258     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
259         long groupId, int start, int end)
260         throws com.liferay.portal.SystemException {
261         return getService().getQuestions(groupId, start, end);
262     }
263 
264     public static int getQuestionsCount(long groupId)
265         throws com.liferay.portal.SystemException {
266         return getService().getQuestionsCount(groupId);
267     }
268 
269     public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
270         long userId, long questionId, java.lang.String title,
271         java.lang.String description, int expirationDateMonth,
272         int expirationDateDay, int expirationDateYear, int expirationDateHour,
273         int expirationDateMinute, boolean neverExpire)
274         throws com.liferay.portal.PortalException,
275             com.liferay.portal.SystemException {
276         return getService()
277                    .updateQuestion(userId, questionId, title, description,
278             expirationDateMonth, expirationDateDay, expirationDateYear,
279             expirationDateHour, expirationDateMinute, neverExpire);
280     }
281 
282     public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
283         long userId, long questionId, java.lang.String title,
284         java.lang.String description, int expirationDateMonth,
285         int expirationDateDay, int expirationDateYear, int expirationDateHour,
286         int expirationDateMinute, boolean neverExpire,
287         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices)
288         throws com.liferay.portal.PortalException,
289             com.liferay.portal.SystemException {
290         return getService()
291                    .updateQuestion(userId, questionId, title, description,
292             expirationDateMonth, expirationDateDay, expirationDateYear,
293             expirationDateHour, expirationDateMinute, neverExpire, choices);
294     }
295 
296     public static PollsQuestionLocalService getService() {
297         if (_service == null) {
298             _service = (PollsQuestionLocalService)PortalBeanLocatorUtil.locate(PollsQuestionLocalService.class.getName());
299         }
300 
301         return _service;
302     }
303 
304     public void setService(PollsQuestionLocalService service) {
305         _service = service;
306     }
307 
308     private static PollsQuestionLocalService _service;
309 }