001    /**
002     * Copyright (c) 2000-2011 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
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
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
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
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
103            * @param start the lower bound of the range of model instances
104            * @param end the upper bound of the range of model instances (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
123            * @param start the lower bound of the range of model instances
124            * @param end the upper bound of the range of model instances (not inclusive)
125            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns the number of rows that match the dynamic query.
141            *
142            * @param dynamicQuery the dynamic query
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            * Returns the polls vote with the primary key.
154            *
155            * @param voteId the primary key of the polls vote
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            public com.liferay.portal.model.PersistedModel getPersistedModel(
167                    java.io.Serializable primaryKeyObj)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return _pollsVoteLocalService.getPersistedModel(primaryKeyObj);
171            }
172    
173            /**
174            * Returns a range of all the polls votes.
175            *
176            * <p>
177            * 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.
178            * </p>
179            *
180            * @param start the lower bound of the range of polls votes
181            * @param end the upper bound of the range of polls votes (not inclusive)
182            * @return the range of polls votes
183            * @throws SystemException if a system exception occurred
184            */
185            public java.util.List<com.liferay.portlet.polls.model.PollsVote> getPollsVotes(
186                    int start, int end)
187                    throws com.liferay.portal.kernel.exception.SystemException {
188                    return _pollsVoteLocalService.getPollsVotes(start, end);
189            }
190    
191            /**
192            * Returns the number of polls votes.
193            *
194            * @return the number of polls votes
195            * @throws SystemException if a system exception occurred
196            */
197            public int getPollsVotesCount()
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return _pollsVoteLocalService.getPollsVotesCount();
200            }
201    
202            /**
203            * Updates the polls vote in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
204            *
205            * @param pollsVote the polls vote
206            * @return the polls vote that was updated
207            * @throws SystemException if a system exception occurred
208            */
209            public com.liferay.portlet.polls.model.PollsVote updatePollsVote(
210                    com.liferay.portlet.polls.model.PollsVote pollsVote)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return _pollsVoteLocalService.updatePollsVote(pollsVote);
213            }
214    
215            /**
216            * Updates the polls vote in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
217            *
218            * @param pollsVote the polls vote
219            * @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.
220            * @return the polls vote that was updated
221            * @throws SystemException if a system exception occurred
222            */
223            public com.liferay.portlet.polls.model.PollsVote updatePollsVote(
224                    com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
225                    throws com.liferay.portal.kernel.exception.SystemException {
226                    return _pollsVoteLocalService.updatePollsVote(pollsVote, merge);
227            }
228    
229            /**
230            * Returns the Spring bean ID for this bean.
231            *
232            * @return the Spring bean ID for this bean
233            */
234            public java.lang.String getBeanIdentifier() {
235                    return _pollsVoteLocalService.getBeanIdentifier();
236            }
237    
238            /**
239            * Sets the Spring bean ID for this bean.
240            *
241            * @param beanIdentifier the Spring bean ID for this bean
242            */
243            public void setBeanIdentifier(java.lang.String beanIdentifier) {
244                    _pollsVoteLocalService.setBeanIdentifier(beanIdentifier);
245            }
246    
247            public com.liferay.portlet.polls.model.PollsVote addVote(long userId,
248                    long questionId, long choiceId,
249                    com.liferay.portal.service.ServiceContext serviceContext)
250                    throws com.liferay.portal.kernel.exception.PortalException,
251                            com.liferay.portal.kernel.exception.SystemException {
252                    return _pollsVoteLocalService.addVote(userId, questionId, choiceId,
253                            serviceContext);
254            }
255    
256            public java.util.List<com.liferay.portlet.polls.model.PollsVote> getChoiceVotes(
257                    long choiceId, int start, int end)
258                    throws com.liferay.portal.kernel.exception.SystemException {
259                    return _pollsVoteLocalService.getChoiceVotes(choiceId, start, end);
260            }
261    
262            public int getChoiceVotesCount(long choiceId)
263                    throws com.liferay.portal.kernel.exception.SystemException {
264                    return _pollsVoteLocalService.getChoiceVotesCount(choiceId);
265            }
266    
267            public java.util.List<com.liferay.portlet.polls.model.PollsVote> getQuestionVotes(
268                    long questionId, int start, int end)
269                    throws com.liferay.portal.kernel.exception.SystemException {
270                    return _pollsVoteLocalService.getQuestionVotes(questionId, start, end);
271            }
272    
273            public int getQuestionVotesCount(long questionId)
274                    throws com.liferay.portal.kernel.exception.SystemException {
275                    return _pollsVoteLocalService.getQuestionVotesCount(questionId);
276            }
277    
278            public com.liferay.portlet.polls.model.PollsVote getVote(long questionId,
279                    long userId)
280                    throws com.liferay.portal.kernel.exception.PortalException,
281                            com.liferay.portal.kernel.exception.SystemException {
282                    return _pollsVoteLocalService.getVote(questionId, userId);
283            }
284    
285            public PollsVoteLocalService getWrappedPollsVoteLocalService() {
286                    return _pollsVoteLocalService;
287            }
288    
289            public void setWrappedPollsVoteLocalService(
290                    PollsVoteLocalService pollsVoteLocalService) {
291                    _pollsVoteLocalService = pollsVoteLocalService;
292            }
293    
294            private PollsVoteLocalService _pollsVoteLocalService;
295    }