1
14
15 package com.liferay.portlet.polls.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
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 public static java.util.List<Object> dynamicQuery(
64 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65 throws com.liferay.portal.kernel.exception.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.kernel.exception.SystemException {
72 return getService().dynamicQuery(dynamicQuery, start, end);
73 }
74
75 public static java.util.List<Object> dynamicQuery(
76 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77 int end,
78 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79 throws com.liferay.portal.kernel.exception.SystemException {
80 return getService()
81 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82 }
83
84 public static int dynamicQueryCount(
85 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86 throws com.liferay.portal.kernel.exception.SystemException {
87 return getService().dynamicQueryCount(dynamicQuery);
88 }
89
90 public static com.liferay.portlet.polls.model.PollsQuestion getPollsQuestion(
91 long questionId)
92 throws com.liferay.portal.kernel.exception.PortalException,
93 com.liferay.portal.kernel.exception.SystemException {
94 return getService().getPollsQuestion(questionId);
95 }
96
97 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
98 int start, int end)
99 throws com.liferay.portal.kernel.exception.SystemException {
100 return getService().getPollsQuestions(start, end);
101 }
102
103 public static int getPollsQuestionsCount()
104 throws com.liferay.portal.kernel.exception.SystemException {
105 return getService().getPollsQuestionsCount();
106 }
107
108 public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
109 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
110 throws com.liferay.portal.kernel.exception.SystemException {
111 return getService().updatePollsQuestion(pollsQuestion);
112 }
113
114 public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
115 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
116 boolean merge)
117 throws com.liferay.portal.kernel.exception.SystemException {
118 return getService().updatePollsQuestion(pollsQuestion, merge);
119 }
120
121 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
122 java.lang.String uuid, long userId,
123 java.util.Map<java.util.Locale, String> titleMap,
124 java.util.Map<java.util.Locale, String> descriptionMap,
125 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
126 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
127 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
128 com.liferay.portal.service.ServiceContext serviceContext)
129 throws com.liferay.portal.kernel.exception.PortalException,
130 com.liferay.portal.kernel.exception.SystemException {
131 return getService()
132 .addQuestion(uuid, userId, titleMap, descriptionMap,
133 expirationDateMonth, expirationDateDay, expirationDateYear,
134 expirationDateHour, expirationDateMinute, neverExpire, choices,
135 serviceContext);
136 }
137
138 public static void addQuestionResources(long questionId,
139 boolean addCommunityPermissions, boolean addGuestPermissions)
140 throws com.liferay.portal.kernel.exception.PortalException,
141 com.liferay.portal.kernel.exception.SystemException {
142 getService()
143 .addQuestionResources(questionId, addCommunityPermissions,
144 addGuestPermissions);
145 }
146
147 public static void addQuestionResources(long questionId,
148 java.lang.String[] communityPermissions,
149 java.lang.String[] guestPermissions)
150 throws com.liferay.portal.kernel.exception.PortalException,
151 com.liferay.portal.kernel.exception.SystemException {
152 getService()
153 .addQuestionResources(questionId, communityPermissions,
154 guestPermissions);
155 }
156
157 public static void addQuestionResources(
158 com.liferay.portlet.polls.model.PollsQuestion question,
159 boolean addCommunityPermissions, boolean addGuestPermissions)
160 throws com.liferay.portal.kernel.exception.PortalException,
161 com.liferay.portal.kernel.exception.SystemException {
162 getService()
163 .addQuestionResources(question, addCommunityPermissions,
164 addGuestPermissions);
165 }
166
167 public static void addQuestionResources(
168 com.liferay.portlet.polls.model.PollsQuestion question,
169 java.lang.String[] communityPermissions,
170 java.lang.String[] guestPermissions)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 getService()
174 .addQuestionResources(question, communityPermissions,
175 guestPermissions);
176 }
177
178 public static void deleteQuestion(long questionId)
179 throws com.liferay.portal.kernel.exception.PortalException,
180 com.liferay.portal.kernel.exception.SystemException {
181 getService().deleteQuestion(questionId);
182 }
183
184 public static void deleteQuestion(
185 com.liferay.portlet.polls.model.PollsQuestion question)
186 throws com.liferay.portal.kernel.exception.PortalException,
187 com.liferay.portal.kernel.exception.SystemException {
188 getService().deleteQuestion(question);
189 }
190
191 public static void deleteQuestions(long groupId)
192 throws com.liferay.portal.kernel.exception.PortalException,
193 com.liferay.portal.kernel.exception.SystemException {
194 getService().deleteQuestions(groupId);
195 }
196
197 public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
198 long questionId)
199 throws com.liferay.portal.kernel.exception.PortalException,
200 com.liferay.portal.kernel.exception.SystemException {
201 return getService().getQuestion(questionId);
202 }
203
204 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
205 long groupId)
206 throws com.liferay.portal.kernel.exception.SystemException {
207 return getService().getQuestions(groupId);
208 }
209
210 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
211 long groupId, int start, int end)
212 throws com.liferay.portal.kernel.exception.SystemException {
213 return getService().getQuestions(groupId, start, end);
214 }
215
216 public static int getQuestionsCount(long groupId)
217 throws com.liferay.portal.kernel.exception.SystemException {
218 return getService().getQuestionsCount(groupId);
219 }
220
221 public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
222 long userId, long questionId,
223 java.util.Map<java.util.Locale, String> titleMap,
224 java.util.Map<java.util.Locale, String> descriptionMap,
225 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
226 int expirationDateHour, int expirationDateMinute, boolean neverExpire)
227 throws com.liferay.portal.kernel.exception.PortalException,
228 com.liferay.portal.kernel.exception.SystemException {
229 return getService()
230 .updateQuestion(userId, questionId, titleMap,
231 descriptionMap, expirationDateMonth, expirationDateDay,
232 expirationDateYear, expirationDateHour, expirationDateMinute,
233 neverExpire);
234 }
235
236 public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
237 long userId, long questionId,
238 java.util.Map<java.util.Locale, String> titleMap,
239 java.util.Map<java.util.Locale, String> descriptionMap,
240 int expirationDateMonth, int expirationDateDay, int expirationDateYear,
241 int expirationDateHour, int expirationDateMinute, boolean neverExpire,
242 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
243 com.liferay.portal.service.ServiceContext serviceContext)
244 throws com.liferay.portal.kernel.exception.PortalException,
245 com.liferay.portal.kernel.exception.SystemException {
246 return getService()
247 .updateQuestion(userId, questionId, titleMap,
248 descriptionMap, expirationDateMonth, expirationDateDay,
249 expirationDateYear, expirationDateHour, expirationDateMinute,
250 neverExpire, choices, serviceContext);
251 }
252
253 public static PollsQuestionLocalService getService() {
254 if (_service == null) {
255 _service = (PollsQuestionLocalService)PortalBeanLocatorUtil.locate(PollsQuestionLocalService.class.getName());
256 }
257
258 return _service;
259 }
260
261 public void setService(PollsQuestionLocalService service) {
262 _service = service;
263 }
264
265 private static PollsQuestionLocalService _service;
266 }