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