001
014
015 package com.liferay.portlet.polls.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
033 public class PollsQuestionLocalServiceUtil {
034
039
040
047 public static com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
048 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
049 throws com.liferay.portal.kernel.exception.SystemException {
050 return getService().addPollsQuestion(pollsQuestion);
051 }
052
053
059 public static com.liferay.portlet.polls.model.PollsQuestion createPollsQuestion(
060 long questionId) {
061 return getService().createPollsQuestion(questionId);
062 }
063
064
072 public static com.liferay.portlet.polls.model.PollsQuestion deletePollsQuestion(
073 long questionId)
074 throws com.liferay.portal.kernel.exception.PortalException,
075 com.liferay.portal.kernel.exception.SystemException {
076 return getService().deletePollsQuestion(questionId);
077 }
078
079
086 public static com.liferay.portlet.polls.model.PollsQuestion deletePollsQuestion(
087 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
088 throws com.liferay.portal.kernel.exception.SystemException {
089 return getService().deletePollsQuestion(pollsQuestion);
090 }
091
092 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
093 return getService().dynamicQuery();
094 }
095
096
103 @SuppressWarnings("rawtypes")
104 public static java.util.List dynamicQuery(
105 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
106 throws com.liferay.portal.kernel.exception.SystemException {
107 return getService().dynamicQuery(dynamicQuery);
108 }
109
110
123 @SuppressWarnings("rawtypes")
124 public static java.util.List dynamicQuery(
125 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
126 int end) throws com.liferay.portal.kernel.exception.SystemException {
127 return getService().dynamicQuery(dynamicQuery, start, end);
128 }
129
130
144 @SuppressWarnings("rawtypes")
145 public static java.util.List dynamicQuery(
146 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
147 int end,
148 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149 throws com.liferay.portal.kernel.exception.SystemException {
150 return getService()
151 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
152 }
153
154
161 public static long dynamicQueryCount(
162 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getService().dynamicQueryCount(dynamicQuery);
165 }
166
167 public static com.liferay.portlet.polls.model.PollsQuestion fetchPollsQuestion(
168 long questionId)
169 throws com.liferay.portal.kernel.exception.SystemException {
170 return getService().fetchPollsQuestion(questionId);
171 }
172
173
181 public static com.liferay.portlet.polls.model.PollsQuestion getPollsQuestion(
182 long questionId)
183 throws com.liferay.portal.kernel.exception.PortalException,
184 com.liferay.portal.kernel.exception.SystemException {
185 return getService().getPollsQuestion(questionId);
186 }
187
188 public static com.liferay.portal.model.PersistedModel getPersistedModel(
189 java.io.Serializable primaryKeyObj)
190 throws com.liferay.portal.kernel.exception.PortalException,
191 com.liferay.portal.kernel.exception.SystemException {
192 return getService().getPersistedModel(primaryKeyObj);
193 }
194
195
204 public static com.liferay.portlet.polls.model.PollsQuestion getPollsQuestionByUuidAndGroupId(
205 java.lang.String uuid, long groupId)
206 throws com.liferay.portal.kernel.exception.PortalException,
207 com.liferay.portal.kernel.exception.SystemException {
208 return getService().getPollsQuestionByUuidAndGroupId(uuid, groupId);
209 }
210
211
223 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
224 int start, int end)
225 throws com.liferay.portal.kernel.exception.SystemException {
226 return getService().getPollsQuestions(start, end);
227 }
228
229
235 public static int getPollsQuestionsCount()
236 throws com.liferay.portal.kernel.exception.SystemException {
237 return getService().getPollsQuestionsCount();
238 }
239
240
247 public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
248 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
249 throws com.liferay.portal.kernel.exception.SystemException {
250 return getService().updatePollsQuestion(pollsQuestion);
251 }
252
253
261 public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
262 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
263 boolean merge)
264 throws com.liferay.portal.kernel.exception.SystemException {
265 return getService().updatePollsQuestion(pollsQuestion, merge);
266 }
267
268
273 public static java.lang.String getBeanIdentifier() {
274 return getService().getBeanIdentifier();
275 }
276
277
282 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
283 getService().setBeanIdentifier(beanIdentifier);
284 }
285
286 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
287 long userId,
288 java.util.Map<java.util.Locale, java.lang.String> titleMap,
289 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
290 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
291 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
292 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
293 com.liferay.portal.service.ServiceContext serviceContext)
294 throws com.liferay.portal.kernel.exception.PortalException,
295 com.liferay.portal.kernel.exception.SystemException {
296 return getService()
297 .addQuestion(userId, titleMap, descriptionMap,
298 expirationDateMonth, expirationDateDay, expirationDateYear,
299 expirationDateHour, expirationDateMinute, neverExpire, choices,
300 serviceContext);
301 }
302
303 public static void addQuestionResources(long questionId,
304 boolean addGroupPermissions, boolean addGuestPermissions)
305 throws com.liferay.portal.kernel.exception.PortalException,
306 com.liferay.portal.kernel.exception.SystemException {
307 getService()
308 .addQuestionResources(questionId, addGroupPermissions,
309 addGuestPermissions);
310 }
311
312 public static void addQuestionResources(long questionId,
313 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
314 throws com.liferay.portal.kernel.exception.PortalException,
315 com.liferay.portal.kernel.exception.SystemException {
316 getService()
317 .addQuestionResources(questionId, groupPermissions, guestPermissions);
318 }
319
320 public static void addQuestionResources(
321 com.liferay.portlet.polls.model.PollsQuestion question,
322 boolean addGroupPermissions, boolean addGuestPermissions)
323 throws com.liferay.portal.kernel.exception.PortalException,
324 com.liferay.portal.kernel.exception.SystemException {
325 getService()
326 .addQuestionResources(question, addGroupPermissions,
327 addGuestPermissions);
328 }
329
330 public static void addQuestionResources(
331 com.liferay.portlet.polls.model.PollsQuestion question,
332 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
333 throws com.liferay.portal.kernel.exception.PortalException,
334 com.liferay.portal.kernel.exception.SystemException {
335 getService()
336 .addQuestionResources(question, groupPermissions, guestPermissions);
337 }
338
339 public static void deleteQuestion(long questionId)
340 throws com.liferay.portal.kernel.exception.PortalException,
341 com.liferay.portal.kernel.exception.SystemException {
342 getService().deleteQuestion(questionId);
343 }
344
345 public static void deleteQuestion(
346 com.liferay.portlet.polls.model.PollsQuestion question)
347 throws com.liferay.portal.kernel.exception.PortalException,
348 com.liferay.portal.kernel.exception.SystemException {
349 getService().deleteQuestion(question);
350 }
351
352 public static void deleteQuestions(long groupId)
353 throws com.liferay.portal.kernel.exception.PortalException,
354 com.liferay.portal.kernel.exception.SystemException {
355 getService().deleteQuestions(groupId);
356 }
357
358 public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
359 long questionId)
360 throws com.liferay.portal.kernel.exception.PortalException,
361 com.liferay.portal.kernel.exception.SystemException {
362 return getService().getQuestion(questionId);
363 }
364
365 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
366 long groupId)
367 throws com.liferay.portal.kernel.exception.SystemException {
368 return getService().getQuestions(groupId);
369 }
370
371 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
372 long groupId, int start, int end)
373 throws com.liferay.portal.kernel.exception.SystemException {
374 return getService().getQuestions(groupId, start, end);
375 }
376
377 public static int getQuestionsCount(long groupId)
378 throws com.liferay.portal.kernel.exception.SystemException {
379 return getService().getQuestionsCount(groupId);
380 }
381
382 public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
383 long userId, long questionId,
384 java.util.Map<java.util.Locale, java.lang.String> titleMap,
385 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
386 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
387 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
388 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
389 com.liferay.portal.service.ServiceContext serviceContext)
390 throws com.liferay.portal.kernel.exception.PortalException,
391 com.liferay.portal.kernel.exception.SystemException {
392 return getService()
393 .updateQuestion(userId, questionId, titleMap,
394 descriptionMap, expirationDateMonth, expirationDateDay,
395 expirationDateYear, expirationDateHour, expirationDateMinute,
396 neverExpire, choices, serviceContext);
397 }
398
399 public static PollsQuestionLocalService getService() {
400 if (_service == null) {
401 _service = (PollsQuestionLocalService)PortalBeanLocatorUtil.locate(PollsQuestionLocalService.class.getName());
402
403 ReferenceRegistry.registerReference(PollsQuestionLocalServiceUtil.class,
404 "_service");
405 }
406
407 return _service;
408 }
409
410
413 public void setService(PollsQuestionLocalService service) {
414 }
415
416 private static PollsQuestionLocalService _service;
417 }