1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.polls.service;
24  
25  
26  /**
27   * <a href="PollsQuestionLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * {@link PollsQuestionLocalService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       PollsQuestionLocalService
44   * @generated
45   */
46  public class PollsQuestionLocalServiceUtil {
47      public static com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
48          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
49          throws com.liferay.portal.SystemException {
50          return getService().addPollsQuestion(pollsQuestion);
51      }
52  
53      public static com.liferay.portlet.polls.model.PollsQuestion createPollsQuestion(
54          long questionId) {
55          return getService().createPollsQuestion(questionId);
56      }
57  
58      public static void deletePollsQuestion(long questionId)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException {
61          getService().deletePollsQuestion(questionId);
62      }
63  
64      public static void deletePollsQuestion(
65          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
66          throws com.liferay.portal.SystemException {
67          getService().deletePollsQuestion(pollsQuestion);
68      }
69  
70      public static java.util.List<Object> dynamicQuery(
71          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
72          throws com.liferay.portal.SystemException {
73          return getService().dynamicQuery(dynamicQuery);
74      }
75  
76      public static java.util.List<Object> dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end) throws com.liferay.portal.SystemException {
79          return getService().dynamicQuery(dynamicQuery, start, end);
80      }
81  
82      public static com.liferay.portlet.polls.model.PollsQuestion getPollsQuestion(
83          long questionId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          return getService().getPollsQuestion(questionId);
87      }
88  
89      public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
90          int start, int end) throws com.liferay.portal.SystemException {
91          return getService().getPollsQuestions(start, end);
92      }
93  
94      public static int getPollsQuestionsCount()
95          throws com.liferay.portal.SystemException {
96          return getService().getPollsQuestionsCount();
97      }
98  
99      public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
100         com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
101         throws com.liferay.portal.SystemException {
102         return getService().updatePollsQuestion(pollsQuestion);
103     }
104 
105     public static com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
106         com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
107         boolean merge) throws com.liferay.portal.SystemException {
108         return getService().updatePollsQuestion(pollsQuestion, merge);
109     }
110 
111     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
112         long userId, long plid, java.lang.String title,
113         java.lang.String description, int expirationDateMonth,
114         int expirationDateDay, int expirationDateYear, int expirationDateHour,
115         int expirationDateMinute, boolean neverExpire,
116         boolean addCommunityPermissions, boolean addGuestPermissions)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException {
119         return getService()
120                    .addQuestion(userId, plid, title, description,
121             expirationDateMonth, expirationDateDay, expirationDateYear,
122             expirationDateHour, expirationDateMinute, neverExpire,
123             addCommunityPermissions, addGuestPermissions);
124     }
125 
126     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
127         java.lang.String uuid, long userId, long plid, java.lang.String title,
128         java.lang.String description, int expirationDateMonth,
129         int expirationDateDay, int expirationDateYear, int expirationDateHour,
130         int expirationDateMinute, boolean neverExpire,
131         boolean addCommunityPermissions, boolean addGuestPermissions)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException {
134         return getService()
135                    .addQuestion(uuid, userId, plid, title, description,
136             expirationDateMonth, expirationDateDay, expirationDateYear,
137             expirationDateHour, expirationDateMinute, neverExpire,
138             addCommunityPermissions, addGuestPermissions);
139     }
140 
141     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
142         long userId, long plid, java.lang.String title,
143         java.lang.String description, int expirationDateMonth,
144         int expirationDateDay, int expirationDateYear, int expirationDateHour,
145         int expirationDateMinute, boolean neverExpire,
146         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
147         boolean addCommunityPermissions, boolean addGuestPermissions)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException {
150         return getService()
151                    .addQuestion(userId, plid, title, description,
152             expirationDateMonth, expirationDateDay, expirationDateYear,
153             expirationDateHour, expirationDateMinute, neverExpire, choices,
154             addCommunityPermissions, addGuestPermissions);
155     }
156 
157     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
158         long userId, long plid, java.lang.String title,
159         java.lang.String description, int expirationDateMonth,
160         int expirationDateDay, int expirationDateYear, int expirationDateHour,
161         int expirationDateMinute, boolean neverExpire,
162         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
163         java.lang.String[] communityPermissions,
164         java.lang.String[] guestPermissions)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         return getService()
168                    .addQuestion(userId, plid, title, description,
169             expirationDateMonth, expirationDateDay, expirationDateYear,
170             expirationDateHour, expirationDateMinute, neverExpire, choices,
171             communityPermissions, guestPermissions);
172     }
173 
174     public static com.liferay.portlet.polls.model.PollsQuestion addQuestion(
175         java.lang.String uuid, long userId, long plid, java.lang.String title,
176         java.lang.String description, int expirationDateMonth,
177         int expirationDateDay, int expirationDateYear, int expirationDateHour,
178         int expirationDateMinute, boolean neverExpire,
179         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
180         java.lang.Boolean addCommunityPermissions,
181         java.lang.Boolean addGuestPermissions,
182         java.lang.String[] communityPermissions,
183         java.lang.String[] guestPermissions)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException {
186         return getService()
187                    .addQuestion(uuid, userId, plid, title, description,
188             expirationDateMonth, expirationDateDay, expirationDateYear,
189             expirationDateHour, expirationDateMinute, neverExpire, choices,
190             addCommunityPermissions, addGuestPermissions, communityPermissions,
191             guestPermissions);
192     }
193 
194     public static void addQuestionResources(long questionId,
195         boolean addCommunityPermissions, boolean addGuestPermissions)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException {
198         getService()
199             .addQuestionResources(questionId, addCommunityPermissions,
200             addGuestPermissions);
201     }
202 
203     public static void addQuestionResources(
204         com.liferay.portlet.polls.model.PollsQuestion question,
205         boolean addCommunityPermissions, boolean addGuestPermissions)
206         throws com.liferay.portal.PortalException,
207             com.liferay.portal.SystemException {
208         getService()
209             .addQuestionResources(question, addCommunityPermissions,
210             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         getService()
219             .addQuestionResources(questionId, communityPermissions,
220             guestPermissions);
221     }
222 
223     public static void addQuestionResources(
224         com.liferay.portlet.polls.model.PollsQuestion question,
225         java.lang.String[] communityPermissions,
226         java.lang.String[] guestPermissions)
227         throws com.liferay.portal.PortalException,
228             com.liferay.portal.SystemException {
229         getService()
230             .addQuestionResources(question, communityPermissions,
231             guestPermissions);
232     }
233 
234     public static void deleteQuestion(long questionId)
235         throws com.liferay.portal.PortalException,
236             com.liferay.portal.SystemException {
237         getService().deleteQuestion(questionId);
238     }
239 
240     public static void deleteQuestion(
241         com.liferay.portlet.polls.model.PollsQuestion question)
242         throws com.liferay.portal.PortalException,
243             com.liferay.portal.SystemException {
244         getService().deleteQuestion(question);
245     }
246 
247     public static void deleteQuestions(long groupId)
248         throws com.liferay.portal.PortalException,
249             com.liferay.portal.SystemException {
250         getService().deleteQuestions(groupId);
251     }
252 
253     public static com.liferay.portlet.polls.model.PollsQuestion getQuestion(
254         long questionId)
255         throws com.liferay.portal.PortalException,
256             com.liferay.portal.SystemException {
257         return getService().getQuestion(questionId);
258     }
259 
260     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
261         long groupId) throws com.liferay.portal.SystemException {
262         return getService().getQuestions(groupId);
263     }
264 
265     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
266         long groupId, int start, int end)
267         throws com.liferay.portal.SystemException {
268         return getService().getQuestions(groupId, start, end);
269     }
270 
271     public static int getQuestionsCount(long groupId)
272         throws com.liferay.portal.SystemException {
273         return getService().getQuestionsCount(groupId);
274     }
275 
276     public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
277         long userId, long questionId, java.lang.String title,
278         java.lang.String description, int expirationDateMonth,
279         int expirationDateDay, int expirationDateYear, int expirationDateHour,
280         int expirationDateMinute, boolean neverExpire)
281         throws com.liferay.portal.PortalException,
282             com.liferay.portal.SystemException {
283         return getService()
284                    .updateQuestion(userId, questionId, title, description,
285             expirationDateMonth, expirationDateDay, expirationDateYear,
286             expirationDateHour, expirationDateMinute, neverExpire);
287     }
288 
289     public static com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
290         long userId, long questionId, java.lang.String title,
291         java.lang.String description, int expirationDateMonth,
292         int expirationDateDay, int expirationDateYear, int expirationDateHour,
293         int expirationDateMinute, boolean neverExpire,
294         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices)
295         throws com.liferay.portal.PortalException,
296             com.liferay.portal.SystemException {
297         return getService()
298                    .updateQuestion(userId, questionId, title, description,
299             expirationDateMonth, expirationDateDay, expirationDateYear,
300             expirationDateHour, expirationDateMinute, neverExpire, choices);
301     }
302 
303     public static PollsQuestionLocalService getService() {
304         if (_service == null) {
305             throw new RuntimeException("PollsQuestionLocalService is not set");
306         }
307 
308         return _service;
309     }
310 
311     public void setService(PollsQuestionLocalService service) {
312         _service = service;
313     }
314 
315     private static PollsQuestionLocalService _service;
316 }