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