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="PollsQuestionLocalServiceUtil.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 PollsQuestionLocalService} 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       PollsQuestionLocalService
37   * @generated
38   */
39  public class PollsQuestionLocalServiceUtil {
40      public static com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
41          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
42          throws com.liferay.portal.SystemException {
43          return getService().addPollsQuestion(pollsQuestion);
44      }
45  
46      public static com.liferay.portlet.polls.model.PollsQuestion createPollsQuestion(
47          long questionId) {
48          return getService().createPollsQuestion(questionId);
49      }
50  
51      public static void deletePollsQuestion(long questionId)
52          throws com.liferay.portal.PortalException,
53              com.liferay.portal.SystemException {
54          getService().deletePollsQuestion(questionId);
55      }
56  
57      public static void deletePollsQuestion(
58          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
59          throws com.liferay.portal.SystemException {
60          getService().deletePollsQuestion(pollsQuestion);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end,
78          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79          throws com.liferay.portal.SystemException {
80          return getService()
81                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82      }
83  
84      public static int dynamicQueryCount(
85          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86          throws com.liferay.portal.SystemException {
87          return getService().dynamicQueryCount(dynamicQuery);
88      }
89  
90      public static com.liferay.portlet.polls.model.PollsQuestion getPollsQuestion(
91          long questionId)
92          throws com.liferay.portal.PortalException,
93              com.liferay.portal.SystemException {
94          return getService().getPollsQuestion(questionId);
95      }
96  
97      public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
98          int start, int end) throws com.liferay.portal.SystemException {
99          return getService().getPollsQuestions(start, end);
100     }
101 
102     public static int getPollsQuestionsCount()
103         throws com.liferay.portal.SystemException {
104         return getService().getPollsQuestionsCount();
105     }
106 
107     public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
108         com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
109         throws com.liferay.portal.SystemException {
110         return getService().updatePollsQuestion(pollsQuestion);
111     }
112 
113     public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
114         com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
115         boolean merge) throws com.liferay.portal.SystemException {
116         return getService().updatePollsQuestion(pollsQuestion, merge);
117     }
118 
119     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
120         long userId, java.lang.String title, java.lang.String description,
121         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
122         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
123         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
124         com.liferay.portal.service.ServiceContext serviceContext)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException {
127         return getService()
128                    .addQuestion(userId, title, description,
129             expirationDateMonth, expirationDateDay, expirationDateYear,
130             expirationDateHour, expirationDateMinute, neverExpire, choices,
131             serviceContext);
132     }
133 
134     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
135         java.lang.String uuid, long userId, java.lang.String title,
136         java.lang.String description, int expirationDateMonth,
137         int expirationDateDay, int expirationDateYear, int expirationDateHour,
138         int expirationDateMinute, boolean neverExpire,
139         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
140         com.liferay.portal.service.ServiceContext serviceContext)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException {
143         return getService()
144                    .addQuestion(uuid, userId, title, description,
145             expirationDateMonth, expirationDateDay, expirationDateYear,
146             expirationDateHour, expirationDateMinute, neverExpire, choices,
147             serviceContext);
148     }
149 
150     public static void addQuestionResources(long questionId,
151         boolean addCommunityPermissions, boolean addGuestPermissions)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException {
154         getService()
155             .addQuestionResources(questionId, addCommunityPermissions,
156             addGuestPermissions);
157     }
158 
159     public static void addQuestionResources(long questionId,
160         java.lang.String[] communityPermissions,
161         java.lang.String[] guestPermissions)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException {
164         getService()
165             .addQuestionResources(questionId, communityPermissions,
166             guestPermissions);
167     }
168 
169     public static void addQuestionResources(
170         com.liferay.portlet.polls.model.PollsQuestion question,
171         boolean addCommunityPermissions, boolean addGuestPermissions)
172         throws com.liferay.portal.PortalException,
173             com.liferay.portal.SystemException {
174         getService()
175             .addQuestionResources(question, addCommunityPermissions,
176             addGuestPermissions);
177     }
178 
179     public static void addQuestionResources(
180         com.liferay.portlet.polls.model.PollsQuestion question,
181         java.lang.String[] communityPermissions,
182         java.lang.String[] guestPermissions)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException {
185         getService()
186             .addQuestionResources(question, communityPermissions,
187             guestPermissions);
188     }
189 
190     public static void deleteQuestion(long questionId)
191         throws com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException {
193         getService().deleteQuestion(questionId);
194     }
195 
196     public static void deleteQuestion(
197         com.liferay.portlet.polls.model.PollsQuestion question)
198         throws com.liferay.portal.PortalException,
199             com.liferay.portal.SystemException {
200         getService().deleteQuestion(question);
201     }
202 
203     public static void deleteQuestions(long groupId)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         getService().deleteQuestions(groupId);
207     }
208 
209     public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
210         long questionId)
211         throws com.liferay.portal.PortalException,
212             com.liferay.portal.SystemException {
213         return getService().getQuestion(questionId);
214     }
215 
216     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
217         long groupId) throws com.liferay.portal.SystemException {
218         return getService().getQuestions(groupId);
219     }
220 
221     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
222         long groupId, int start, int end)
223         throws com.liferay.portal.SystemException {
224         return getService().getQuestions(groupId, start, end);
225     }
226 
227     public static int getQuestionsCount(long groupId)
228         throws com.liferay.portal.SystemException {
229         return getService().getQuestionsCount(groupId);
230     }
231 
232     public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
233         long userId, long questionId, java.lang.String title,
234         java.lang.String description, int expirationDateMonth,
235         int expirationDateDay, int expirationDateYear, int expirationDateHour,
236         int expirationDateMinute, boolean neverExpire)
237         throws com.liferay.portal.PortalException,
238             com.liferay.portal.SystemException {
239         return getService()
240                    .updateQuestion(userId, questionId, title, description,
241             expirationDateMonth, expirationDateDay, expirationDateYear,
242             expirationDateHour, expirationDateMinute, neverExpire);
243     }
244 
245     public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
246         long userId, long questionId, java.lang.String title,
247         java.lang.String description, int expirationDateMonth,
248         int expirationDateDay, int expirationDateYear, int expirationDateHour,
249         int expirationDateMinute, boolean neverExpire,
250         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
251         com.liferay.portal.service.ServiceContext serviceContext)
252         throws com.liferay.portal.PortalException,
253             com.liferay.portal.SystemException {
254         return getService()
255                    .updateQuestion(userId, questionId, title, description,
256             expirationDateMonth, expirationDateDay, expirationDateYear,
257             expirationDateHour, expirationDateMinute, neverExpire, choices,
258             serviceContext);
259     }
260 
261     public static PollsQuestionLocalService getService() {
262         if (_service == null) {
263             _service = (PollsQuestionLocalService)PortalBeanLocatorUtil.locate(PollsQuestionLocalService.class.getName());
264         }
265 
266         return _service;
267     }
268 
269     public void setService(PollsQuestionLocalService service) {
270         _service = service;
271     }
272 
273     private static PollsQuestionLocalService _service;
274 }