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     * <p>
021     * This class is a wrapper for {@link PollsVoteLocalService}.
022     * </p>
023     *
024     * @author    Brian Wing Shun Chan
025     * @see       PollsVoteLocalService
026     * @generated
027     */
028    public class PollsVoteLocalServiceWrapper implements PollsVoteLocalService,
029            ServiceWrapper<PollsVoteLocalService> {
030            public PollsVoteLocalServiceWrapper(
031                    PollsVoteLocalService pollsVoteLocalService) {
032                    _pollsVoteLocalService = pollsVoteLocalService;
033            }
034    
035            /**
036            * Adds the polls vote to the database. Also notifies the appropriate model listeners.
037            *
038            * @param pollsVote the polls vote
039            * @return the polls vote that was added
040            * @throws SystemException if a system exception occurred
041            */
042            public com.liferay.portlet.polls.model.PollsVote addPollsVote(
043                    com.liferay.portlet.polls.model.PollsVote pollsVote)
044                    throws com.liferay.portal.kernel.exception.SystemException {
045                    return _pollsVoteLocalService.addPollsVote(pollsVote);
046            }
047    
048            /**
049            * Creates a new polls vote with the primary key. Does not add the polls vote to the database.
050            *
051            * @param voteId the primary key for the new polls vote
052            * @return the new polls vote
053            */
054            public com.liferay.portlet.polls.model.PollsVote createPollsVote(
055                    long voteId) {
056                    return _pollsVoteLocalService.createPollsVote(voteId);
057            }
058    
059            /**
060            * Deletes the polls vote with the primary key from the database. Also notifies the appropriate model listeners.
061            *
062            * @param voteId the primary key of the polls vote
063            * @return the polls vote that was removed
064            * @throws PortalException if a polls vote with the primary key could not be found
065            * @throws SystemException if a system exception occurred
066            */
067            public com.liferay.portlet.polls.model.PollsVote deletePollsVote(
068                    long voteId)
069                    throws com.liferay.portal.kernel.exception.PortalException,
070                            com.liferay.portal.kernel.exception.SystemException {
071                    return _pollsVoteLocalService.deletePollsVote(voteId);
072            }
073    
074            /**
075            * Deletes the polls vote from the database. Also notifies the appropriate model listeners.
076            *
077            * @param pollsVote the polls vote
078            * @return the polls vote that was removed
079            * @throws SystemException if a system exception occurred
080            */
081            public com.liferay.portlet.polls.model.PollsVote deletePollsVote(
082                    com.liferay.portlet.polls.model.PollsVote pollsVote)
083                    throws com.liferay.portal.kernel.exception.SystemException {
084                    return _pollsVoteLocalService.deletePollsVote(pollsVote);
085            }
086    
087            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
088                    return _pollsVoteLocalService.dynamicQuery();
089            }
090    
091            /**
092            * Performs a dynamic query on the database and returns the matching rows.
093            *
094            * @param dynamicQuery the dynamic query
095            * @return the matching rows
096            * @throws SystemException if a system exception occurred
097            */
098            @SuppressWarnings("rawtypes")
099            public java.util.List dynamicQuery(
100                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
101                    throws com.liferay.portal.kernel.exception.SystemException {
102                    return _pollsVoteLocalService.dynamicQuery(dynamicQuery);
103            }
104    
105            /**
106            * Performs a dynamic query on the database and returns a range of the matching rows.
107            *
108            * <p>
109            * 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.
110            * </p>
111            *
112            * @param dynamicQuery the dynamic query
113            * @param start the lower bound of the range of model instances
114            * @param end the upper bound of the range of model instances (not inclusive)
115            * @return the range of matching rows
116            * @throws SystemException if a system exception occurred
117            */
118            @SuppressWarnings("rawtypes")
119            public java.util.List dynamicQuery(
120                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
121                    int end) throws com.liferay.portal.kernel.exception.SystemException {
122                    return _pollsVoteLocalService.dynamicQuery(dynamicQuery, start, end);
123            }
124    
125            /**
126            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
127            *
128            * <p>
129            * 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.
130            * </p>
131            *
132            * @param dynamicQuery the dynamic query
133            * @param start the lower bound of the range of model instances
134            * @param end the upper bound of the range of model instances (not inclusive)
135            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
136            * @return the ordered range of matching rows
137            * @throws SystemException if a system exception occurred
138            */
139            @SuppressWarnings("rawtypes")
140            public java.util.List dynamicQuery(
141                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
142                    int end,
143                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return _pollsVoteLocalService.dynamicQuery(dynamicQuery, start, end,
146                            orderByComparator);
147            }
148    
149            /**
150            * Returns the number of rows that match the dynamic query.
151            *
152            * @param dynamicQuery the dynamic query
153            * @return the number of rows that match the dynamic query
154            * @throws SystemException if a system exception occurred
155            */
156            public long dynamicQueryCount(
157                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
158                    throws com.liferay.portal.kernel.exception.SystemException {
159                    return _pollsVoteLocalService.dynamicQueryCount(dynamicQuery);
160            }
161    
162            public com.liferay.portlet.polls.model.PollsVote fetchPollsVote(long voteId)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return _pollsVoteLocalService.fetchPollsVote(voteId);
165            }
166    
167            /**
168            * Returns the polls vote with the primary key.
169            *
170            * @param voteId the primary key of the polls vote
171            * @return the polls vote
172            * @throws PortalException if a polls vote with the primary key could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public com.liferay.portlet.polls.model.PollsVote getPollsVote(long voteId)
176                    throws com.liferay.portal.kernel.exception.PortalException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    return _pollsVoteLocalService.getPollsVote(voteId);
179            }
180    
181            public com.liferay.portal.model.PersistedModel getPersistedModel(
182                    java.io.Serializable primaryKeyObj)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException {
185                    return _pollsVoteLocalService.getPersistedModel(primaryKeyObj);
186            }
187    
188            /**
189            * Returns a range of all the polls votes.
190            *
191            * <p>
192            * 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.
193            * </p>
194            *
195            * @param start the lower bound of the range of polls votes
196            * @param end the upper bound of the range of polls votes (not inclusive)
197            * @return the range of polls votes
198            * @throws SystemException if a system exception occurred
199            */
200            public java.util.List<com.liferay.portlet.polls.model.PollsVote> getPollsVotes(
201                    int start, int end)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return _pollsVoteLocalService.getPollsVotes(start, end);
204            }
205    
206            /**
207            * Returns the number of polls votes.
208            *
209            * @return the number of polls votes
210            * @throws SystemException if a system exception occurred
211            */
212            public int getPollsVotesCount()
213                    throws com.liferay.portal.kernel.exception.SystemException {
214                    return _pollsVoteLocalService.getPollsVotesCount();
215            }
216    
217            /**
218            * Updates the polls vote in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
219            *
220            * @param pollsVote the polls vote
221            * @return the polls vote that was updated
222            * @throws SystemException if a system exception occurred
223            */
224            public com.liferay.portlet.polls.model.PollsVote updatePollsVote(
225                    com.liferay.portlet.polls.model.PollsVote pollsVote)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return _pollsVoteLocalService.updatePollsVote(pollsVote);
228            }
229    
230            /**
231            * Updates the polls vote in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
232            *
233            * @param pollsVote the polls vote
234            * @param merge whether to merge the polls vote 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.
235            * @return the polls vote that was updated
236            * @throws SystemException if a system exception occurred
237            */
238            public com.liferay.portlet.polls.model.PollsVote updatePollsVote(
239                    com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
240                    throws com.liferay.portal.kernel.exception.SystemException {
241                    return _pollsVoteLocalService.updatePollsVote(pollsVote, merge);
242            }
243    
244            /**
245            * Returns the Spring bean ID for this bean.
246            *
247            * @return the Spring bean ID for this bean
248            */
249            public java.lang.String getBeanIdentifier() {
250                    return _pollsVoteLocalService.getBeanIdentifier();
251            }
252    
253            /**
254            * Sets the Spring bean ID for this bean.
255            *
256            * @param beanIdentifier the Spring bean ID for this bean
257            */
258            public void setBeanIdentifier(java.lang.String beanIdentifier) {
259                    _pollsVoteLocalService.setBeanIdentifier(beanIdentifier);
260            }
261    
262            public com.liferay.portlet.polls.model.PollsVote addVote(long userId,
263                    long questionId, long choiceId,
264                    com.liferay.portal.service.ServiceContext serviceContext)
265                    throws com.liferay.portal.kernel.exception.PortalException,
266                            com.liferay.portal.kernel.exception.SystemException {
267                    return _pollsVoteLocalService.addVote(userId, questionId, choiceId,
268                            serviceContext);
269            }
270    
271            public java.util.List<com.liferay.portlet.polls.model.PollsVote> getChoiceVotes(
272                    long choiceId, int start, int end)
273                    throws com.liferay.portal.kernel.exception.SystemException {
274                    return _pollsVoteLocalService.getChoiceVotes(choiceId, start, end);
275            }
276    
277            public int getChoiceVotesCount(long choiceId)
278                    throws com.liferay.portal.kernel.exception.SystemException {
279                    return _pollsVoteLocalService.getChoiceVotesCount(choiceId);
280            }
281    
282            public java.util.List<com.liferay.portlet.polls.model.PollsVote> getQuestionVotes(
283                    long questionId, int start, int end)
284                    throws com.liferay.portal.kernel.exception.SystemException {
285                    return _pollsVoteLocalService.getQuestionVotes(questionId, start, end);
286            }
287    
288            public int getQuestionVotesCount(long questionId)
289                    throws com.liferay.portal.kernel.exception.SystemException {
290                    return _pollsVoteLocalService.getQuestionVotesCount(questionId);
291            }
292    
293            public com.liferay.portlet.polls.model.PollsVote getVote(long questionId,
294                    long userId)
295                    throws com.liferay.portal.kernel.exception.PortalException,
296                            com.liferay.portal.kernel.exception.SystemException {
297                    return _pollsVoteLocalService.getVote(questionId, userId);
298            }
299    
300            /**
301             * @deprecated Renamed to {@link #getWrappedService}
302             */
303            public PollsVoteLocalService getWrappedPollsVoteLocalService() {
304                    return _pollsVoteLocalService;
305            }
306    
307            /**
308             * @deprecated Renamed to {@link #setWrappedService}
309             */
310            public void setWrappedPollsVoteLocalService(
311                    PollsVoteLocalService pollsVoteLocalService) {
312                    _pollsVoteLocalService = pollsVoteLocalService;
313            }
314    
315            public PollsVoteLocalService getWrappedService() {
316                    return _pollsVoteLocalService;
317            }
318    
319            public void setWrappedService(PollsVoteLocalService pollsVoteLocalService) {
320                    _pollsVoteLocalService = pollsVoteLocalService;
321            }
322    
323            private PollsVoteLocalService _pollsVoteLocalService;
324    }