1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.polls.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="PollsQuestionServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link PollsQuestionService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       PollsQuestionService
37   * @generated
38   */
39  public class PollsQuestionServiceUtil {
40      public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
41          java.util.Map<java.util.Locale, String> titleMap,
42          java.util.Map<java.util.Locale, String> descriptionMap,
43          int expirationDateMonth, int expirationDateDay, int expirationDateYear,
44          int expirationDateHour, int expirationDateMinute, boolean neverExpire,
45          java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
46          com.liferay.portal.service.ServiceContext serviceContext)
47          throws com.liferay.portal.kernel.exception.PortalException,
48              com.liferay.portal.kernel.exception.SystemException {
49          return getService()
50                     .addQuestion(titleMap, descriptionMap, expirationDateMonth,
51              expirationDateDay, expirationDateYear, expirationDateHour,
52              expirationDateMinute, neverExpire, choices, serviceContext);
53      }
54  
55      public static void deleteQuestion(long questionId)
56          throws com.liferay.portal.kernel.exception.PortalException,
57              com.liferay.portal.kernel.exception.SystemException {
58          getService().deleteQuestion(questionId);
59      }
60  
61      public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
62          long questionId)
63          throws com.liferay.portal.kernel.exception.PortalException,
64              com.liferay.portal.kernel.exception.SystemException {
65          return getService().getQuestion(questionId);
66      }
67  
68      public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
69          long questionId, java.util.Map<java.util.Locale, String> titleMap,
70          java.util.Map<java.util.Locale, String> descriptionMap,
71          int expirationDateMonth, int expirationDateDay, int expirationDateYear,
72          int expirationDateHour, int expirationDateMinute, boolean neverExpire,
73          java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
74          com.liferay.portal.service.ServiceContext serviceContext)
75          throws com.liferay.portal.kernel.exception.PortalException,
76              com.liferay.portal.kernel.exception.SystemException {
77          return getService()
78                     .updateQuestion(questionId, titleMap, descriptionMap,
79              expirationDateMonth, expirationDateDay, expirationDateYear,
80              expirationDateHour, expirationDateMinute, neverExpire, choices,
81              serviceContext);
82      }
83  
84      public static PollsQuestionService getService() {
85          if (_service == null) {
86              _service = (PollsQuestionService)PortalBeanLocatorUtil.locate(PollsQuestionService.class.getName());
87          }
88  
89          return _service;
90      }
91  
92      public void setService(PollsQuestionService service) {
93          _service = service;
94      }
95  
96      private static PollsQuestionService _service;
97  }