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            * @throws PortalException if a polls question with the primary key could not be found
065            * @throws SystemException if a system exception occurred
066            */
067            public void deletePollsQuestion(long questionId)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    _pollsQuestionLocalService.deletePollsQuestion(questionId);
071            }
072    
073            /**
074            * Deletes the polls question from the database. Also notifies the appropriate model listeners.
075            *
076            * @param pollsQuestion the polls question
077            * @throws SystemException if a system exception occurred
078            */
079            public void deletePollsQuestion(
080                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
081                    throws com.liferay.portal.kernel.exception.SystemException {
082                    _pollsQuestionLocalService.deletePollsQuestion(pollsQuestion);
083            }
084    
085            /**
086            * Performs a dynamic query on the database and returns the matching rows.
087            *
088            * @param dynamicQuery the dynamic query
089            * @return the matching rows
090            * @throws SystemException if a system exception occurred
091            */
092            @SuppressWarnings("rawtypes")
093            public java.util.List dynamicQuery(
094                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
095                    throws com.liferay.portal.kernel.exception.SystemException {
096                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery);
097            }
098    
099            /**
100            * Performs a dynamic query on the database and returns a range of the matching rows.
101            *
102            * <p>
103            * 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.
104            * </p>
105            *
106            * @param dynamicQuery the dynamic query
107            * @param start the lower bound of the range of model instances
108            * @param end the upper bound of the range of model instances (not inclusive)
109            * @return the range of matching rows
110            * @throws SystemException if a system exception occurred
111            */
112            @SuppressWarnings("rawtypes")
113            public java.util.List dynamicQuery(
114                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
115                    int end) throws com.liferay.portal.kernel.exception.SystemException {
116                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery, start, end);
117            }
118    
119            /**
120            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
121            *
122            * <p>
123            * 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.
124            * </p>
125            *
126            * @param dynamicQuery the dynamic query
127            * @param start the lower bound of the range of model instances
128            * @param end the upper bound of the range of model instances (not inclusive)
129            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
130            * @return the ordered range of matching rows
131            * @throws SystemException if a system exception occurred
132            */
133            @SuppressWarnings("rawtypes")
134            public java.util.List dynamicQuery(
135                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
136                    int end,
137                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
138                    throws com.liferay.portal.kernel.exception.SystemException {
139                    return _pollsQuestionLocalService.dynamicQuery(dynamicQuery, start,
140                            end, orderByComparator);
141            }
142    
143            /**
144            * Returns the number of rows that match the dynamic query.
145            *
146            * @param dynamicQuery the dynamic query
147            * @return the number of rows that match the dynamic query
148            * @throws SystemException if a system exception occurred
149            */
150            public long dynamicQueryCount(
151                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
152                    throws com.liferay.portal.kernel.exception.SystemException {
153                    return _pollsQuestionLocalService.dynamicQueryCount(dynamicQuery);
154            }
155    
156            public com.liferay.portlet.polls.model.PollsQuestion fetchPollsQuestion(
157                    long questionId)
158                    throws com.liferay.portal.kernel.exception.SystemException {
159                    return _pollsQuestionLocalService.fetchPollsQuestion(questionId);
160            }
161    
162            /**
163            * Returns the polls question with the primary key.
164            *
165            * @param questionId the primary key of the polls question
166            * @return the polls question
167            * @throws PortalException if a polls question with the primary key could not be found
168            * @throws SystemException if a system exception occurred
169            */
170            public com.liferay.portlet.polls.model.PollsQuestion getPollsQuestion(
171                    long questionId)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException {
174                    return _pollsQuestionLocalService.getPollsQuestion(questionId);
175            }
176    
177            public com.liferay.portal.model.PersistedModel getPersistedModel(
178                    java.io.Serializable primaryKeyObj)
179                    throws com.liferay.portal.kernel.exception.PortalException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return _pollsQuestionLocalService.getPersistedModel(primaryKeyObj);
182            }
183    
184            /**
185            * Returns the polls question with the UUID in the group.
186            *
187            * @param uuid the UUID of polls question
188            * @param groupId the group id of the polls question
189            * @return the polls question
190            * @throws PortalException if a polls question with the UUID in the group could not be found
191            * @throws SystemException if a system exception occurred
192            */
193            public com.liferay.portlet.polls.model.PollsQuestion getPollsQuestionByUuidAndGroupId(
194                    java.lang.String uuid, long groupId)
195                    throws com.liferay.portal.kernel.exception.PortalException,
196                            com.liferay.portal.kernel.exception.SystemException {
197                    return _pollsQuestionLocalService.getPollsQuestionByUuidAndGroupId(uuid,
198                            groupId);
199            }
200    
201            /**
202            * Returns a range of all the polls questions.
203            *
204            * <p>
205            * 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.
206            * </p>
207            *
208            * @param start the lower bound of the range of polls questions
209            * @param end the upper bound of the range of polls questions (not inclusive)
210            * @return the range of polls questions
211            * @throws SystemException if a system exception occurred
212            */
213            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getPollsQuestions(
214                    int start, int end)
215                    throws com.liferay.portal.kernel.exception.SystemException {
216                    return _pollsQuestionLocalService.getPollsQuestions(start, end);
217            }
218    
219            /**
220            * Returns the number of polls questions.
221            *
222            * @return the number of polls questions
223            * @throws SystemException if a system exception occurred
224            */
225            public int getPollsQuestionsCount()
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return _pollsQuestionLocalService.getPollsQuestionsCount();
228            }
229    
230            /**
231            * Updates the polls question in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
232            *
233            * @param pollsQuestion the polls question
234            * @return the polls question that was updated
235            * @throws SystemException if a system exception occurred
236            */
237            public com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
238                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
239                    throws com.liferay.portal.kernel.exception.SystemException {
240                    return _pollsQuestionLocalService.updatePollsQuestion(pollsQuestion);
241            }
242    
243            /**
244            * Updates the polls question in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
245            *
246            * @param pollsQuestion the polls question
247            * @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.
248            * @return the polls question that was updated
249            * @throws SystemException if a system exception occurred
250            */
251            public com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
252                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
253                    boolean merge)
254                    throws com.liferay.portal.kernel.exception.SystemException {
255                    return _pollsQuestionLocalService.updatePollsQuestion(pollsQuestion,
256                            merge);
257            }
258    
259            /**
260            * Returns the Spring bean ID for this bean.
261            *
262            * @return the Spring bean ID for this bean
263            */
264            public java.lang.String getBeanIdentifier() {
265                    return _pollsQuestionLocalService.getBeanIdentifier();
266            }
267    
268            /**
269            * Sets the Spring bean ID for this bean.
270            *
271            * @param beanIdentifier the Spring bean ID for this bean
272            */
273            public void setBeanIdentifier(java.lang.String beanIdentifier) {
274                    _pollsQuestionLocalService.setBeanIdentifier(beanIdentifier);
275            }
276    
277            public com.liferay.portlet.polls.model.PollsQuestion addQuestion(
278                    long userId,
279                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
280                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
281                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
282                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
283                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
284                    com.liferay.portal.service.ServiceContext serviceContext)
285                    throws com.liferay.portal.kernel.exception.PortalException,
286                            com.liferay.portal.kernel.exception.SystemException {
287                    return _pollsQuestionLocalService.addQuestion(userId, titleMap,
288                            descriptionMap, expirationDateMonth, expirationDateDay,
289                            expirationDateYear, expirationDateHour, expirationDateMinute,
290                            neverExpire, choices, serviceContext);
291            }
292    
293            public void addQuestionResources(long questionId,
294                    boolean addGroupPermissions, boolean addGuestPermissions)
295                    throws com.liferay.portal.kernel.exception.PortalException,
296                            com.liferay.portal.kernel.exception.SystemException {
297                    _pollsQuestionLocalService.addQuestionResources(questionId,
298                            addGroupPermissions, addGuestPermissions);
299            }
300    
301            public void addQuestionResources(long questionId,
302                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
303                    throws com.liferay.portal.kernel.exception.PortalException,
304                            com.liferay.portal.kernel.exception.SystemException {
305                    _pollsQuestionLocalService.addQuestionResources(questionId,
306                            groupPermissions, guestPermissions);
307            }
308    
309            public void addQuestionResources(
310                    com.liferay.portlet.polls.model.PollsQuestion question,
311                    boolean addGroupPermissions, boolean addGuestPermissions)
312                    throws com.liferay.portal.kernel.exception.PortalException,
313                            com.liferay.portal.kernel.exception.SystemException {
314                    _pollsQuestionLocalService.addQuestionResources(question,
315                            addGroupPermissions, addGuestPermissions);
316            }
317    
318            public void addQuestionResources(
319                    com.liferay.portlet.polls.model.PollsQuestion question,
320                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
321                    throws com.liferay.portal.kernel.exception.PortalException,
322                            com.liferay.portal.kernel.exception.SystemException {
323                    _pollsQuestionLocalService.addQuestionResources(question,
324                            groupPermissions, guestPermissions);
325            }
326    
327            public void deleteQuestion(long questionId)
328                    throws com.liferay.portal.kernel.exception.PortalException,
329                            com.liferay.portal.kernel.exception.SystemException {
330                    _pollsQuestionLocalService.deleteQuestion(questionId);
331            }
332    
333            public void deleteQuestion(
334                    com.liferay.portlet.polls.model.PollsQuestion question)
335                    throws com.liferay.portal.kernel.exception.PortalException,
336                            com.liferay.portal.kernel.exception.SystemException {
337                    _pollsQuestionLocalService.deleteQuestion(question);
338            }
339    
340            public void deleteQuestions(long groupId)
341                    throws com.liferay.portal.kernel.exception.PortalException,
342                            com.liferay.portal.kernel.exception.SystemException {
343                    _pollsQuestionLocalService.deleteQuestions(groupId);
344            }
345    
346            public com.liferay.portlet.polls.model.PollsQuestion getQuestion(
347                    long questionId)
348                    throws com.liferay.portal.kernel.exception.PortalException,
349                            com.liferay.portal.kernel.exception.SystemException {
350                    return _pollsQuestionLocalService.getQuestion(questionId);
351            }
352    
353            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
354                    long groupId)
355                    throws com.liferay.portal.kernel.exception.SystemException {
356                    return _pollsQuestionLocalService.getQuestions(groupId);
357            }
358    
359            public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
360                    long groupId, int start, int end)
361                    throws com.liferay.portal.kernel.exception.SystemException {
362                    return _pollsQuestionLocalService.getQuestions(groupId, start, end);
363            }
364    
365            public int getQuestionsCount(long groupId)
366                    throws com.liferay.portal.kernel.exception.SystemException {
367                    return _pollsQuestionLocalService.getQuestionsCount(groupId);
368            }
369    
370            public com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
371                    long userId, long questionId,
372                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
373                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
374                    int expirationDateMonth, int expirationDateDay, int expirationDateYear,
375                    int expirationDateHour, int expirationDateMinute, boolean neverExpire,
376                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
377                    com.liferay.portal.service.ServiceContext serviceContext)
378                    throws com.liferay.portal.kernel.exception.PortalException,
379                            com.liferay.portal.kernel.exception.SystemException {
380                    return _pollsQuestionLocalService.updateQuestion(userId, questionId,
381                            titleMap, descriptionMap, expirationDateMonth, expirationDateDay,
382                            expirationDateYear, expirationDateHour, expirationDateMinute,
383                            neverExpire, choices, serviceContext);
384            }
385    
386            /**
387             * @deprecated Renamed to {@link #getWrappedService}
388             */
389            public PollsQuestionLocalService getWrappedPollsQuestionLocalService() {
390                    return _pollsQuestionLocalService;
391            }
392    
393            /**
394             * @deprecated Renamed to {@link #setWrappedService}
395             */
396            public void setWrappedPollsQuestionLocalService(
397                    PollsQuestionLocalService pollsQuestionLocalService) {
398                    _pollsQuestionLocalService = pollsQuestionLocalService;
399            }
400    
401            public PollsQuestionLocalService getWrappedService() {
402                    return _pollsQuestionLocalService;
403            }
404    
405            public void setWrappedService(
406                    PollsQuestionLocalService pollsQuestionLocalService) {
407                    _pollsQuestionLocalService = pollsQuestionLocalService;
408            }
409    
410            private PollsQuestionLocalService _pollsQuestionLocalService;
411    }