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
034 public class PollsQuestionServiceUtil {
035
040
041
046 public static java.lang.String getBeanIdentifier() {
047 return getService().getBeanIdentifier();
048 }
049
050
055 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
056 getService().setBeanIdentifier(beanIdentifier);
057 }
058
059 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
060 java.util.Map<java.util.Locale, java.lang.String> titleMap,
061 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
062 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
063 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
064 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
065 com.liferay.portal.service.ServiceContext serviceContext)
066 throws com.liferay.portal.kernel.exception.PortalException,
067 com.liferay.portal.kernel.exception.SystemException {
068 return getService()
069 .addQuestion(titleMap, descriptionMap, expirationDateMonth,
070 expirationDateDay, expirationDateYear, expirationDateHour,
071 expirationDateMinute, neverExpire, choices, serviceContext);
072 }
073
074 public static void deleteQuestion(long questionId)
075 throws com.liferay.portal.kernel.exception.PortalException,
076 com.liferay.portal.kernel.exception.SystemException {
077 getService().deleteQuestion(questionId);
078 }
079
080 public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
081 long questionId)
082 throws com.liferay.portal.kernel.exception.PortalException,
083 com.liferay.portal.kernel.exception.SystemException {
084 return getService().getQuestion(questionId);
085 }
086
087 public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
088 long questionId,
089 java.util.Map<java.util.Locale, java.lang.String> titleMap,
090 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
091 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
092 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
093 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
094 com.liferay.portal.service.ServiceContext serviceContext)
095 throws com.liferay.portal.kernel.exception.PortalException,
096 com.liferay.portal.kernel.exception.SystemException {
097 return getService()
098 .updateQuestion(questionId, titleMap, descriptionMap,
099 expirationDateMonth, expirationDateDay, expirationDateYear,
100 expirationDateHour, expirationDateMinute, neverExpire, choices,
101 serviceContext);
102 }
103
104 public static PollsQuestionService getService() {
105 if (_service == null) {
106 _service = (PollsQuestionService)PortalBeanLocatorUtil.locate(PollsQuestionService.class.getName());
107
108 ReferenceRegistry.registerReference(PollsQuestionServiceUtil.class,
109 "_service");
110 }
111
112 return _service;
113 }
114
115
118 public void setService(PollsQuestionService service) {
119 }
120
121 private static PollsQuestionService _service;
122 }