001    /**
002     * Copyright (c) 2000-2013 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    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.service.ServiceWrapper;
020    
021    /**
022     * Provides a wrapper for {@link PollsQuestionLocalService}.
023     *
024     * @author Brian Wing Shun Chan
025     * @see PollsQuestionLocalService
026     * @generated
027     */
028    @ProviderType
029    public class PollsQuestionLocalServiceWrapper
030            implements PollsQuestionLocalService,
031                    ServiceWrapper<PollsQuestionLocalService> {
032            public PollsQuestionLocalServiceWrapper(
033                    PollsQuestionLocalService pollsQuestionLocalService) {
034                    _pollsQuestionLocalService = pollsQuestionLocalService;
035            }
036    
037            /**
038            * Adds the polls question to the database. Also notifies the appropriate model listeners.
039            *
040            * @param pollsQuestion the polls question
041            * @return the polls question that was added
042            * @throws SystemException if a system exception occurred
043            */
044            @Override
045            public com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
046                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
047                    throws com.liferay.portal.kernel.exception.SystemException {
048                    return _pollsQuestionLocalService.addPollsQuestion(pollsQuestion);
049            }
050    
051            /**
052            * Creates a new polls question with the primary key. Does not add the polls question to the database.
053            *
054            * @param questionId the primary key for the new polls question
055            * @return the new polls question
056            */
057            @Override
058            public com.liferay.portlet.polls.model.PollsQuestion createPollsQuestion(
059                    long questionId) {
060                    return _pollsQuestionLocalService.createPollsQuestion(questionId);
061            }
062    
063            /**
064            * Deletes the polls question with the primary key from the database. Also notifies the appropriate model listeners.
065            *
066            * @param questionId the primary key of the polls question
067            * @return the polls question that was removed
068            * @throws PortalException if a polls question with the primary key could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            @Override
072            public com.liferay.portlet.polls.model.PollsQuestion deletePollsQuestion(
073                    long questionId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return _pollsQuestionLocalService.deletePollsQuestion(questionId);
077            }
078    
079            /**
080            * Deletes the polls question from the database. Also notifies the appropriate model listeners.
081            *
082            * @param pollsQuestion the polls question
083            * @return the polls question that was removed
084            * @throws SystemException if a system exception occurred
085            */
086            @Override
087            public com.liferay.portlet.polls.model.PollsQuestion deletePollsQuestion(
088                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
089                    throws com.liferay.portal.kernel.exception.SystemException {
090                    return _pollsQuestionLocalService.deletePollsQuestion(pollsQuestion);
091            }
092    
093            @Override
094            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
095                    return _pollsQuestionLocalService.dynamicQuery();
096            }
097    
098            /**
099            * Performs a dynamic query on the database and returns the matching rows.
100            *
101            * @param dynamicQuery the dynamic query
102            * @return the matching rows
103            * @throws SystemException if a system exception occurred
104            */
105            @Override
106            @SuppressWarnings("rawtypes")
107            public java.util.List dynamicQuery(
108                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
109                    throws com.liferay.portal.kernel.exception.SystemException {
110                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery);
111            }
112    
113            /**
114            * Performs a dynamic query on the database and returns a range of the matching rows.
115            *
116            * <p>
117            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.polls.model.impl.PollsQuestionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
118            * </p>
119            *
120            * @param dynamicQuery the dynamic query
121            * @param start the lower bound of the range of model instances
122            * @param end the upper bound of the range of model instances (not inclusive)
123            * @return the range of matching rows
124            * @throws SystemException if a system exception occurred
125            */
126            @Override
127            @SuppressWarnings("rawtypes")
128            public java.util.List dynamicQuery(
129                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
130                    int end) throws com.liferay.portal.kernel.exception.SystemException {
131                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery, start, end);
132            }
133    
134            /**
135            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
136            *
137            * <p>
138            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.polls.model.impl.PollsQuestionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
139            * </p>
140            *
141            * @param dynamicQuery the dynamic query
142            * @param start the lower bound of the range of model instances
143            * @param end the upper bound of the range of model instances (not inclusive)
144            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
145            * @return the ordered range of matching rows
146            * @throws SystemException if a system exception occurred
147            */
148            @Override
149            @SuppressWarnings("rawtypes")
150            public java.util.List dynamicQuery(
151                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
152                    int end,
153                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
154                    throws com.liferay.portal.kernel.exception.SystemException {
155                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery, start,
156                            end, orderByComparator);
157            }
158    
159            /**
160            * Returns the number of rows that match the dynamic query.
161            *
162            * @param dynamicQuery the dynamic query
163            * @return the number of rows that match the dynamic query
164            * @throws SystemException if a system exception occurred
165            */
166            @Override
167            public long dynamicQueryCount(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
169                    throws com.liferay.portal.kernel.exception.SystemException {
170                    return _pollsQuestionLocalService.dynamicQueryCount(dynamicQuery);
171            }
172    
173            /**
174            * Returns the number of rows that match the dynamic query.
175            *
176            * @param dynamicQuery the dynamic query
177            * @param projection the projection to apply to the query
178            * @return the number of rows that match the dynamic query
179            * @throws SystemException if a system exception occurred
180            */
181            @Override
182            public long dynamicQueryCount(
183                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
184                    com.liferay.portal.kernel.dao.orm.Projection projection)
185                    throws com.liferay.portal.kernel.exception.SystemException {
186                    return _pollsQuestionLocalService.dynamicQueryCount(dynamicQuery,
187                            projection);
188            }
189    
190            @Override
191            public com.liferay.portlet.polls.model.PollsQuestion fetchPollsQuestion(
192                    long questionId)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return _pollsQuestionLocalService.fetchPollsQuestion(questionId);
195            }
196    
197            /**
198            * Returns the polls question with the matching UUID and company.
199            *
200            * @param uuid the polls question's UUID
201            * @param companyId the primary key of the company
202            * @return the matching polls question, or <code>null</code> if a matching polls question could not be found
203            * @throws SystemException if a system exception occurred
204            */
205            @Override
206            public com.liferay.portlet.polls.model.PollsQuestion fetchPollsQuestionByUuidAndCompanyId(
207                    java.lang.String uuid, long companyId)
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    return _pollsQuestionLocalService.fetchPollsQuestionByUuidAndCompanyId(uuid,
210                            companyId);
211            }
212    
213            /**
214            * Returns the polls question matching the UUID and group.
215            *
216            * @param uuid the polls question's UUID
217            * @param groupId the primary key of the group
218            * @return the matching polls question, or <code>null</code> if a matching polls question could not be found
219            * @throws SystemException if a system exception occurred
220            */
221            @Override
222            public com.liferay.portlet.polls.model.PollsQuestion fetchPollsQuestionByUuidAndGroupId(
223                    java.lang.String uuid, long groupId)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return _pollsQuestionLocalService.fetchPollsQuestionByUuidAndGroupId(uuid,
226                            groupId);
227            }
228    
229            /**
230            * Returns the polls question with the primary key.
231            *
232            * @param questionId the primary key of the polls question
233            * @return the polls question
234            * @throws PortalException if a polls question with the primary key could not be found
235            * @throws SystemException if a system exception occurred
236            */
237            @Override
238            public com.liferay.portlet.polls.model.PollsQuestion getPollsQuestion(
239                    long questionId)
240                    throws com.liferay.portal.kernel.exception.PortalException,
241                            com.liferay.portal.kernel.exception.SystemException {
242                    return _pollsQuestionLocalService.getPollsQuestion(questionId);
243            }
244    
245            @Override
246            public com.liferay.portal.model.PersistedModel getPersistedModel(
247                    java.io.Serializable primaryKeyObj)
248                    throws com.liferay.portal.kernel.exception.PortalException,
249                            com.liferay.portal.kernel.exception.SystemException {
250                    return _pollsQuestionLocalService.getPersistedModel(primaryKeyObj);
251            }
252    
253            /**
254            * Returns the polls question with the matching UUID and company.
255            *
256            * @param uuid the polls question's UUID
257            * @param companyId the primary key of the company
258            * @return the matching polls question
259            * @throws PortalException if a matching polls question could not be found
260            * @throws SystemException if a system exception occurred
261            */
262            @Override
263            public com.liferay.portlet.polls.model.PollsQuestion getPollsQuestionByUuidAndCompanyId(
264                    java.lang.String uuid, long companyId)
265                    throws com.liferay.portal.kernel.exception.PortalException,
266                            com.liferay.portal.kernel.exception.SystemException {
267                    return _pollsQuestionLocalService.getPollsQuestionByUuidAndCompanyId(uuid,
268                            companyId);
269            }
270    
271            /**
272            * Returns the polls question matching the UUID and group.
273            *
274            * @param uuid the polls question's UUID
275            * @param groupId the primary key of the group
276            * @return the matching polls question
277            * @throws PortalException if a matching polls question could not be found
278            * @throws SystemException if a system exception occurred
279            */
280            @Override
281            public com.liferay.portlet.polls.model.PollsQuestion getPollsQuestionByUuidAndGroupId(
282                    java.lang.String uuid, long groupId)
283                    throws com.liferay.portal.kernel.exception.PortalException,
284                            com.liferay.portal.kernel.exception.SystemException {
285                    return _pollsQuestionLocalService.getPollsQuestionByUuidAndGroupId(uuid,
286                            groupId);
287            }
288    
289            /**
290            * Returns a range of all the polls questions.
291            *
292            * <p>
293            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.polls.model.impl.PollsQuestionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
294            * </p>
295            *
296            * @param start the lower bound of the range of polls questions
297            * @param end the upper bound of the range of polls questions (not inclusive)
298            * @return the range of polls questions
299            * @throws SystemException if a system exception occurred
300            */
301            @Override
302            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
303                    int start, int end)
304                    throws com.liferay.portal.kernel.exception.SystemException {
305                    return _pollsQuestionLocalService.getPollsQuestions(start, end);
306            }
307    
308            /**
309            * Returns the number of polls questions.
310            *
311            * @return the number of polls questions
312            * @throws SystemException if a system exception occurred
313            */
314            @Override
315            public int getPollsQuestionsCount()
316                    throws com.liferay.portal.kernel.exception.SystemException {
317                    return _pollsQuestionLocalService.getPollsQuestionsCount();
318            }
319    
320            /**
321            * Updates the polls question in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
322            *
323            * @param pollsQuestion the polls question
324            * @return the polls question that was updated
325            * @throws SystemException if a system exception occurred
326            */
327            @Override
328            public com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
329                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
330                    throws com.liferay.portal.kernel.exception.SystemException {
331                    return _pollsQuestionLocalService.updatePollsQuestion(pollsQuestion);
332            }
333    
334            /**
335            * Returns the Spring bean ID for this bean.
336            *
337            * @return the Spring bean ID for this bean
338            */
339            @Override
340            public java.lang.String getBeanIdentifier() {
341                    return _pollsQuestionLocalService.getBeanIdentifier();
342            }
343    
344            /**
345            * Sets the Spring bean ID for this bean.
346            *
347            * @param beanIdentifier the Spring bean ID for this bean
348            */
349            @Override
350            public void setBeanIdentifier(java.lang.String beanIdentifier) {
351                    _pollsQuestionLocalService.setBeanIdentifier(beanIdentifier);
352            }
353    
354            @Override
355            public com.liferay.portlet.polls.model.PollsQuestion addQuestion(
356                    long userId,
357                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
358                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
359                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
360                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
361                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
362                    com.liferay.portal.service.ServiceContext serviceContext)
363                    throws com.liferay.portal.kernel.exception.PortalException,
364                            com.liferay.portal.kernel.exception.SystemException {
365                    return _pollsQuestionLocalService.addQuestion(userId, titleMap,
366                            descriptionMap, expirationDateMonth, expirationDateDay,
367                            expirationDateYear, expirationDateHour, expirationDateMinute,
368                            neverExpire, choices, serviceContext);
369            }
370    
371            @Override
372            public void addQuestionResources(long questionId,
373                    boolean addGroupPermissions, boolean addGuestPermissions)
374                    throws com.liferay.portal.kernel.exception.PortalException,
375                            com.liferay.portal.kernel.exception.SystemException {
376                    _pollsQuestionLocalService.addQuestionResources(questionId,
377                            addGroupPermissions, addGuestPermissions);
378            }
379    
380            @Override
381            public void addQuestionResources(long questionId,
382                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
383                    throws com.liferay.portal.kernel.exception.PortalException,
384                            com.liferay.portal.kernel.exception.SystemException {
385                    _pollsQuestionLocalService.addQuestionResources(questionId,
386                            groupPermissions, guestPermissions);
387            }
388    
389            @Override
390            public void addQuestionResources(
391                    com.liferay.portlet.polls.model.PollsQuestion question,
392                    boolean addGroupPermissions, boolean addGuestPermissions)
393                    throws com.liferay.portal.kernel.exception.PortalException,
394                            com.liferay.portal.kernel.exception.SystemException {
395                    _pollsQuestionLocalService.addQuestionResources(question,
396                            addGroupPermissions, addGuestPermissions);
397            }
398    
399            @Override
400            public void addQuestionResources(
401                    com.liferay.portlet.polls.model.PollsQuestion question,
402                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
403                    throws com.liferay.portal.kernel.exception.PortalException,
404                            com.liferay.portal.kernel.exception.SystemException {
405                    _pollsQuestionLocalService.addQuestionResources(question,
406                            groupPermissions, guestPermissions);
407            }
408    
409            @Override
410            public void deleteQuestion(long questionId)
411                    throws com.liferay.portal.kernel.exception.PortalException,
412                            com.liferay.portal.kernel.exception.SystemException {
413                    _pollsQuestionLocalService.deleteQuestion(questionId);
414            }
415    
416            @Override
417            public void deleteQuestion(
418                    com.liferay.portlet.polls.model.PollsQuestion question)
419                    throws com.liferay.portal.kernel.exception.PortalException,
420                            com.liferay.portal.kernel.exception.SystemException {
421                    _pollsQuestionLocalService.deleteQuestion(question);
422            }
423    
424            @Override
425            public void deleteQuestions(long groupId)
426                    throws com.liferay.portal.kernel.exception.PortalException,
427                            com.liferay.portal.kernel.exception.SystemException {
428                    _pollsQuestionLocalService.deleteQuestions(groupId);
429            }
430    
431            @Override
432            public com.liferay.portlet.polls.model.PollsQuestion getQuestion(
433                    long questionId)
434                    throws com.liferay.portal.kernel.exception.PortalException,
435                            com.liferay.portal.kernel.exception.SystemException {
436                    return _pollsQuestionLocalService.getQuestion(questionId);
437            }
438    
439            @Override
440            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
441                    long groupId)
442                    throws com.liferay.portal.kernel.exception.SystemException {
443                    return _pollsQuestionLocalService.getQuestions(groupId);
444            }
445    
446            @Override
447            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
448                    long groupId, int start, int end)
449                    throws com.liferay.portal.kernel.exception.SystemException {
450                    return _pollsQuestionLocalService.getQuestions(groupId, start, end);
451            }
452    
453            @Override
454            public int getQuestionsCount(long groupId)
455                    throws com.liferay.portal.kernel.exception.SystemException {
456                    return _pollsQuestionLocalService.getQuestionsCount(groupId);
457            }
458    
459            @Override
460            public com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
461                    long userId, long questionId,
462                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
463                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
464                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
465                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
466                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
467                    com.liferay.portal.service.ServiceContext serviceContext)
468                    throws com.liferay.portal.kernel.exception.PortalException,
469                            com.liferay.portal.kernel.exception.SystemException {
470                    return _pollsQuestionLocalService.updateQuestion(userId, questionId,
471                            titleMap, descriptionMap, expirationDateMonth, expirationDateDay,
472                            expirationDateYear, expirationDateHour, expirationDateMinute,
473                            neverExpire, choices, serviceContext);
474            }
475    
476            /**
477             * @deprecated As of 6.1.0, replaced by {@link #getWrappedService}
478             */
479            public PollsQuestionLocalService getWrappedPollsQuestionLocalService() {
480                    return _pollsQuestionLocalService;
481            }
482    
483            /**
484             * @deprecated As of 6.1.0, replaced by {@link #setWrappedService}
485             */
486            public void setWrappedPollsQuestionLocalService(
487                    PollsQuestionLocalService pollsQuestionLocalService) {
488                    _pollsQuestionLocalService = pollsQuestionLocalService;
489            }
490    
491            @Override
492            public PollsQuestionLocalService getWrappedService() {
493                    return _pollsQuestionLocalService;
494            }
495    
496            @Override
497            public void setWrappedService(
498                    PollsQuestionLocalService pollsQuestionLocalService) {
499                    _pollsQuestionLocalService = pollsQuestionLocalService;
500            }
501    
502            private PollsQuestionLocalService _pollsQuestionLocalService;
503    }