001    /**
002     * Copyright (c) 2000-2010 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    /**
018     * <p>
019     * This class is a wrapper for {@link PollsVoteLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       PollsVoteLocalService
024     * @generated
025     */
026    public class PollsVoteLocalServiceWrapper implements PollsVoteLocalService {
027            public PollsVoteLocalServiceWrapper(
028                    PollsVoteLocalService pollsVoteLocalService) {
029                    _pollsVoteLocalService = pollsVoteLocalService;
030            }
031    
032            /**
033            * Adds the polls vote to the database. Also notifies the appropriate model listeners.
034            *
035            * @param pollsVote the polls vote to add
036            * @return the polls vote that was added
037            * @throws SystemException if a system exception occurred
038            */
039            public com.liferay.portlet.polls.model.PollsVote addPollsVote(
040                    com.liferay.portlet.polls.model.PollsVote pollsVote)
041                    throws com.liferay.portal.kernel.exception.SystemException {
042                    return _pollsVoteLocalService.addPollsVote(pollsVote);
043            }
044    
045            /**
046            * Creates a new polls vote with the primary key. Does not add the polls vote to the database.
047            *
048            * @param voteId the primary key for the new polls vote
049            * @return the new polls vote
050            */
051            public com.liferay.portlet.polls.model.PollsVote createPollsVote(
052                    long voteId) {
053                    return _pollsVoteLocalService.createPollsVote(voteId);
054            }
055    
056            /**
057            * Deletes the polls vote with the primary key from the database. Also notifies the appropriate model listeners.
058            *
059            * @param voteId the primary key of the polls vote to delete
060            * @throws PortalException if a polls vote with the primary key could not be found
061            * @throws SystemException if a system exception occurred
062            */
063            public void deletePollsVote(long voteId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    _pollsVoteLocalService.deletePollsVote(voteId);
067            }
068    
069            /**
070            * Deletes the polls vote from the database. Also notifies the appropriate model listeners.
071            *
072            * @param pollsVote the polls vote to delete
073            * @throws SystemException if a system exception occurred
074            */
075            public void deletePollsVote(
076                    com.liferay.portlet.polls.model.PollsVote pollsVote)
077                    throws com.liferay.portal.kernel.exception.SystemException {
078                    _pollsVoteLocalService.deletePollsVote(pollsVote);
079            }
080    
081            /**
082            * Performs a dynamic query on the database and returns the matching rows.
083            *
084            * @param dynamicQuery the dynamic query to search with
085            * @return the matching rows
086            * @throws SystemException if a system exception occurred
087            */
088            @SuppressWarnings("rawtypes")
089            public java.util.List dynamicQuery(
090                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
091                    throws com.liferay.portal.kernel.exception.SystemException {
092                    return _pollsVoteLocalService.dynamicQuery(dynamicQuery);
093            }
094    
095            /**
096            * Performs a dynamic query on the database and returns a range of the matching rows.
097            *
098            * <p>
099            * 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.
100            * </p>
101            *
102            * @param dynamicQuery the dynamic query to search with
103            * @param start the lower bound of the range of model instances to return
104            * @param end the upper bound of the range of model instances to return (not inclusive)
105            * @return the range of matching rows
106            * @throws SystemException if a system exception occurred
107            */
108            @SuppressWarnings("rawtypes")
109            public java.util.List dynamicQuery(
110                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
111                    int end) throws com.liferay.portal.kernel.exception.SystemException {
112                    return _pollsVoteLocalService.dynamicQuery(dynamicQuery, start, end);
113            }
114    
115            /**
116            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
117            *
118            * <p>
119            * 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.
120            * </p>
121            *
122            * @param dynamicQuery the dynamic query to search with
123            * @param start the lower bound of the range of model instances to return
124            * @param end the upper bound of the range of model instances to return (not inclusive)
125            * @param orderByComparator the comparator to order the results by
126            * @return the ordered range of matching rows
127            * @throws SystemException if a system exception occurred
128            */
129            @SuppressWarnings("rawtypes")
130            public java.util.List dynamicQuery(
131                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
132                    int end,
133                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
134                    throws com.liferay.portal.kernel.exception.SystemException {
135                    return _pollsVoteLocalService.dynamicQuery(dynamicQuery, start, end,
136                            orderByComparator);
137            }
138    
139            /**
140            * Counts the number of rows that match the dynamic query.
141            *
142            * @param dynamicQuery the dynamic query to search with
143            * @return the number of rows that match the dynamic query
144            * @throws SystemException if a system exception occurred
145            */
146            public long dynamicQueryCount(
147                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
148                    throws com.liferay.portal.kernel.exception.SystemException {
149                    return _pollsVoteLocalService.dynamicQueryCount(dynamicQuery);
150            }
151    
152            /**
153            * Gets the polls vote with the primary key.
154            *
155            * @param voteId the primary key of the polls vote to get
156            * @return the polls vote
157            * @throws PortalException if a polls vote with the primary key could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            public com.liferay.portlet.polls.model.PollsVote getPollsVote(long voteId)
161                    throws com.liferay.portal.kernel.exception.PortalException,
162                            com.liferay.portal.kernel.exception.SystemException {
163                    return _pollsVoteLocalService.getPollsVote(voteId);
164            }
165    
166            /**
167            * Gets a range of all the polls votes.
168            *
169            * <p>
170            * 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.
171            * </p>
172            *
173            * @param start the lower bound of the range of polls votes to return
174            * @param end the upper bound of the range of polls votes to return (not inclusive)
175            * @return the range of polls votes
176            * @throws SystemException if a system exception occurred
177            */
178            public java.util.List<com.liferay.portlet.polls.model.PollsVote> getPollsVotes(
179                    int start, int end)
180                    throws com.liferay.portal.kernel.exception.SystemException {
181                    return _pollsVoteLocalService.getPollsVotes(start, end);
182            }
183    
184            /**
185            * Gets the number of polls votes.
186            *
187            * @return the number of polls votes
188            * @throws SystemException if a system exception occurred
189            */
190            public int getPollsVotesCount()
191                    throws com.liferay.portal.kernel.exception.SystemException {
192                    return _pollsVoteLocalService.getPollsVotesCount();
193            }
194    
195            /**
196            * Updates the polls vote in the database. Also notifies the appropriate model listeners.
197            *
198            * @param pollsVote the polls vote to update
199            * @return the polls vote that was updated
200            * @throws SystemException if a system exception occurred
201            */
202            public com.liferay.portlet.polls.model.PollsVote updatePollsVote(
203                    com.liferay.portlet.polls.model.PollsVote pollsVote)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return _pollsVoteLocalService.updatePollsVote(pollsVote);
206            }
207    
208            /**
209            * Updates the polls vote in the database. Also notifies the appropriate model listeners.
210            *
211            * @param pollsVote the polls vote to update
212            * @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.
213            * @return the polls vote that was updated
214            * @throws SystemException if a system exception occurred
215            */
216            public com.liferay.portlet.polls.model.PollsVote updatePollsVote(
217                    com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
218                    throws com.liferay.portal.kernel.exception.SystemException {
219                    return _pollsVoteLocalService.updatePollsVote(pollsVote, merge);
220            }
221    
222            public com.liferay.portlet.polls.model.PollsVote addVote(long userId,
223                    long questionId, long choiceId,
224                    com.liferay.portal.service.ServiceContext serviceContext)
225                    throws com.liferay.portal.kernel.exception.PortalException,
226                            com.liferay.portal.kernel.exception.SystemException {
227                    return _pollsVoteLocalService.addVote(userId, questionId, choiceId,
228                            serviceContext);
229            }
230    
231            public java.util.List<com.liferay.portlet.polls.model.PollsVote> getChoiceVotes(
232                    long choiceId, int start, int end)
233                    throws com.liferay.portal.kernel.exception.SystemException {
234                    return _pollsVoteLocalService.getChoiceVotes(choiceId, start, end);
235            }
236    
237            public int getChoiceVotesCount(long choiceId)
238                    throws com.liferay.portal.kernel.exception.SystemException {
239                    return _pollsVoteLocalService.getChoiceVotesCount(choiceId);
240            }
241    
242            public java.util.List<com.liferay.portlet.polls.model.PollsVote> getQuestionVotes(
243                    long questionId, int start, int end)
244                    throws com.liferay.portal.kernel.exception.SystemException {
245                    return _pollsVoteLocalService.getQuestionVotes(questionId, start, end);
246            }
247    
248            public int getQuestionVotesCount(long questionId)
249                    throws com.liferay.portal.kernel.exception.SystemException {
250                    return _pollsVoteLocalService.getQuestionVotesCount(questionId);
251            }
252    
253            public com.liferay.portlet.polls.model.PollsVote getVote(long questionId,
254                    long userId)
255                    throws com.liferay.portal.kernel.exception.PortalException,
256                            com.liferay.portal.kernel.exception.SystemException {
257                    return _pollsVoteLocalService.getVote(questionId, userId);
258            }
259    
260            public PollsVoteLocalService getWrappedPollsVoteLocalService() {
261                    return _pollsVoteLocalService;
262            }
263    
264            private PollsVoteLocalService _pollsVoteLocalService;
265    }