001    /**
002     * Copyright (c) 2000-2012 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     * <p>
021     * This class is a wrapper for {@link PollsQuestionLocalService}.
022     * </p>
023     *
024     * @author    Brian Wing Shun Chan
025     * @see       PollsQuestionLocalService
026     * @generated
027     */
028    public class PollsQuestionLocalServiceWrapper
029            implements PollsQuestionLocalService,
030                    ServiceWrapper<PollsQuestionLocalService> {
031            public PollsQuestionLocalServiceWrapper(
032                    PollsQuestionLocalService pollsQuestionLocalService) {
033                    _pollsQuestionLocalService = pollsQuestionLocalService;
034            }
035    
036            /**
037            * Adds the polls question to the database. Also notifies the appropriate model listeners.
038            *
039            * @param pollsQuestion the polls question
040            * @return the polls question that was added
041            * @throws SystemException if a system exception occurred
042            */
043            public com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
044                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
045                    throws com.liferay.portal.kernel.exception.SystemException {
046                    return _pollsQuestionLocalService.addPollsQuestion(pollsQuestion);
047            }
048    
049            /**
050            * Creates a new polls question with the primary key. Does not add the polls question to the database.
051            *
052            * @param questionId the primary key for the new polls question
053            * @return the new polls question
054            */
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            public com.liferay.portlet.polls.model.PollsQuestion deletePollsQuestion(
069                    long questionId)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException {
072                    return _pollsQuestionLocalService.deletePollsQuestion(questionId);
073            }
074    
075            /**
076            * Deletes the polls question from the database. Also notifies the appropriate model listeners.
077            *
078            * @param pollsQuestion the polls question
079            * @return the polls question that was removed
080            * @throws SystemException if a system exception occurred
081            */
082            public com.liferay.portlet.polls.model.PollsQuestion deletePollsQuestion(
083                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
084                    throws com.liferay.portal.kernel.exception.SystemException {
085                    return _pollsQuestionLocalService.deletePollsQuestion(pollsQuestion);
086            }
087    
088            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
089                    return _pollsQuestionLocalService.dynamicQuery();
090            }
091    
092            /**
093            * Performs a dynamic query on the database and returns the matching rows.
094            *
095            * @param dynamicQuery the dynamic query
096            * @return the matching rows
097            * @throws SystemException if a system exception occurred
098            */
099            @SuppressWarnings("rawtypes")
100            public java.util.List dynamicQuery(
101                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery);
104            }
105    
106            /**
107            * Performs a dynamic query on the database and returns a range of the matching rows.
108            *
109            * <p>
110            * 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.
111            * </p>
112            *
113            * @param dynamicQuery the dynamic query
114            * @param start the lower bound of the range of model instances
115            * @param end the upper bound of the range of model instances (not inclusive)
116            * @return the range of matching rows
117            * @throws SystemException if a system exception occurred
118            */
119            @SuppressWarnings("rawtypes")
120            public java.util.List dynamicQuery(
121                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
122                    int end) throws com.liferay.portal.kernel.exception.SystemException {
123                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery, start, end);
124            }
125    
126            /**
127            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
128            *
129            * <p>
130            * 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.
131            * </p>
132            *
133            * @param dynamicQuery the dynamic query
134            * @param start the lower bound of the range of model instances
135            * @param end the upper bound of the range of model instances (not inclusive)
136            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
137            * @return the ordered range of matching rows
138            * @throws SystemException if a system exception occurred
139            */
140            @SuppressWarnings("rawtypes")
141            public java.util.List dynamicQuery(
142                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
143                    int end,
144                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
145                    throws com.liferay.portal.kernel.exception.SystemException {
146                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery, start,
147                            end, orderByComparator);
148            }
149    
150            /**
151            * Returns the number of rows that match the dynamic query.
152            *
153            * @param dynamicQuery the dynamic query
154            * @return the number of rows that match the dynamic query
155            * @throws SystemException if a system exception occurred
156            */
157            public long dynamicQueryCount(
158                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
159                    throws com.liferay.portal.kernel.exception.SystemException {
160                    return _pollsQuestionLocalService.dynamicQueryCount(dynamicQuery);
161            }
162    
163            public com.liferay.portlet.polls.model.PollsQuestion fetchPollsQuestion(
164                    long questionId)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return _pollsQuestionLocalService.fetchPollsQuestion(questionId);
167            }
168    
169            /**
170            * Returns the polls question with the primary key.
171            *
172            * @param questionId the primary key of the polls question
173            * @return the polls question
174            * @throws PortalException if a polls question with the primary key could not be found
175            * @throws SystemException if a system exception occurred
176            */
177            public com.liferay.portlet.polls.model.PollsQuestion getPollsQuestion(
178                    long questionId)
179                    throws com.liferay.portal.kernel.exception.PortalException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return _pollsQuestionLocalService.getPollsQuestion(questionId);
182            }
183    
184            public com.liferay.portal.model.PersistedModel getPersistedModel(
185                    java.io.Serializable primaryKeyObj)
186                    throws com.liferay.portal.kernel.exception.PortalException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    return _pollsQuestionLocalService.getPersistedModel(primaryKeyObj);
189            }
190    
191            /**
192            * Returns the polls question with the UUID in the group.
193            *
194            * @param uuid the UUID of polls question
195            * @param groupId the group id of the polls question
196            * @return the polls question
197            * @throws PortalException if a polls question with the UUID in the group could not be found
198            * @throws SystemException if a system exception occurred
199            */
200            public com.liferay.portlet.polls.model.PollsQuestion getPollsQuestionByUuidAndGroupId(
201                    java.lang.String uuid, long groupId)
202                    throws com.liferay.portal.kernel.exception.PortalException,
203                            com.liferay.portal.kernel.exception.SystemException {
204                    return _pollsQuestionLocalService.getPollsQuestionByUuidAndGroupId(uuid,
205                            groupId);
206            }
207    
208            /**
209            * Returns a range of all the polls questions.
210            *
211            * <p>
212            * 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.
213            * </p>
214            *
215            * @param start the lower bound of the range of polls questions
216            * @param end the upper bound of the range of polls questions (not inclusive)
217            * @return the range of polls questions
218            * @throws SystemException if a system exception occurred
219            */
220            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
221                    int start, int end)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return _pollsQuestionLocalService.getPollsQuestions(start, end);
224            }
225    
226            /**
227            * Returns the number of polls questions.
228            *
229            * @return the number of polls questions
230            * @throws SystemException if a system exception occurred
231            */
232            public int getPollsQuestionsCount()
233                    throws com.liferay.portal.kernel.exception.SystemException {
234                    return _pollsQuestionLocalService.getPollsQuestionsCount();
235            }
236    
237            /**
238            * Updates the polls question in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
239            *
240            * @param pollsQuestion the polls question
241            * @return the polls question that was updated
242            * @throws SystemException if a system exception occurred
243            */
244            public com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
245                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return _pollsQuestionLocalService.updatePollsQuestion(pollsQuestion);
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            /**
378             * @deprecated Renamed to {@link #getWrappedService}
379             */
380            public PollsQuestionLocalService getWrappedPollsQuestionLocalService() {
381                    return _pollsQuestionLocalService;
382            }
383    
384            /**
385             * @deprecated Renamed to {@link #setWrappedService}
386             */
387            public void setWrappedPollsQuestionLocalService(
388                    PollsQuestionLocalService pollsQuestionLocalService) {
389                    _pollsQuestionLocalService = pollsQuestionLocalService;
390            }
391    
392            public PollsQuestionLocalService getWrappedService() {
393                    return _pollsQuestionLocalService;
394            }
395    
396            public void setWrappedService(
397                    PollsQuestionLocalService pollsQuestionLocalService) {
398                    _pollsQuestionLocalService = pollsQuestionLocalService;
399            }
400    
401            private PollsQuestionLocalService _pollsQuestionLocalService;
402    }