001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.polls.service;
016    
017    /**
018     * <p>
019     * This class is a wrapper for {@link PollsQuestionLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       PollsQuestionLocalService
024     * @generated
025     */
026    public class PollsQuestionLocalServiceWrapper
027            implements PollsQuestionLocalService {
028            public PollsQuestionLocalServiceWrapper(
029                    PollsQuestionLocalService pollsQuestionLocalService) {
030                    _pollsQuestionLocalService = pollsQuestionLocalService;
031            }
032    
033            /**
034            * Adds the polls question to the database. Also notifies the appropriate model listeners.
035            *
036            * @param pollsQuestion the polls question to add
037            * @return the polls question that was added
038            * @throws SystemException if a system exception occurred
039            */
040            public com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
041                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
042                    throws com.liferay.portal.kernel.exception.SystemException {
043                    return _pollsQuestionLocalService.addPollsQuestion(pollsQuestion);
044            }
045    
046            /**
047            * Creates a new polls question with the primary key. Does not add the polls question to the database.
048            *
049            * @param questionId the primary key for the new polls question
050            * @return the new polls question
051            */
052            public com.liferay.portlet.polls.model.PollsQuestion createPollsQuestion(
053                    long questionId) {
054                    return _pollsQuestionLocalService.createPollsQuestion(questionId);
055            }
056    
057            /**
058            * Deletes the polls question with the primary key from the database. Also notifies the appropriate model listeners.
059            *
060            * @param questionId the primary key of the polls question to delete
061            * @throws PortalException if a polls question with the primary key could not be found
062            * @throws SystemException if a system exception occurred
063            */
064            public void deletePollsQuestion(long questionId)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    _pollsQuestionLocalService.deletePollsQuestion(questionId);
068            }
069    
070            /**
071            * Deletes the polls question from the database. Also notifies the appropriate model listeners.
072            *
073            * @param pollsQuestion the polls question to delete
074            * @throws SystemException if a system exception occurred
075            */
076            public void deletePollsQuestion(
077                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
078                    throws com.liferay.portal.kernel.exception.SystemException {
079                    _pollsQuestionLocalService.deletePollsQuestion(pollsQuestion);
080            }
081    
082            /**
083            * Performs a dynamic query on the database and returns the matching rows.
084            *
085            * @param dynamicQuery the dynamic query to search with
086            * @return the matching rows
087            * @throws SystemException if a system exception occurred
088            */
089            @SuppressWarnings("rawtypes")
090            public java.util.List dynamicQuery(
091                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
092                    throws com.liferay.portal.kernel.exception.SystemException {
093                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery);
094            }
095    
096            /**
097            * Performs a dynamic query on the database and returns a range of the matching rows.
098            *
099            * <p>
100            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
101            * </p>
102            *
103            * @param dynamicQuery the dynamic query to search with
104            * @param start the lower bound of the range of model instances to return
105            * @param end the upper bound of the range of model instances to return (not inclusive)
106            * @return the range of matching rows
107            * @throws SystemException if a system exception occurred
108            */
109            @SuppressWarnings("rawtypes")
110            public java.util.List dynamicQuery(
111                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
112                    int end) throws com.liferay.portal.kernel.exception.SystemException {
113                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery, start, end);
114            }
115    
116            /**
117            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
118            *
119            * <p>
120            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
121            * </p>
122            *
123            * @param dynamicQuery the dynamic query to search with
124            * @param start the lower bound of the range of model instances to return
125            * @param end the upper bound of the range of model instances to return (not inclusive)
126            * @param orderByComparator the comparator to order the results by
127            * @return the ordered range of matching rows
128            * @throws SystemException if a system exception occurred
129            */
130            @SuppressWarnings("rawtypes")
131            public java.util.List dynamicQuery(
132                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
133                    int end,
134                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135                    throws com.liferay.portal.kernel.exception.SystemException {
136                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery, start,
137                            end, orderByComparator);
138            }
139    
140            /**
141            * Counts the number of rows that match the dynamic query.
142            *
143            * @param dynamicQuery the dynamic query to search with
144            * @return the number of rows that match the dynamic query
145            * @throws SystemException if a system exception occurred
146            */
147            public long dynamicQueryCount(
148                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return _pollsQuestionLocalService.dynamicQueryCount(dynamicQuery);
151            }
152    
153            /**
154            * Gets the polls question with the primary key.
155            *
156            * @param questionId the primary key of the polls question to get
157            * @return the polls question
158            * @throws PortalException if a polls question with the primary key could not be found
159            * @throws SystemException if a system exception occurred
160            */
161            public com.liferay.portlet.polls.model.PollsQuestion getPollsQuestion(
162                    long questionId)
163                    throws com.liferay.portal.kernel.exception.PortalException,
164                            com.liferay.portal.kernel.exception.SystemException {
165                    return _pollsQuestionLocalService.getPollsQuestion(questionId);
166            }
167    
168            /**
169            * Gets the polls question with the UUID and group id.
170            *
171            * @param uuid the UUID of polls question to get
172            * @param groupId the group id of the polls question to get
173            * @return the polls question
174            * @throws PortalException if a polls question with the UUID and group id could not be found
175            * @throws SystemException if a system exception occurred
176            */
177            public com.liferay.portlet.polls.model.PollsQuestion getPollsQuestionByUuidAndGroupId(
178                    java.lang.String uuid, long groupId)
179                    throws com.liferay.portal.kernel.exception.PortalException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return _pollsQuestionLocalService.getPollsQuestionByUuidAndGroupId(uuid,
182                            groupId);
183            }
184    
185            /**
186            * Gets a range of all the polls questions.
187            *
188            * <p>
189            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
190            * </p>
191            *
192            * @param start the lower bound of the range of polls questions to return
193            * @param end the upper bound of the range of polls questions to return (not inclusive)
194            * @return the range of polls questions
195            * @throws SystemException if a system exception occurred
196            */
197            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
198                    int start, int end)
199                    throws com.liferay.portal.kernel.exception.SystemException {
200                    return _pollsQuestionLocalService.getPollsQuestions(start, end);
201            }
202    
203            /**
204            * Gets the number of polls questions.
205            *
206            * @return the number of polls questions
207            * @throws SystemException if a system exception occurred
208            */
209            public int getPollsQuestionsCount()
210                    throws com.liferay.portal.kernel.exception.SystemException {
211                    return _pollsQuestionLocalService.getPollsQuestionsCount();
212            }
213    
214            /**
215            * Updates the polls question in the database. Also notifies the appropriate model listeners.
216            *
217            * @param pollsQuestion the polls question to update
218            * @return the polls question that was updated
219            * @throws SystemException if a system exception occurred
220            */
221            public com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
222                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
223                    throws com.liferay.portal.kernel.exception.SystemException {
224                    return _pollsQuestionLocalService.updatePollsQuestion(pollsQuestion);
225            }
226    
227            /**
228            * Updates the polls question in the database. Also notifies the appropriate model listeners.
229            *
230            * @param pollsQuestion the polls question to update
231            * @param merge whether to merge the polls question with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
232            * @return the polls question that was updated
233            * @throws SystemException if a system exception occurred
234            */
235            public com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
236                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
237                    boolean merge)
238                    throws com.liferay.portal.kernel.exception.SystemException {
239                    return _pollsQuestionLocalService.updatePollsQuestion(pollsQuestion,
240                            merge);
241            }
242    
243            public com.liferay.portlet.polls.model.PollsQuestion addQuestion(
244                    long userId,
245                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
246                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
247                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
248                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
249                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
250                    com.liferay.portal.service.ServiceContext serviceContext)
251                    throws com.liferay.portal.kernel.exception.PortalException,
252                            com.liferay.portal.kernel.exception.SystemException {
253                    return _pollsQuestionLocalService.addQuestion(userId, titleMap,
254                            descriptionMap, expirationDateMonth, expirationDateDay,
255                            expirationDateYear, expirationDateHour, expirationDateMinute,
256                            neverExpire, choices, serviceContext);
257            }
258    
259            public void addQuestionResources(long questionId,
260                    boolean addCommunityPermissions, boolean addGuestPermissions)
261                    throws com.liferay.portal.kernel.exception.PortalException,
262                            com.liferay.portal.kernel.exception.SystemException {
263                    _pollsQuestionLocalService.addQuestionResources(questionId,
264                            addCommunityPermissions, addGuestPermissions);
265            }
266    
267            public void addQuestionResources(long questionId,
268                    java.lang.String[] communityPermissions,
269                    java.lang.String[] guestPermissions)
270                    throws com.liferay.portal.kernel.exception.PortalException,
271                            com.liferay.portal.kernel.exception.SystemException {
272                    _pollsQuestionLocalService.addQuestionResources(questionId,
273                            communityPermissions, guestPermissions);
274            }
275    
276            public void addQuestionResources(
277                    com.liferay.portlet.polls.model.PollsQuestion question,
278                    boolean addCommunityPermissions, boolean addGuestPermissions)
279                    throws com.liferay.portal.kernel.exception.PortalException,
280                            com.liferay.portal.kernel.exception.SystemException {
281                    _pollsQuestionLocalService.addQuestionResources(question,
282                            addCommunityPermissions, addGuestPermissions);
283            }
284    
285            public void addQuestionResources(
286                    com.liferay.portlet.polls.model.PollsQuestion question,
287                    java.lang.String[] communityPermissions,
288                    java.lang.String[] guestPermissions)
289                    throws com.liferay.portal.kernel.exception.PortalException,
290                            com.liferay.portal.kernel.exception.SystemException {
291                    _pollsQuestionLocalService.addQuestionResources(question,
292                            communityPermissions, guestPermissions);
293            }
294    
295            public void deleteQuestion(long questionId)
296                    throws com.liferay.portal.kernel.exception.PortalException,
297                            com.liferay.portal.kernel.exception.SystemException {
298                    _pollsQuestionLocalService.deleteQuestion(questionId);
299            }
300    
301            public void deleteQuestion(
302                    com.liferay.portlet.polls.model.PollsQuestion question)
303                    throws com.liferay.portal.kernel.exception.PortalException,
304                            com.liferay.portal.kernel.exception.SystemException {
305                    _pollsQuestionLocalService.deleteQuestion(question);
306            }
307    
308            public void deleteQuestions(long groupId)
309                    throws com.liferay.portal.kernel.exception.PortalException,
310                            com.liferay.portal.kernel.exception.SystemException {
311                    _pollsQuestionLocalService.deleteQuestions(groupId);
312            }
313    
314            public com.liferay.portlet.polls.model.PollsQuestion getQuestion(
315                    long questionId)
316                    throws com.liferay.portal.kernel.exception.PortalException,
317                            com.liferay.portal.kernel.exception.SystemException {
318                    return _pollsQuestionLocalService.getQuestion(questionId);
319            }
320    
321            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
322                    long groupId)
323                    throws com.liferay.portal.kernel.exception.SystemException {
324                    return _pollsQuestionLocalService.getQuestions(groupId);
325            }
326    
327            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
328                    long groupId, int start, int end)
329                    throws com.liferay.portal.kernel.exception.SystemException {
330                    return _pollsQuestionLocalService.getQuestions(groupId, start, end);
331            }
332    
333            public int getQuestionsCount(long groupId)
334                    throws com.liferay.portal.kernel.exception.SystemException {
335                    return _pollsQuestionLocalService.getQuestionsCount(groupId);
336            }
337    
338            public com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
339                    long userId, long questionId,
340                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
341                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
342                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
343                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
344                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
345                    com.liferay.portal.service.ServiceContext serviceContext)
346                    throws com.liferay.portal.kernel.exception.PortalException,
347                            com.liferay.portal.kernel.exception.SystemException {
348                    return _pollsQuestionLocalService.updateQuestion(userId, questionId,
349                            titleMap, descriptionMap, expirationDateMonth, expirationDateDay,
350                            expirationDateYear, expirationDateHour, expirationDateMinute,
351                            neverExpire, choices, serviceContext);
352            }
353    
354            public PollsQuestionLocalService getWrappedPollsQuestionLocalService() {
355                    return _pollsQuestionLocalService;
356            }
357    
358            private PollsQuestionLocalService _pollsQuestionLocalService;
359    }