1
22
23 package com.liferay.portlet.polls.service;
24
25
26
53 public class PollsQuestionLocalServiceUtil {
54 public static com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
55 com.liferay.portlet.polls.model.PollsQuestion model)
56 throws com.liferay.portal.SystemException {
57 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
58
59 return pollsQuestionLocalService.addPollsQuestion(model);
60 }
61
62 public static java.util.List dynamicQuery(
63 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
64 throws com.liferay.portal.SystemException {
65 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
66
67 return pollsQuestionLocalService.dynamicQuery(queryInitializer);
68 }
69
70 public static java.util.List dynamicQuery(
71 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
72 int begin, int end) throws com.liferay.portal.SystemException {
73 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
74
75 return pollsQuestionLocalService.dynamicQuery(queryInitializer, begin,
76 end);
77 }
78
79 public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
80 com.liferay.portlet.polls.model.PollsQuestion model)
81 throws com.liferay.portal.SystemException {
82 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
83
84 return pollsQuestionLocalService.updatePollsQuestion(model);
85 }
86
87 public static com.liferay.portlet.polls.service.persistence.PollsChoicePersistence getPollsChoicePersistence() {
88 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
89
90 return pollsQuestionLocalService.getPollsChoicePersistence();
91 }
92
93 public static void setPollsChoicePersistence(
94 com.liferay.portlet.polls.service.persistence.PollsChoicePersistence pollsChoicePersistence) {
95 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
96
97 pollsQuestionLocalService.setPollsChoicePersistence(pollsChoicePersistence);
98 }
99
100 public static com.liferay.portlet.polls.service.persistence.PollsChoiceFinder getPollsChoiceFinder() {
101 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
102
103 return pollsQuestionLocalService.getPollsChoiceFinder();
104 }
105
106 public static void setPollsChoiceFinder(
107 com.liferay.portlet.polls.service.persistence.PollsChoiceFinder pollsChoiceFinder) {
108 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
109
110 pollsQuestionLocalService.setPollsChoiceFinder(pollsChoiceFinder);
111 }
112
113 public static com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence getPollsQuestionPersistence() {
114 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
115
116 return pollsQuestionLocalService.getPollsQuestionPersistence();
117 }
118
119 public static void setPollsQuestionPersistence(
120 com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence pollsQuestionPersistence) {
121 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
122
123 pollsQuestionLocalService.setPollsQuestionPersistence(pollsQuestionPersistence);
124 }
125
126 public static com.liferay.portlet.polls.service.persistence.PollsVotePersistence getPollsVotePersistence() {
127 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
128
129 return pollsQuestionLocalService.getPollsVotePersistence();
130 }
131
132 public static void setPollsVotePersistence(
133 com.liferay.portlet.polls.service.persistence.PollsVotePersistence pollsVotePersistence) {
134 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
135
136 pollsQuestionLocalService.setPollsVotePersistence(pollsVotePersistence);
137 }
138
139 public static com.liferay.portal.service.persistence.ResourcePersistence getResourcePersistence() {
140 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
141
142 return pollsQuestionLocalService.getResourcePersistence();
143 }
144
145 public static void setResourcePersistence(
146 com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence) {
147 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
148
149 pollsQuestionLocalService.setResourcePersistence(resourcePersistence);
150 }
151
152 public static com.liferay.portal.service.persistence.ResourceFinder getResourceFinder() {
153 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
154
155 return pollsQuestionLocalService.getResourceFinder();
156 }
157
158 public static void setResourceFinder(
159 com.liferay.portal.service.persistence.ResourceFinder resourceFinder) {
160 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
161
162 pollsQuestionLocalService.setResourceFinder(resourceFinder);
163 }
164
165 public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
166 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
167
168 return pollsQuestionLocalService.getUserPersistence();
169 }
170
171 public static void setUserPersistence(
172 com.liferay.portal.service.persistence.UserPersistence userPersistence) {
173 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
174
175 pollsQuestionLocalService.setUserPersistence(userPersistence);
176 }
177
178 public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
179 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
180
181 return pollsQuestionLocalService.getUserFinder();
182 }
183
184 public static void setUserFinder(
185 com.liferay.portal.service.persistence.UserFinder userFinder) {
186 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
187
188 pollsQuestionLocalService.setUserFinder(userFinder);
189 }
190
191 public static void afterPropertiesSet() {
192 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
193
194 pollsQuestionLocalService.afterPropertiesSet();
195 }
196
197 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
198 long userId, long plid, java.lang.String title,
199 java.lang.String description, int expirationDateMonth,
200 int expirationDateDay, int expirationDateYear, int expirationDateHour,
201 int expirationDateMinute, boolean neverExpire,
202 boolean addCommunityPermissions, boolean addGuestPermissions)
203 throws com.liferay.portal.PortalException,
204 com.liferay.portal.SystemException {
205 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
206
207 return pollsQuestionLocalService.addQuestion(userId, plid, title,
208 description, expirationDateMonth, expirationDateDay,
209 expirationDateYear, expirationDateHour, expirationDateMinute,
210 neverExpire, addCommunityPermissions, addGuestPermissions);
211 }
212
213 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
214 java.lang.String uuid, long userId, long plid, java.lang.String title,
215 java.lang.String description, int expirationDateMonth,
216 int expirationDateDay, int expirationDateYear, int expirationDateHour,
217 int expirationDateMinute, boolean neverExpire,
218 boolean addCommunityPermissions, boolean addGuestPermissions)
219 throws com.liferay.portal.PortalException,
220 com.liferay.portal.SystemException {
221 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
222
223 return pollsQuestionLocalService.addQuestion(uuid, userId, plid, title,
224 description, expirationDateMonth, expirationDateDay,
225 expirationDateYear, expirationDateHour, expirationDateMinute,
226 neverExpire, addCommunityPermissions, addGuestPermissions);
227 }
228
229 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
230 long userId, long plid, java.lang.String title,
231 java.lang.String description, int expirationDateMonth,
232 int expirationDateDay, int expirationDateYear, int expirationDateHour,
233 int expirationDateMinute, boolean neverExpire, java.util.List choices,
234 boolean addCommunityPermissions, boolean addGuestPermissions)
235 throws com.liferay.portal.PortalException,
236 com.liferay.portal.SystemException {
237 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
238
239 return pollsQuestionLocalService.addQuestion(userId, plid, title,
240 description, expirationDateMonth, expirationDateDay,
241 expirationDateYear, expirationDateHour, expirationDateMinute,
242 neverExpire, choices, addCommunityPermissions, addGuestPermissions);
243 }
244
245 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
246 long userId, long plid, java.lang.String title,
247 java.lang.String description, int expirationDateMonth,
248 int expirationDateDay, int expirationDateYear, int expirationDateHour,
249 int expirationDateMinute, boolean neverExpire, java.util.List choices,
250 java.lang.String[] communityPermissions,
251 java.lang.String[] guestPermissions)
252 throws com.liferay.portal.PortalException,
253 com.liferay.portal.SystemException {
254 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
255
256 return pollsQuestionLocalService.addQuestion(userId, plid, title,
257 description, expirationDateMonth, expirationDateDay,
258 expirationDateYear, expirationDateHour, expirationDateMinute,
259 neverExpire, choices, communityPermissions, guestPermissions);
260 }
261
262 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
263 java.lang.String uuid, long userId, long plid, java.lang.String title,
264 java.lang.String description, int expirationDateMonth,
265 int expirationDateDay, int expirationDateYear, int expirationDateHour,
266 int expirationDateMinute, boolean neverExpire, java.util.List choices,
267 java.lang.Boolean addCommunityPermissions,
268 java.lang.Boolean addGuestPermissions,
269 java.lang.String[] communityPermissions,
270 java.lang.String[] guestPermissions)
271 throws com.liferay.portal.PortalException,
272 com.liferay.portal.SystemException {
273 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
274
275 return pollsQuestionLocalService.addQuestion(uuid, userId, plid, title,
276 description, expirationDateMonth, expirationDateDay,
277 expirationDateYear, expirationDateHour, expirationDateMinute,
278 neverExpire, choices, addCommunityPermissions, addGuestPermissions,
279 communityPermissions, guestPermissions);
280 }
281
282 public static void addQuestionResources(long questionId,
283 boolean addCommunityPermissions, boolean addGuestPermissions)
284 throws com.liferay.portal.PortalException,
285 com.liferay.portal.SystemException {
286 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
287
288 pollsQuestionLocalService.addQuestionResources(questionId,
289 addCommunityPermissions, addGuestPermissions);
290 }
291
292 public static void addQuestionResources(
293 com.liferay.portlet.polls.model.PollsQuestion question,
294 boolean addCommunityPermissions, boolean addGuestPermissions)
295 throws com.liferay.portal.PortalException,
296 com.liferay.portal.SystemException {
297 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
298
299 pollsQuestionLocalService.addQuestionResources(question,
300 addCommunityPermissions, addGuestPermissions);
301 }
302
303 public static void addQuestionResources(long questionId,
304 java.lang.String[] communityPermissions,
305 java.lang.String[] guestPermissions)
306 throws com.liferay.portal.PortalException,
307 com.liferay.portal.SystemException {
308 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
309
310 pollsQuestionLocalService.addQuestionResources(questionId,
311 communityPermissions, guestPermissions);
312 }
313
314 public static void addQuestionResources(
315 com.liferay.portlet.polls.model.PollsQuestion question,
316 java.lang.String[] communityPermissions,
317 java.lang.String[] guestPermissions)
318 throws com.liferay.portal.PortalException,
319 com.liferay.portal.SystemException {
320 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
321
322 pollsQuestionLocalService.addQuestionResources(question,
323 communityPermissions, guestPermissions);
324 }
325
326 public static void deleteQuestion(long questionId)
327 throws com.liferay.portal.PortalException,
328 com.liferay.portal.SystemException {
329 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
330
331 pollsQuestionLocalService.deleteQuestion(questionId);
332 }
333
334 public static void deleteQuestion(
335 com.liferay.portlet.polls.model.PollsQuestion question)
336 throws com.liferay.portal.PortalException,
337 com.liferay.portal.SystemException {
338 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
339
340 pollsQuestionLocalService.deleteQuestion(question);
341 }
342
343 public static void deleteQuestions(long groupId)
344 throws com.liferay.portal.PortalException,
345 com.liferay.portal.SystemException {
346 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
347
348 pollsQuestionLocalService.deleteQuestions(groupId);
349 }
350
351 public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
352 long questionId)
353 throws com.liferay.portal.PortalException,
354 com.liferay.portal.SystemException {
355 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
356
357 return pollsQuestionLocalService.getQuestion(questionId);
358 }
359
360 public static java.util.List getQuestions(long groupId)
361 throws com.liferay.portal.SystemException {
362 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
363
364 return pollsQuestionLocalService.getQuestions(groupId);
365 }
366
367 public static java.util.List getQuestions(long groupId, int begin, int end)
368 throws com.liferay.portal.SystemException {
369 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
370
371 return pollsQuestionLocalService.getQuestions(groupId, begin, end);
372 }
373
374 public static int getQuestionsCount(long groupId)
375 throws com.liferay.portal.SystemException {
376 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
377
378 return pollsQuestionLocalService.getQuestionsCount(groupId);
379 }
380
381 public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
382 long userId, long questionId, java.lang.String title,
383 java.lang.String description, int expirationDateMonth,
384 int expirationDateDay, int expirationDateYear, int expirationDateHour,
385 int expirationDateMinute, boolean neverExpire)
386 throws com.liferay.portal.PortalException,
387 com.liferay.portal.SystemException {
388 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
389
390 return pollsQuestionLocalService.updateQuestion(userId, questionId,
391 title, description, expirationDateMonth, expirationDateDay,
392 expirationDateYear, expirationDateHour, expirationDateMinute,
393 neverExpire);
394 }
395
396 public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
397 long userId, long questionId, java.lang.String title,
398 java.lang.String description, int expirationDateMonth,
399 int expirationDateDay, int expirationDateYear, int expirationDateHour,
400 int expirationDateMinute, boolean neverExpire, java.util.List choices)
401 throws com.liferay.portal.PortalException,
402 com.liferay.portal.SystemException {
403 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
404
405 return pollsQuestionLocalService.updateQuestion(userId, questionId,
406 title, description, expirationDateMonth, expirationDateDay,
407 expirationDateYear, expirationDateHour, expirationDateMinute,
408 neverExpire, choices);
409 }
410 }