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