1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
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          long plid, java.lang.String title, java.lang.String description,
42          int expirationDateMonth, int expirationDateDay, int expirationDateYear,
43          int expirationDateHour, int expirationDateMinute, boolean neverExpire,
44          java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
45          boolean addCommunityPermissions, boolean addGuestPermissions)
46          throws com.liferay.portal.PortalException,
47              com.liferay.portal.SystemException, java.rmi.RemoteException {
48          return getService()
49                     .addQuestion(plid, title, description, expirationDateMonth,
50              expirationDateDay, expirationDateYear, expirationDateHour,
51              expirationDateMinute, neverExpire, choices,
52              addCommunityPermissions, addGuestPermissions);
53      }
54  
55      public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
56          long plid, java.lang.String title, java.lang.String description,
57          int expirationDateMonth, int expirationDateDay, int expirationDateYear,
58          int expirationDateHour, int expirationDateMinute, boolean neverExpire,
59          java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
60          java.lang.String[] communityPermissions,
61          java.lang.String[] guestPermissions)
62          throws com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException, java.rmi.RemoteException {
64          return getService()
65                     .addQuestion(plid, title, description, expirationDateMonth,
66              expirationDateDay, expirationDateYear, expirationDateHour,
67              expirationDateMinute, neverExpire, choices, communityPermissions,
68              guestPermissions);
69      }
70  
71      public static void deleteQuestion(long questionId)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException, java.rmi.RemoteException {
74          getService().deleteQuestion(questionId);
75      }
76  
77      public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
78          long questionId)
79          throws com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException, java.rmi.RemoteException {
81          return getService().getQuestion(questionId);
82      }
83  
84      public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
85          long questionId, java.lang.String title, java.lang.String description,
86          int expirationDateMonth, int expirationDateDay, int expirationDateYear,
87          int expirationDateHour, int expirationDateMinute, boolean neverExpire,
88          java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices)
89          throws com.liferay.portal.PortalException,
90              com.liferay.portal.SystemException, java.rmi.RemoteException {
91          return getService()
92                     .updateQuestion(questionId, title, description,
93              expirationDateMonth, expirationDateDay, expirationDateYear,
94              expirationDateHour, expirationDateMinute, neverExpire, choices);
95      }
96  
97      public static PollsQuestionService getService() {
98          if (_service == null) {
99              _service = (PollsQuestionService)PortalBeanLocatorUtil.locate(PollsQuestionService.class.getName());
100         }
101 
102         return _service;
103     }
104 
105     public void setService(PollsQuestionService service) {
106         _service = service;
107     }
108 
109     private static PollsQuestionService _service;
110 }