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