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 pollsQuestion)
56 throws com.liferay.portal.SystemException {
57 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
58
59 return pollsQuestionLocalService.addPollsQuestion(pollsQuestion);
60 }
61
62 public static void deletePollsQuestion(long questionId)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException {
65 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
66
67 pollsQuestionLocalService.deletePollsQuestion(questionId);
68 }
69
70 public static void deletePollsQuestion(
71 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
72 throws com.liferay.portal.PortalException,
73 com.liferay.portal.SystemException {
74 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
75
76 pollsQuestionLocalService.deletePollsQuestion(pollsQuestion);
77 }
78
79 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> dynamicQuery(
80 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
81 throws com.liferay.portal.SystemException {
82 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
83
84 return pollsQuestionLocalService.dynamicQuery(queryInitializer);
85 }
86
87 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> dynamicQuery(
88 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
89 int begin, int end) throws com.liferay.portal.SystemException {
90 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
91
92 return pollsQuestionLocalService.dynamicQuery(queryInitializer, begin,
93 end);
94 }
95
96 public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
97 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
98 throws com.liferay.portal.SystemException {
99 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
100
101 return pollsQuestionLocalService.updatePollsQuestion(pollsQuestion);
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 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
113
114 return pollsQuestionLocalService.addQuestion(userId, plid, title,
115 description, expirationDateMonth, expirationDateDay,
116 expirationDateYear, expirationDateHour, expirationDateMinute,
117 neverExpire, addCommunityPermissions, addGuestPermissions);
118 }
119
120 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
121 java.lang.String uuid, long userId, long plid, java.lang.String title,
122 java.lang.String description, int expirationDateMonth,
123 int expirationDateDay, int expirationDateYear, int expirationDateHour,
124 int expirationDateMinute, boolean neverExpire,
125 boolean addCommunityPermissions, boolean addGuestPermissions)
126 throws com.liferay.portal.PortalException,
127 com.liferay.portal.SystemException {
128 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
129
130 return pollsQuestionLocalService.addQuestion(uuid, userId, plid, title,
131 description, expirationDateMonth, expirationDateDay,
132 expirationDateYear, expirationDateHour, expirationDateMinute,
133 neverExpire, addCommunityPermissions, addGuestPermissions);
134 }
135
136 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
137 long userId, long plid, java.lang.String title,
138 java.lang.String description, int expirationDateMonth,
139 int expirationDateDay, int expirationDateYear, int expirationDateHour,
140 int expirationDateMinute, boolean neverExpire,
141 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
142 boolean addCommunityPermissions, boolean addGuestPermissions)
143 throws com.liferay.portal.PortalException,
144 com.liferay.portal.SystemException {
145 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
146
147 return pollsQuestionLocalService.addQuestion(userId, plid, title,
148 description, expirationDateMonth, expirationDateDay,
149 expirationDateYear, expirationDateHour, expirationDateMinute,
150 neverExpire, choices, addCommunityPermissions, addGuestPermissions);
151 }
152
153 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
154 long userId, long plid, java.lang.String title,
155 java.lang.String description, int expirationDateMonth,
156 int expirationDateDay, int expirationDateYear, int expirationDateHour,
157 int expirationDateMinute, boolean neverExpire,
158 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
159 java.lang.String[] communityPermissions,
160 java.lang.String[] guestPermissions)
161 throws com.liferay.portal.PortalException,
162 com.liferay.portal.SystemException {
163 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
164
165 return pollsQuestionLocalService.addQuestion(userId, plid, title,
166 description, expirationDateMonth, expirationDateDay,
167 expirationDateYear, expirationDateHour, expirationDateMinute,
168 neverExpire, choices, communityPermissions, guestPermissions);
169 }
170
171 public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
172 java.lang.String uuid, long userId, long plid, java.lang.String title,
173 java.lang.String description, int expirationDateMonth,
174 int expirationDateDay, int expirationDateYear, int expirationDateHour,
175 int expirationDateMinute, boolean neverExpire,
176 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
177 java.lang.Boolean addCommunityPermissions,
178 java.lang.Boolean addGuestPermissions,
179 java.lang.String[] communityPermissions,
180 java.lang.String[] guestPermissions)
181 throws com.liferay.portal.PortalException,
182 com.liferay.portal.SystemException {
183 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
184
185 return pollsQuestionLocalService.addQuestion(uuid, userId, plid, title,
186 description, expirationDateMonth, expirationDateDay,
187 expirationDateYear, expirationDateHour, expirationDateMinute,
188 neverExpire, choices, addCommunityPermissions, addGuestPermissions,
189 communityPermissions, guestPermissions);
190 }
191
192 public static void addQuestionResources(long questionId,
193 boolean addCommunityPermissions, boolean addGuestPermissions)
194 throws com.liferay.portal.PortalException,
195 com.liferay.portal.SystemException {
196 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
197
198 pollsQuestionLocalService.addQuestionResources(questionId,
199 addCommunityPermissions, addGuestPermissions);
200 }
201
202 public static void addQuestionResources(
203 com.liferay.portlet.polls.model.PollsQuestion question,
204 boolean addCommunityPermissions, boolean addGuestPermissions)
205 throws com.liferay.portal.PortalException,
206 com.liferay.portal.SystemException {
207 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
208
209 pollsQuestionLocalService.addQuestionResources(question,
210 addCommunityPermissions, addGuestPermissions);
211 }
212
213 public static void addQuestionResources(long questionId,
214 java.lang.String[] communityPermissions,
215 java.lang.String[] guestPermissions)
216 throws com.liferay.portal.PortalException,
217 com.liferay.portal.SystemException {
218 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
219
220 pollsQuestionLocalService.addQuestionResources(questionId,
221 communityPermissions, guestPermissions);
222 }
223
224 public static void addQuestionResources(
225 com.liferay.portlet.polls.model.PollsQuestion question,
226 java.lang.String[] communityPermissions,
227 java.lang.String[] guestPermissions)
228 throws com.liferay.portal.PortalException,
229 com.liferay.portal.SystemException {
230 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
231
232 pollsQuestionLocalService.addQuestionResources(question,
233 communityPermissions, guestPermissions);
234 }
235
236 public static void deleteQuestion(long questionId)
237 throws com.liferay.portal.PortalException,
238 com.liferay.portal.SystemException {
239 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
240
241 pollsQuestionLocalService.deleteQuestion(questionId);
242 }
243
244 public static void deleteQuestion(
245 com.liferay.portlet.polls.model.PollsQuestion question)
246 throws com.liferay.portal.PortalException,
247 com.liferay.portal.SystemException {
248 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
249
250 pollsQuestionLocalService.deleteQuestion(question);
251 }
252
253 public static void deleteQuestions(long groupId)
254 throws com.liferay.portal.PortalException,
255 com.liferay.portal.SystemException {
256 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
257
258 pollsQuestionLocalService.deleteQuestions(groupId);
259 }
260
261 public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
262 long questionId)
263 throws com.liferay.portal.PortalException,
264 com.liferay.portal.SystemException {
265 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
266
267 return pollsQuestionLocalService.getQuestion(questionId);
268 }
269
270 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
271 long groupId) throws com.liferay.portal.SystemException {
272 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
273
274 return pollsQuestionLocalService.getQuestions(groupId);
275 }
276
277 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
278 long groupId, int begin, int end)
279 throws com.liferay.portal.SystemException {
280 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
281
282 return pollsQuestionLocalService.getQuestions(groupId, begin, end);
283 }
284
285 public static int getQuestionsCount(long groupId)
286 throws com.liferay.portal.SystemException {
287 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
288
289 return pollsQuestionLocalService.getQuestionsCount(groupId);
290 }
291
292 public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
293 long userId, long questionId, java.lang.String title,
294 java.lang.String description, int expirationDateMonth,
295 int expirationDateDay, int expirationDateYear, int expirationDateHour,
296 int expirationDateMinute, boolean neverExpire)
297 throws com.liferay.portal.PortalException,
298 com.liferay.portal.SystemException {
299 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
300
301 return pollsQuestionLocalService.updateQuestion(userId, questionId,
302 title, description, expirationDateMonth, expirationDateDay,
303 expirationDateYear, expirationDateHour, expirationDateMinute,
304 neverExpire);
305 }
306
307 public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
308 long userId, long questionId, java.lang.String title,
309 java.lang.String description, int expirationDateMonth,
310 int expirationDateDay, int expirationDateYear, int expirationDateHour,
311 int expirationDateMinute, boolean neverExpire,
312 java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices)
313 throws com.liferay.portal.PortalException,
314 com.liferay.portal.SystemException {
315 PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory.getService();
316
317 return pollsQuestionLocalService.updateQuestion(userId, questionId,
318 title, description, expirationDateMonth, expirationDateDay,
319 expirationDateYear, expirationDateHour, expirationDateMinute,
320 neverExpire, choices);
321 }
322 }