001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.polls.service;
022:
023: /**
024: * <a href="PollsQuestionLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.polls.service.PollsQuestionLocalService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.polls.service.PollsQuestionLocalServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.polls.service.PollsQuestionLocalService
047: * @see com.liferay.portlet.polls.service.PollsQuestionLocalServiceFactory
048: *
049: */
050: public class PollsQuestionLocalServiceUtil {
051: public static com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
052: com.liferay.portlet.polls.model.PollsQuestion model)
053: throws com.liferay.portal.SystemException {
054: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
055: .getService();
056:
057: return pollsQuestionLocalService.addPollsQuestion(model);
058: }
059:
060: public static java.util.List dynamicQuery(
061: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
062: throws com.liferay.portal.SystemException {
063: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
064: .getService();
065:
066: return pollsQuestionLocalService.dynamicQuery(queryInitializer);
067: }
068:
069: public static java.util.List dynamicQuery(
070: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
071: int begin, int end)
072: throws com.liferay.portal.SystemException {
073: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
074: .getService();
075:
076: return pollsQuestionLocalService.dynamicQuery(queryInitializer,
077: begin, end);
078: }
079:
080: public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
081: com.liferay.portlet.polls.model.PollsQuestion model)
082: throws com.liferay.portal.SystemException {
083: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
084: .getService();
085:
086: return pollsQuestionLocalService.updatePollsQuestion(model);
087: }
088:
089: public static com.liferay.portlet.polls.service.persistence.PollsChoicePersistence getPollsChoicePersistence() {
090: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
091: .getService();
092:
093: return pollsQuestionLocalService.getPollsChoicePersistence();
094: }
095:
096: public static void setPollsChoicePersistence(
097: com.liferay.portlet.polls.service.persistence.PollsChoicePersistence pollsChoicePersistence) {
098: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
099: .getService();
100:
101: pollsQuestionLocalService
102: .setPollsChoicePersistence(pollsChoicePersistence);
103: }
104:
105: public static com.liferay.portlet.polls.service.persistence.PollsChoiceFinder getPollsChoiceFinder() {
106: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
107: .getService();
108:
109: return pollsQuestionLocalService.getPollsChoiceFinder();
110: }
111:
112: public static void setPollsChoiceFinder(
113: com.liferay.portlet.polls.service.persistence.PollsChoiceFinder pollsChoiceFinder) {
114: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
115: .getService();
116:
117: pollsQuestionLocalService
118: .setPollsChoiceFinder(pollsChoiceFinder);
119: }
120:
121: public static com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence getPollsQuestionPersistence() {
122: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
123: .getService();
124:
125: return pollsQuestionLocalService.getPollsQuestionPersistence();
126: }
127:
128: public static void setPollsQuestionPersistence(
129: com.liferay.portlet.polls.service.persistence.PollsQuestionPersistence pollsQuestionPersistence) {
130: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
131: .getService();
132:
133: pollsQuestionLocalService
134: .setPollsQuestionPersistence(pollsQuestionPersistence);
135: }
136:
137: public static com.liferay.portlet.polls.service.persistence.PollsVotePersistence getPollsVotePersistence() {
138: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
139: .getService();
140:
141: return pollsQuestionLocalService.getPollsVotePersistence();
142: }
143:
144: public static void setPollsVotePersistence(
145: com.liferay.portlet.polls.service.persistence.PollsVotePersistence pollsVotePersistence) {
146: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
147: .getService();
148:
149: pollsQuestionLocalService
150: .setPollsVotePersistence(pollsVotePersistence);
151: }
152:
153: public static com.liferay.portal.service.persistence.ResourcePersistence getResourcePersistence() {
154: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
155: .getService();
156:
157: return pollsQuestionLocalService.getResourcePersistence();
158: }
159:
160: public static void setResourcePersistence(
161: com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence) {
162: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
163: .getService();
164:
165: pollsQuestionLocalService
166: .setResourcePersistence(resourcePersistence);
167: }
168:
169: public static com.liferay.portal.service.persistence.ResourceFinder getResourceFinder() {
170: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
171: .getService();
172:
173: return pollsQuestionLocalService.getResourceFinder();
174: }
175:
176: public static void setResourceFinder(
177: com.liferay.portal.service.persistence.ResourceFinder resourceFinder) {
178: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
179: .getService();
180:
181: pollsQuestionLocalService.setResourceFinder(resourceFinder);
182: }
183:
184: public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
185: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
186: .getService();
187:
188: return pollsQuestionLocalService.getUserPersistence();
189: }
190:
191: public static void setUserPersistence(
192: com.liferay.portal.service.persistence.UserPersistence userPersistence) {
193: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
194: .getService();
195:
196: pollsQuestionLocalService.setUserPersistence(userPersistence);
197: }
198:
199: public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
200: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
201: .getService();
202:
203: return pollsQuestionLocalService.getUserFinder();
204: }
205:
206: public static void setUserFinder(
207: com.liferay.portal.service.persistence.UserFinder userFinder) {
208: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
209: .getService();
210:
211: pollsQuestionLocalService.setUserFinder(userFinder);
212: }
213:
214: public static void afterPropertiesSet() {
215: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
216: .getService();
217:
218: pollsQuestionLocalService.afterPropertiesSet();
219: }
220:
221: public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
222: long userId, long plid, java.lang.String title,
223: java.lang.String description, int expirationDateMonth,
224: int expirationDateDay, int expirationDateYear,
225: int expirationDateHour, int expirationDateMinute,
226: boolean neverExpire, boolean addCommunityPermissions,
227: boolean addGuestPermissions)
228: throws com.liferay.portal.PortalException,
229: com.liferay.portal.SystemException {
230: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
231: .getService();
232:
233: return pollsQuestionLocalService.addQuestion(userId, plid,
234: title, description, expirationDateMonth,
235: expirationDateDay, expirationDateYear,
236: expirationDateHour, expirationDateMinute, neverExpire,
237: addCommunityPermissions, addGuestPermissions);
238: }
239:
240: public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
241: java.lang.String uuid, long userId, long plid,
242: java.lang.String title, java.lang.String description,
243: int expirationDateMonth, int expirationDateDay,
244: int expirationDateYear, int expirationDateHour,
245: int expirationDateMinute, boolean neverExpire,
246: boolean addCommunityPermissions, boolean addGuestPermissions)
247: throws com.liferay.portal.PortalException,
248: com.liferay.portal.SystemException {
249: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
250: .getService();
251:
252: return pollsQuestionLocalService.addQuestion(uuid, userId,
253: plid, title, description, expirationDateMonth,
254: expirationDateDay, expirationDateYear,
255: expirationDateHour, expirationDateMinute, neverExpire,
256: addCommunityPermissions, addGuestPermissions);
257: }
258:
259: public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
260: long userId, long plid, java.lang.String title,
261: java.lang.String description, int expirationDateMonth,
262: int expirationDateDay, int expirationDateYear,
263: int expirationDateHour, int expirationDateMinute,
264: boolean neverExpire, java.util.List choices,
265: boolean addCommunityPermissions, boolean addGuestPermissions)
266: throws com.liferay.portal.PortalException,
267: com.liferay.portal.SystemException {
268: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
269: .getService();
270:
271: return pollsQuestionLocalService.addQuestion(userId, plid,
272: title, description, expirationDateMonth,
273: expirationDateDay, expirationDateYear,
274: expirationDateHour, expirationDateMinute, neverExpire,
275: choices, addCommunityPermissions, addGuestPermissions);
276: }
277:
278: public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
279: long userId, long plid, java.lang.String title,
280: java.lang.String description, int expirationDateMonth,
281: int expirationDateDay, int expirationDateYear,
282: int expirationDateHour, int expirationDateMinute,
283: boolean neverExpire, java.util.List choices,
284: java.lang.String[] communityPermissions,
285: java.lang.String[] guestPermissions)
286: throws com.liferay.portal.PortalException,
287: com.liferay.portal.SystemException {
288: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
289: .getService();
290:
291: return pollsQuestionLocalService.addQuestion(userId, plid,
292: title, description, expirationDateMonth,
293: expirationDateDay, expirationDateYear,
294: expirationDateHour, expirationDateMinute, neverExpire,
295: choices, communityPermissions, guestPermissions);
296: }
297:
298: public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
299: java.lang.String uuid, long userId, long plid,
300: java.lang.String title, java.lang.String description,
301: int expirationDateMonth, int expirationDateDay,
302: int expirationDateYear, int expirationDateHour,
303: int expirationDateMinute, boolean neverExpire,
304: java.util.List choices,
305: java.lang.Boolean addCommunityPermissions,
306: java.lang.Boolean addGuestPermissions,
307: java.lang.String[] communityPermissions,
308: java.lang.String[] guestPermissions)
309: throws com.liferay.portal.PortalException,
310: com.liferay.portal.SystemException {
311: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
312: .getService();
313:
314: return pollsQuestionLocalService.addQuestion(uuid, userId,
315: plid, title, description, expirationDateMonth,
316: expirationDateDay, expirationDateYear,
317: expirationDateHour, expirationDateMinute, neverExpire,
318: choices, addCommunityPermissions, addGuestPermissions,
319: communityPermissions, guestPermissions);
320: }
321:
322: public static void addQuestionResources(long questionId,
323: boolean addCommunityPermissions, boolean addGuestPermissions)
324: throws com.liferay.portal.PortalException,
325: com.liferay.portal.SystemException {
326: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
327: .getService();
328:
329: pollsQuestionLocalService.addQuestionResources(questionId,
330: addCommunityPermissions, addGuestPermissions);
331: }
332:
333: public static void addQuestionResources(
334: com.liferay.portlet.polls.model.PollsQuestion question,
335: boolean addCommunityPermissions, boolean addGuestPermissions)
336: throws com.liferay.portal.PortalException,
337: com.liferay.portal.SystemException {
338: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
339: .getService();
340:
341: pollsQuestionLocalService.addQuestionResources(question,
342: addCommunityPermissions, addGuestPermissions);
343: }
344:
345: public static void addQuestionResources(long questionId,
346: java.lang.String[] communityPermissions,
347: java.lang.String[] guestPermissions)
348: throws com.liferay.portal.PortalException,
349: com.liferay.portal.SystemException {
350: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
351: .getService();
352:
353: pollsQuestionLocalService.addQuestionResources(questionId,
354: communityPermissions, guestPermissions);
355: }
356:
357: public static void addQuestionResources(
358: com.liferay.portlet.polls.model.PollsQuestion question,
359: java.lang.String[] communityPermissions,
360: java.lang.String[] guestPermissions)
361: throws com.liferay.portal.PortalException,
362: com.liferay.portal.SystemException {
363: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
364: .getService();
365:
366: pollsQuestionLocalService.addQuestionResources(question,
367: communityPermissions, guestPermissions);
368: }
369:
370: public static void deleteQuestion(long questionId)
371: throws com.liferay.portal.PortalException,
372: com.liferay.portal.SystemException {
373: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
374: .getService();
375:
376: pollsQuestionLocalService.deleteQuestion(questionId);
377: }
378:
379: public static void deleteQuestion(
380: com.liferay.portlet.polls.model.PollsQuestion question)
381: throws com.liferay.portal.PortalException,
382: com.liferay.portal.SystemException {
383: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
384: .getService();
385:
386: pollsQuestionLocalService.deleteQuestion(question);
387: }
388:
389: public static void deleteQuestions(long groupId)
390: throws com.liferay.portal.PortalException,
391: com.liferay.portal.SystemException {
392: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
393: .getService();
394:
395: pollsQuestionLocalService.deleteQuestions(groupId);
396: }
397:
398: public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
399: long questionId) throws com.liferay.portal.PortalException,
400: com.liferay.portal.SystemException {
401: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
402: .getService();
403:
404: return pollsQuestionLocalService.getQuestion(questionId);
405: }
406:
407: public static java.util.List getQuestions(long groupId)
408: throws com.liferay.portal.SystemException {
409: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
410: .getService();
411:
412: return pollsQuestionLocalService.getQuestions(groupId);
413: }
414:
415: public static java.util.List getQuestions(long groupId, int begin,
416: int end) throws com.liferay.portal.SystemException {
417: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
418: .getService();
419:
420: return pollsQuestionLocalService.getQuestions(groupId, begin,
421: end);
422: }
423:
424: public static int getQuestionsCount(long groupId)
425: throws com.liferay.portal.SystemException {
426: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
427: .getService();
428:
429: return pollsQuestionLocalService.getQuestionsCount(groupId);
430: }
431:
432: public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
433: long userId, long questionId, java.lang.String title,
434: java.lang.String description, int expirationDateMonth,
435: int expirationDateDay, int expirationDateYear,
436: int expirationDateHour, int expirationDateMinute,
437: boolean neverExpire)
438: throws com.liferay.portal.PortalException,
439: com.liferay.portal.SystemException {
440: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
441: .getService();
442:
443: return pollsQuestionLocalService.updateQuestion(userId,
444: questionId, title, description, expirationDateMonth,
445: expirationDateDay, expirationDateYear,
446: expirationDateHour, expirationDateMinute, neverExpire);
447: }
448:
449: public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
450: long userId, long questionId, java.lang.String title,
451: java.lang.String description, int expirationDateMonth,
452: int expirationDateDay, int expirationDateYear,
453: int expirationDateHour, int expirationDateMinute,
454: boolean neverExpire, java.util.List choices)
455: throws com.liferay.portal.PortalException,
456: com.liferay.portal.SystemException {
457: PollsQuestionLocalService pollsQuestionLocalService = PollsQuestionLocalServiceFactory
458: .getService();
459:
460: return pollsQuestionLocalService.updateQuestion(userId,
461: questionId, title, description, expirationDateMonth,
462: expirationDateDay, expirationDateYear,
463: expirationDateHour, expirationDateMinute, neverExpire,
464: choices);
465: }
466: }
|