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