001    /**
002     * Copyright (c) 2000-2011 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
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
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
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
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
104            * @param start the lower bound of the range of model instances
105            * @param end the upper bound of the range of model instances (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
124            * @param start the lower bound of the range of model instances
125            * @param end the upper bound of the range of model instances (not inclusive)
126            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns the number of rows that match the dynamic query.
142            *
143            * @param dynamicQuery the dynamic query
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            * Returns the polls question with the primary key.
155            *
156            * @param questionId the primary key of the polls question
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            public com.liferay.portal.model.PersistedModel getPersistedModel(
169                    java.io.Serializable primaryKeyObj)
170                    throws com.liferay.portal.kernel.exception.PortalException,
171                            com.liferay.portal.kernel.exception.SystemException {
172                    return _pollsQuestionLocalService.getPersistedModel(primaryKeyObj);
173            }
174    
175            /**
176            * Returns the polls question with the UUID in the group.
177            *
178            * @param uuid the UUID of polls question
179            * @param groupId the group id of the polls question
180            * @return the polls question
181            * @throws PortalException if a polls question with the UUID in the group could not be found
182            * @throws SystemException if a system exception occurred
183            */
184            public com.liferay.portlet.polls.model.PollsQuestion getPollsQuestionByUuidAndGroupId(
185                    java.lang.String uuid, long groupId)
186                    throws com.liferay.portal.kernel.exception.PortalException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    return _pollsQuestionLocalService.getPollsQuestionByUuidAndGroupId(uuid,
189                            groupId);
190            }
191    
192            /**
193            * Returns a range of all the polls questions.
194            *
195            * <p>
196            * 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.
197            * </p>
198            *
199            * @param start the lower bound of the range of polls questions
200            * @param end the upper bound of the range of polls questions (not inclusive)
201            * @return the range of polls questions
202            * @throws SystemException if a system exception occurred
203            */
204            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
205                    int start, int end)
206                    throws com.liferay.portal.kernel.exception.SystemException {
207                    return _pollsQuestionLocalService.getPollsQuestions(start, end);
208            }
209    
210            /**
211            * Returns the number of polls questions.
212            *
213            * @return the number of polls questions
214            * @throws SystemException if a system exception occurred
215            */
216            public int getPollsQuestionsCount()
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return _pollsQuestionLocalService.getPollsQuestionsCount();
219            }
220    
221            /**
222            * Updates the polls question in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
223            *
224            * @param pollsQuestion the polls question
225            * @return the polls question that was updated
226            * @throws SystemException if a system exception occurred
227            */
228            public com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
229                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return _pollsQuestionLocalService.updatePollsQuestion(pollsQuestion);
232            }
233    
234            /**
235            * Updates the polls question in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
236            *
237            * @param pollsQuestion the polls question
238            * @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.
239            * @return the polls question that was updated
240            * @throws SystemException if a system exception occurred
241            */
242            public com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
243                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
244                    boolean merge)
245                    throws com.liferay.portal.kernel.exception.SystemException {
246                    return _pollsQuestionLocalService.updatePollsQuestion(pollsQuestion,
247                            merge);
248            }
249    
250            /**
251            * Returns the Spring bean ID for this bean.
252            *
253            * @return the Spring bean ID for this bean
254            */
255            public java.lang.String getBeanIdentifier() {
256                    return _pollsQuestionLocalService.getBeanIdentifier();
257            }
258    
259            /**
260            * Sets the Spring bean ID for this bean.
261            *
262            * @param beanIdentifier the Spring bean ID for this bean
263            */
264            public void setBeanIdentifier(java.lang.String beanIdentifier) {
265                    _pollsQuestionLocalService.setBeanIdentifier(beanIdentifier);
266            }
267    
268            public com.liferay.portlet.polls.model.PollsQuestion addQuestion(
269                    long userId,
270                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
271                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
272                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
273                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
274                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
275                    com.liferay.portal.service.ServiceContext serviceContext)
276                    throws com.liferay.portal.kernel.exception.PortalException,
277                            com.liferay.portal.kernel.exception.SystemException {
278                    return _pollsQuestionLocalService.addQuestion(userId, titleMap,
279                            descriptionMap, expirationDateMonth, expirationDateDay,
280                            expirationDateYear, expirationDateHour, expirationDateMinute,
281                            neverExpire, choices, serviceContext);
282            }
283    
284            public void addQuestionResources(long questionId,
285                    boolean addGroupPermissions, boolean addGuestPermissions)
286                    throws com.liferay.portal.kernel.exception.PortalException,
287                            com.liferay.portal.kernel.exception.SystemException {
288                    _pollsQuestionLocalService.addQuestionResources(questionId,
289                            addGroupPermissions, addGuestPermissions);
290            }
291    
292            public void addQuestionResources(long questionId,
293                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
294                    throws com.liferay.portal.kernel.exception.PortalException,
295                            com.liferay.portal.kernel.exception.SystemException {
296                    _pollsQuestionLocalService.addQuestionResources(questionId,
297                            groupPermissions, guestPermissions);
298            }
299    
300            public void addQuestionResources(
301                    com.liferay.portlet.polls.model.PollsQuestion question,
302                    boolean addGroupPermissions, boolean addGuestPermissions)
303                    throws com.liferay.portal.kernel.exception.PortalException,
304                            com.liferay.portal.kernel.exception.SystemException {
305                    _pollsQuestionLocalService.addQuestionResources(question,
306                            addGroupPermissions, addGuestPermissions);
307            }
308    
309            public void addQuestionResources(
310                    com.liferay.portlet.polls.model.PollsQuestion question,
311                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
312                    throws com.liferay.portal.kernel.exception.PortalException,
313                            com.liferay.portal.kernel.exception.SystemException {
314                    _pollsQuestionLocalService.addQuestionResources(question,
315                            groupPermissions, guestPermissions);
316            }
317    
318            public void deleteQuestion(long questionId)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException {
321                    _pollsQuestionLocalService.deleteQuestion(questionId);
322            }
323    
324            public void deleteQuestion(
325                    com.liferay.portlet.polls.model.PollsQuestion question)
326                    throws com.liferay.portal.kernel.exception.PortalException,
327                            com.liferay.portal.kernel.exception.SystemException {
328                    _pollsQuestionLocalService.deleteQuestion(question);
329            }
330    
331            public void deleteQuestions(long groupId)
332                    throws com.liferay.portal.kernel.exception.PortalException,
333                            com.liferay.portal.kernel.exception.SystemException {
334                    _pollsQuestionLocalService.deleteQuestions(groupId);
335            }
336    
337            public com.liferay.portlet.polls.model.PollsQuestion getQuestion(
338                    long questionId)
339                    throws com.liferay.portal.kernel.exception.PortalException,
340                            com.liferay.portal.kernel.exception.SystemException {
341                    return _pollsQuestionLocalService.getQuestion(questionId);
342            }
343    
344            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
345                    long groupId)
346                    throws com.liferay.portal.kernel.exception.SystemException {
347                    return _pollsQuestionLocalService.getQuestions(groupId);
348            }
349    
350            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
351                    long groupId, int start, int end)
352                    throws com.liferay.portal.kernel.exception.SystemException {
353                    return _pollsQuestionLocalService.getQuestions(groupId, start, end);
354            }
355    
356            public int getQuestionsCount(long groupId)
357                    throws com.liferay.portal.kernel.exception.SystemException {
358                    return _pollsQuestionLocalService.getQuestionsCount(groupId);
359            }
360    
361            public com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
362                    long userId, long questionId,
363                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
364                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
365                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
366                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
367                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
368                    com.liferay.portal.service.ServiceContext serviceContext)
369                    throws com.liferay.portal.kernel.exception.PortalException,
370                            com.liferay.portal.kernel.exception.SystemException {
371                    return _pollsQuestionLocalService.updateQuestion(userId, questionId,
372                            titleMap, descriptionMap, expirationDateMonth, expirationDateDay,
373                            expirationDateYear, expirationDateHour, expirationDateMinute,
374                            neverExpire, choices, serviceContext);
375            }
376    
377            public PollsQuestionLocalService getWrappedPollsQuestionLocalService() {
378                    return _pollsQuestionLocalService;
379            }
380    
381            public void setWrappedPollsQuestionLocalService(
382                    PollsQuestionLocalService pollsQuestionLocalService) {
383                    _pollsQuestionLocalService = pollsQuestionLocalService;
384            }
385    
386            private PollsQuestionLocalService _pollsQuestionLocalService;
387    }