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            * @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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.polls.model.impl.PollsVoteModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.polls.model.impl.PollsVoteModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.polls.model.impl.PollsVoteModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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            * Returns the Spring bean ID for this bean.
232            *
233            * @return the Spring bean ID for this bean
234            */
235            public java.lang.String getBeanIdentifier() {
236                    return _pollsVoteLocalService.getBeanIdentifier();
237            }
238    
239            /**
240            * Sets the Spring bean ID for this bean.
241            *
242            * @param beanIdentifier the Spring bean ID for this bean
243            */
244            public void setBeanIdentifier(java.lang.String beanIdentifier) {
245                    _pollsVoteLocalService.setBeanIdentifier(beanIdentifier);
246            }
247    
248            public com.liferay.portlet.polls.model.PollsVote addVote(long userId,
249                    long questionId, long choiceId,
250                    com.liferay.portal.service.ServiceContext serviceContext)
251                    throws com.liferay.portal.kernel.exception.PortalException,
252                            com.liferay.portal.kernel.exception.SystemException {
253                    return _pollsVoteLocalService.addVote(userId, questionId, choiceId,
254                            serviceContext);
255            }
256    
257            public java.util.List<com.liferay.portlet.polls.model.PollsVote> getChoiceVotes(
258                    long choiceId, int start, int end)
259                    throws com.liferay.portal.kernel.exception.SystemException {
260                    return _pollsVoteLocalService.getChoiceVotes(choiceId, start, end);
261            }
262    
263            public int getChoiceVotesCount(long choiceId)
264                    throws com.liferay.portal.kernel.exception.SystemException {
265                    return _pollsVoteLocalService.getChoiceVotesCount(choiceId);
266            }
267    
268            public java.util.List<com.liferay.portlet.polls.model.PollsVote> getQuestionVotes(
269                    long questionId, int start, int end)
270                    throws com.liferay.portal.kernel.exception.SystemException {
271                    return _pollsVoteLocalService.getQuestionVotes(questionId, start, end);
272            }
273    
274            public int getQuestionVotesCount(long questionId)
275                    throws com.liferay.portal.kernel.exception.SystemException {
276                    return _pollsVoteLocalService.getQuestionVotesCount(questionId);
277            }
278    
279            public com.liferay.portlet.polls.model.PollsVote getVote(long questionId,
280                    long userId)
281                    throws com.liferay.portal.kernel.exception.PortalException,
282                            com.liferay.portal.kernel.exception.SystemException {
283                    return _pollsVoteLocalService.getVote(questionId, userId);
284            }
285    
286            /**
287             * @deprecated Renamed to {@link #getWrappedService}
288             */
289            public PollsVoteLocalService getWrappedPollsVoteLocalService() {
290                    return _pollsVoteLocalService;
291            }
292    
293            /**
294             * @deprecated Renamed to {@link #setWrappedService}
295             */
296            public void setWrappedPollsVoteLocalService(
297                    PollsVoteLocalService pollsVoteLocalService) {
298                    _pollsVoteLocalService = pollsVoteLocalService;
299            }
300    
301            public PollsVoteLocalService getWrappedService() {
302                    return _pollsVoteLocalService;
303            }
304    
305            public void setWrappedService(PollsVoteLocalService pollsVoteLocalService) {
306                    _pollsVoteLocalService = pollsVoteLocalService;
307            }
308    
309            private PollsVoteLocalService _pollsVoteLocalService;
310    }