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