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.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.service.ServiceContext;
022    
023    import com.liferay.portlet.polls.model.PollsVote;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the polls vote service.
029     *
030     * <p>
031     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see PollsVotePersistence
036     * @see PollsVotePersistenceImpl
037     * @generated
038     */
039    public class PollsVoteUtil {
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
042             */
043            public static void clearCache() {
044                    getPersistence().clearCache();
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
049             */
050            public static void clearCache(PollsVote pollsVote) {
051                    getPersistence().clearCache(pollsVote);
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
056             */
057            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
058                    throws SystemException {
059                    return getPersistence().countWithDynamicQuery(dynamicQuery);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
064             */
065            public static List<PollsVote> findWithDynamicQuery(
066                    DynamicQuery dynamicQuery) throws SystemException {
067                    return getPersistence().findWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
072             */
073            public static List<PollsVote> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery, int start, int end)
075                    throws SystemException {
076                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
077            }
078    
079            /**
080             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
081             */
082            public static List<PollsVote> findWithDynamicQuery(
083                    DynamicQuery dynamicQuery, int start, int end,
084                    OrderByComparator orderByComparator) throws SystemException {
085                    return getPersistence()
086                                       .findWithDynamicQuery(dynamicQuery, start, end,
087                            orderByComparator);
088            }
089    
090            /**
091             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
092             */
093            public static PollsVote remove(PollsVote pollsVote)
094                    throws SystemException {
095                    return getPersistence().remove(pollsVote);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
100             */
101            public static PollsVote update(PollsVote pollsVote, boolean merge)
102                    throws SystemException {
103                    return getPersistence().update(pollsVote, merge);
104            }
105    
106            /**
107             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
108             */
109            public static PollsVote update(PollsVote pollsVote, boolean merge,
110                    ServiceContext serviceContext) throws SystemException {
111                    return getPersistence().update(pollsVote, merge, serviceContext);
112            }
113    
114            /**
115            * Caches the polls vote in the entity cache if it is enabled.
116            *
117            * @param pollsVote the polls vote to cache
118            */
119            public static void cacheResult(
120                    com.liferay.portlet.polls.model.PollsVote pollsVote) {
121                    getPersistence().cacheResult(pollsVote);
122            }
123    
124            /**
125            * Caches the polls votes in the entity cache if it is enabled.
126            *
127            * @param pollsVotes the polls votes to cache
128            */
129            public static void cacheResult(
130                    java.util.List<com.liferay.portlet.polls.model.PollsVote> pollsVotes) {
131                    getPersistence().cacheResult(pollsVotes);
132            }
133    
134            /**
135            * Creates a new polls vote with the primary key.
136            *
137            * @param voteId the primary key for the new polls vote
138            * @return the new polls vote
139            */
140            public static com.liferay.portlet.polls.model.PollsVote create(long voteId) {
141                    return getPersistence().create(voteId);
142            }
143    
144            /**
145            * Removes the polls vote with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param voteId the primary key of the polls vote to remove
148            * @return the polls vote that was removed
149            * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portlet.polls.model.PollsVote remove(long voteId)
153                    throws com.liferay.portal.kernel.exception.SystemException,
154                            com.liferay.portlet.polls.NoSuchVoteException {
155                    return getPersistence().remove(voteId);
156            }
157    
158            public static com.liferay.portlet.polls.model.PollsVote updateImpl(
159                    com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getPersistence().updateImpl(pollsVote, merge);
162            }
163    
164            /**
165            * Finds the polls vote with the primary key or throws a {@link com.liferay.portlet.polls.NoSuchVoteException} if it could not be found.
166            *
167            * @param voteId the primary key of the polls vote to find
168            * @return the polls vote
169            * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public static com.liferay.portlet.polls.model.PollsVote findByPrimaryKey(
173                    long voteId)
174                    throws com.liferay.portal.kernel.exception.SystemException,
175                            com.liferay.portlet.polls.NoSuchVoteException {
176                    return getPersistence().findByPrimaryKey(voteId);
177            }
178    
179            /**
180            * Finds the polls vote with the primary key or returns <code>null</code> if it could not be found.
181            *
182            * @param voteId the primary key of the polls vote to find
183            * @return the polls vote, or <code>null</code> if a polls vote with the primary key could not be found
184            * @throws SystemException if a system exception occurred
185            */
186            public static com.liferay.portlet.polls.model.PollsVote fetchByPrimaryKey(
187                    long voteId) throws com.liferay.portal.kernel.exception.SystemException {
188                    return getPersistence().fetchByPrimaryKey(voteId);
189            }
190    
191            /**
192            * Finds all the polls votes where questionId = &#63;.
193            *
194            * @param questionId the question id to search with
195            * @return the matching polls votes
196            * @throws SystemException if a system exception occurred
197            */
198            public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
199                    long questionId)
200                    throws com.liferay.portal.kernel.exception.SystemException {
201                    return getPersistence().findByQuestionId(questionId);
202            }
203    
204            /**
205            * Finds a range of all the polls votes where questionId = &#63;.
206            *
207            * <p>
208            * 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.
209            * </p>
210            *
211            * @param questionId the question id to search with
212            * @param start the lower bound of the range of polls votes to return
213            * @param end the upper bound of the range of polls votes to return (not inclusive)
214            * @return the range of matching polls votes
215            * @throws SystemException if a system exception occurred
216            */
217            public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
218                    long questionId, int start, int end)
219                    throws com.liferay.portal.kernel.exception.SystemException {
220                    return getPersistence().findByQuestionId(questionId, start, end);
221            }
222    
223            /**
224            * Finds an ordered range of all the polls votes where questionId = &#63;.
225            *
226            * <p>
227            * 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.
228            * </p>
229            *
230            * @param questionId the question id to search with
231            * @param start the lower bound of the range of polls votes to return
232            * @param end the upper bound of the range of polls votes to return (not inclusive)
233            * @param orderByComparator the comparator to order the results by
234            * @return the ordered range of matching polls votes
235            * @throws SystemException if a system exception occurred
236            */
237            public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
238                    long questionId, int start, int end,
239                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
240                    throws com.liferay.portal.kernel.exception.SystemException {
241                    return getPersistence()
242                                       .findByQuestionId(questionId, start, end, orderByComparator);
243            }
244    
245            /**
246            * Finds the first polls vote in the ordered set where questionId = &#63;.
247            *
248            * <p>
249            * 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.
250            * </p>
251            *
252            * @param questionId the question id to search with
253            * @param orderByComparator the comparator to order the set by
254            * @return the first matching polls vote
255            * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found
256            * @throws SystemException if a system exception occurred
257            */
258            public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_First(
259                    long questionId,
260                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261                    throws com.liferay.portal.kernel.exception.SystemException,
262                            com.liferay.portlet.polls.NoSuchVoteException {
263                    return getPersistence()
264                                       .findByQuestionId_First(questionId, orderByComparator);
265            }
266    
267            /**
268            * Finds the last polls vote in the ordered set where questionId = &#63;.
269            *
270            * <p>
271            * 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.
272            * </p>
273            *
274            * @param questionId the question id to search with
275            * @param orderByComparator the comparator to order the set by
276            * @return the last matching polls vote
277            * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found
278            * @throws SystemException if a system exception occurred
279            */
280            public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_Last(
281                    long questionId,
282                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
283                    throws com.liferay.portal.kernel.exception.SystemException,
284                            com.liferay.portlet.polls.NoSuchVoteException {
285                    return getPersistence()
286                                       .findByQuestionId_Last(questionId, orderByComparator);
287            }
288    
289            /**
290            * Finds the polls votes before and after the current polls vote in the ordered set where questionId = &#63;.
291            *
292            * <p>
293            * 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.
294            * </p>
295            *
296            * @param voteId the primary key of the current polls vote
297            * @param questionId the question id to search with
298            * @param orderByComparator the comparator to order the set by
299            * @return the previous, current, and next polls vote
300            * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found
301            * @throws SystemException if a system exception occurred
302            */
303            public static com.liferay.portlet.polls.model.PollsVote[] findByQuestionId_PrevAndNext(
304                    long voteId, long questionId,
305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
306                    throws com.liferay.portal.kernel.exception.SystemException,
307                            com.liferay.portlet.polls.NoSuchVoteException {
308                    return getPersistence()
309                                       .findByQuestionId_PrevAndNext(voteId, questionId,
310                            orderByComparator);
311            }
312    
313            /**
314            * Finds all the polls votes where choiceId = &#63;.
315            *
316            * @param choiceId the choice id to search with
317            * @return the matching polls votes
318            * @throws SystemException if a system exception occurred
319            */
320            public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
321                    long choiceId)
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    return getPersistence().findByChoiceId(choiceId);
324            }
325    
326            /**
327            * Finds a range of all the polls votes where choiceId = &#63;.
328            *
329            * <p>
330            * 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.
331            * </p>
332            *
333            * @param choiceId the choice id to search with
334            * @param start the lower bound of the range of polls votes to return
335            * @param end the upper bound of the range of polls votes to return (not inclusive)
336            * @return the range of matching polls votes
337            * @throws SystemException if a system exception occurred
338            */
339            public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
340                    long choiceId, int start, int end)
341                    throws com.liferay.portal.kernel.exception.SystemException {
342                    return getPersistence().findByChoiceId(choiceId, start, end);
343            }
344    
345            /**
346            * Finds an ordered range of all the polls votes where choiceId = &#63;.
347            *
348            * <p>
349            * 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.
350            * </p>
351            *
352            * @param choiceId the choice id to search with
353            * @param start the lower bound of the range of polls votes to return
354            * @param end the upper bound of the range of polls votes to return (not inclusive)
355            * @param orderByComparator the comparator to order the results by
356            * @return the ordered range of matching polls votes
357            * @throws SystemException if a system exception occurred
358            */
359            public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
360                    long choiceId, int start, int end,
361                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
362                    throws com.liferay.portal.kernel.exception.SystemException {
363                    return getPersistence()
364                                       .findByChoiceId(choiceId, start, end, orderByComparator);
365            }
366    
367            /**
368            * Finds the first polls vote in the ordered set where choiceId = &#63;.
369            *
370            * <p>
371            * 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.
372            * </p>
373            *
374            * @param choiceId the choice id to search with
375            * @param orderByComparator the comparator to order the set by
376            * @return the first matching polls vote
377            * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found
378            * @throws SystemException if a system exception occurred
379            */
380            public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_First(
381                    long choiceId,
382                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
383                    throws com.liferay.portal.kernel.exception.SystemException,
384                            com.liferay.portlet.polls.NoSuchVoteException {
385                    return getPersistence().findByChoiceId_First(choiceId, orderByComparator);
386            }
387    
388            /**
389            * Finds the last polls vote in the ordered set where choiceId = &#63;.
390            *
391            * <p>
392            * 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.
393            * </p>
394            *
395            * @param choiceId the choice id to search with
396            * @param orderByComparator the comparator to order the set by
397            * @return the last matching polls vote
398            * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found
399            * @throws SystemException if a system exception occurred
400            */
401            public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_Last(
402                    long choiceId,
403                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
404                    throws com.liferay.portal.kernel.exception.SystemException,
405                            com.liferay.portlet.polls.NoSuchVoteException {
406                    return getPersistence().findByChoiceId_Last(choiceId, orderByComparator);
407            }
408    
409            /**
410            * Finds the polls votes before and after the current polls vote in the ordered set where choiceId = &#63;.
411            *
412            * <p>
413            * 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.
414            * </p>
415            *
416            * @param voteId the primary key of the current polls vote
417            * @param choiceId the choice id to search with
418            * @param orderByComparator the comparator to order the set by
419            * @return the previous, current, and next polls vote
420            * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found
421            * @throws SystemException if a system exception occurred
422            */
423            public static com.liferay.portlet.polls.model.PollsVote[] findByChoiceId_PrevAndNext(
424                    long voteId, long choiceId,
425                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
426                    throws com.liferay.portal.kernel.exception.SystemException,
427                            com.liferay.portlet.polls.NoSuchVoteException {
428                    return getPersistence()
429                                       .findByChoiceId_PrevAndNext(voteId, choiceId,
430                            orderByComparator);
431            }
432    
433            /**
434            * Finds the polls vote where questionId = &#63; and userId = &#63; or throws a {@link com.liferay.portlet.polls.NoSuchVoteException} if it could not be found.
435            *
436            * @param questionId the question id to search with
437            * @param userId the user id to search with
438            * @return the matching polls vote
439            * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found
440            * @throws SystemException if a system exception occurred
441            */
442            public static com.liferay.portlet.polls.model.PollsVote findByQ_U(
443                    long questionId, long userId)
444                    throws com.liferay.portal.kernel.exception.SystemException,
445                            com.liferay.portlet.polls.NoSuchVoteException {
446                    return getPersistence().findByQ_U(questionId, userId);
447            }
448    
449            /**
450            * Finds the polls vote where questionId = &#63; and userId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
451            *
452            * @param questionId the question id to search with
453            * @param userId the user id to search with
454            * @return the matching polls vote, or <code>null</code> if a matching polls vote could not be found
455            * @throws SystemException if a system exception occurred
456            */
457            public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
458                    long questionId, long userId)
459                    throws com.liferay.portal.kernel.exception.SystemException {
460                    return getPersistence().fetchByQ_U(questionId, userId);
461            }
462    
463            /**
464            * Finds the polls vote where questionId = &#63; and userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
465            *
466            * @param questionId the question id to search with
467            * @param userId the user id to search with
468            * @return the matching polls vote, or <code>null</code> if a matching polls vote could not be found
469            * @throws SystemException if a system exception occurred
470            */
471            public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
472                    long questionId, long userId, boolean retrieveFromCache)
473                    throws com.liferay.portal.kernel.exception.SystemException {
474                    return getPersistence().fetchByQ_U(questionId, userId, retrieveFromCache);
475            }
476    
477            /**
478            * Finds all the polls votes.
479            *
480            * @return the polls votes
481            * @throws SystemException if a system exception occurred
482            */
483            public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll()
484                    throws com.liferay.portal.kernel.exception.SystemException {
485                    return getPersistence().findAll();
486            }
487    
488            /**
489            * Finds a range of all the polls votes.
490            *
491            * <p>
492            * 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.
493            * </p>
494            *
495            * @param start the lower bound of the range of polls votes to return
496            * @param end the upper bound of the range of polls votes to return (not inclusive)
497            * @return the range of polls votes
498            * @throws SystemException if a system exception occurred
499            */
500            public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
501                    int start, int end)
502                    throws com.liferay.portal.kernel.exception.SystemException {
503                    return getPersistence().findAll(start, end);
504            }
505    
506            /**
507            * Finds an ordered range of all the polls votes.
508            *
509            * <p>
510            * 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.
511            * </p>
512            *
513            * @param start the lower bound of the range of polls votes to return
514            * @param end the upper bound of the range of polls votes to return (not inclusive)
515            * @param orderByComparator the comparator to order the results by
516            * @return the ordered range of polls votes
517            * @throws SystemException if a system exception occurred
518            */
519            public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
520                    int start, int end,
521                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
522                    throws com.liferay.portal.kernel.exception.SystemException {
523                    return getPersistence().findAll(start, end, orderByComparator);
524            }
525    
526            /**
527            * Removes all the polls votes where questionId = &#63; from the database.
528            *
529            * @param questionId the question id to search with
530            * @throws SystemException if a system exception occurred
531            */
532            public static void removeByQuestionId(long questionId)
533                    throws com.liferay.portal.kernel.exception.SystemException {
534                    getPersistence().removeByQuestionId(questionId);
535            }
536    
537            /**
538            * Removes all the polls votes where choiceId = &#63; from the database.
539            *
540            * @param choiceId the choice id to search with
541            * @throws SystemException if a system exception occurred
542            */
543            public static void removeByChoiceId(long choiceId)
544                    throws com.liferay.portal.kernel.exception.SystemException {
545                    getPersistence().removeByChoiceId(choiceId);
546            }
547    
548            /**
549            * Removes the polls vote where questionId = &#63; and userId = &#63; from the database.
550            *
551            * @param questionId the question id to search with
552            * @param userId the user id to search with
553            * @throws SystemException if a system exception occurred
554            */
555            public static void removeByQ_U(long questionId, long userId)
556                    throws com.liferay.portal.kernel.exception.SystemException,
557                            com.liferay.portlet.polls.NoSuchVoteException {
558                    getPersistence().removeByQ_U(questionId, userId);
559            }
560    
561            /**
562            * Removes all the polls votes from the database.
563            *
564            * @throws SystemException if a system exception occurred
565            */
566            public static void removeAll()
567                    throws com.liferay.portal.kernel.exception.SystemException {
568                    getPersistence().removeAll();
569            }
570    
571            /**
572            * Counts all the polls votes where questionId = &#63;.
573            *
574            * @param questionId the question id to search with
575            * @return the number of matching polls votes
576            * @throws SystemException if a system exception occurred
577            */
578            public static int countByQuestionId(long questionId)
579                    throws com.liferay.portal.kernel.exception.SystemException {
580                    return getPersistence().countByQuestionId(questionId);
581            }
582    
583            /**
584            * Counts all the polls votes where choiceId = &#63;.
585            *
586            * @param choiceId the choice id to search with
587            * @return the number of matching polls votes
588            * @throws SystemException if a system exception occurred
589            */
590            public static int countByChoiceId(long choiceId)
591                    throws com.liferay.portal.kernel.exception.SystemException {
592                    return getPersistence().countByChoiceId(choiceId);
593            }
594    
595            /**
596            * Counts all the polls votes where questionId = &#63; and userId = &#63;.
597            *
598            * @param questionId the question id to search with
599            * @param userId the user id to search with
600            * @return the number of matching polls votes
601            * @throws SystemException if a system exception occurred
602            */
603            public static int countByQ_U(long questionId, long userId)
604                    throws com.liferay.portal.kernel.exception.SystemException {
605                    return getPersistence().countByQ_U(questionId, userId);
606            }
607    
608            /**
609            * Counts all the polls votes.
610            *
611            * @return the number of polls votes
612            * @throws SystemException if a system exception occurred
613            */
614            public static int countAll()
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    return getPersistence().countAll();
617            }
618    
619            public static PollsVotePersistence getPersistence() {
620                    if (_persistence == null) {
621                            _persistence = (PollsVotePersistence)PortalBeanLocatorUtil.locate(PollsVotePersistence.class.getName());
622                    }
623    
624                    return _persistence;
625            }
626    
627            public void setPersistence(PollsVotePersistence persistence) {
628                    _persistence = persistence;
629            }
630    
631            private static PollsVotePersistence _persistence;
632    }