001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.polls.service.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.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.polls.model.PollsChoice;
025    
026    import java.util.List;
027    
028    /**
029     * 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.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see PollsChoicePersistence
037     * @see PollsChoicePersistenceImpl
038     * @generated
039     */
040    public class PollsChoiceUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(PollsChoice pollsChoice) {
058                    getPersistence().clearCache(pollsChoice);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<PollsChoice> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<PollsChoice> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<PollsChoice> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
099             */
100            public static PollsChoice update(PollsChoice pollsChoice, boolean merge)
101                    throws SystemException {
102                    return getPersistence().update(pollsChoice, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static PollsChoice update(PollsChoice pollsChoice, boolean merge,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(pollsChoice, merge, serviceContext);
111            }
112    
113            /**
114            * Caches the polls choice in the entity cache if it is enabled.
115            *
116            * @param pollsChoice the polls choice
117            */
118            public static void cacheResult(
119                    com.liferay.portlet.polls.model.PollsChoice pollsChoice) {
120                    getPersistence().cacheResult(pollsChoice);
121            }
122    
123            /**
124            * Caches the polls choices in the entity cache if it is enabled.
125            *
126            * @param pollsChoices the polls choices
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portlet.polls.model.PollsChoice> pollsChoices) {
130                    getPersistence().cacheResult(pollsChoices);
131            }
132    
133            /**
134            * Creates a new polls choice with the primary key. Does not add the polls choice to the database.
135            *
136            * @param choiceId the primary key for the new polls choice
137            * @return the new polls choice
138            */
139            public static com.liferay.portlet.polls.model.PollsChoice create(
140                    long choiceId) {
141                    return getPersistence().create(choiceId);
142            }
143    
144            /**
145            * Removes the polls choice with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param choiceId the primary key of the polls choice
148            * @return the polls choice that was removed
149            * @throws com.liferay.portlet.polls.NoSuchChoiceException if a polls choice with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portlet.polls.model.PollsChoice remove(
153                    long choiceId)
154                    throws com.liferay.portal.kernel.exception.SystemException,
155                            com.liferay.portlet.polls.NoSuchChoiceException {
156                    return getPersistence().remove(choiceId);
157            }
158    
159            public static com.liferay.portlet.polls.model.PollsChoice updateImpl(
160                    com.liferay.portlet.polls.model.PollsChoice pollsChoice, boolean merge)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence().updateImpl(pollsChoice, merge);
163            }
164    
165            /**
166            * Returns the polls choice with the primary key or throws a {@link com.liferay.portlet.polls.NoSuchChoiceException} if it could not be found.
167            *
168            * @param choiceId the primary key of the polls choice
169            * @return the polls choice
170            * @throws com.liferay.portlet.polls.NoSuchChoiceException if a polls choice with the primary key could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public static com.liferay.portlet.polls.model.PollsChoice findByPrimaryKey(
174                    long choiceId)
175                    throws com.liferay.portal.kernel.exception.SystemException,
176                            com.liferay.portlet.polls.NoSuchChoiceException {
177                    return getPersistence().findByPrimaryKey(choiceId);
178            }
179    
180            /**
181            * Returns the polls choice with the primary key or returns <code>null</code> if it could not be found.
182            *
183            * @param choiceId the primary key of the polls choice
184            * @return the polls choice, or <code>null</code> if a polls choice with the primary key could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public static com.liferay.portlet.polls.model.PollsChoice fetchByPrimaryKey(
188                    long choiceId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().fetchByPrimaryKey(choiceId);
191            }
192    
193            /**
194            * Returns all the polls choices where uuid = &#63;.
195            *
196            * @param uuid the uuid
197            * @return the matching polls choices
198            * @throws SystemException if a system exception occurred
199            */
200            public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
201                    java.lang.String uuid)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().findByUuid(uuid);
204            }
205    
206            /**
207            * Returns a range of all the polls choices where uuid = &#63;.
208            *
209            * <p>
210            * 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.
211            * </p>
212            *
213            * @param uuid the uuid
214            * @param start the lower bound of the range of polls choices
215            * @param end the upper bound of the range of polls choices (not inclusive)
216            * @return the range of matching polls choices
217            * @throws SystemException if a system exception occurred
218            */
219            public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
220                    java.lang.String uuid, int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getPersistence().findByUuid(uuid, start, end);
223            }
224    
225            /**
226            * Returns an ordered range of all the polls choices where uuid = &#63;.
227            *
228            * <p>
229            * 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.
230            * </p>
231            *
232            * @param uuid the uuid
233            * @param start the lower bound of the range of polls choices
234            * @param end the upper bound of the range of polls choices (not inclusive)
235            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
236            * @return the ordered range of matching polls choices
237            * @throws SystemException if a system exception occurred
238            */
239            public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
240                    java.lang.String uuid, int start, int end,
241                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
244            }
245    
246            /**
247            * Returns the first polls choice in the ordered set where uuid = &#63;.
248            *
249            * <p>
250            * 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.
251            * </p>
252            *
253            * @param uuid the uuid
254            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
255            * @return the first matching polls choice
256            * @throws com.liferay.portlet.polls.NoSuchChoiceException if a matching polls choice could not be found
257            * @throws SystemException if a system exception occurred
258            */
259            public static com.liferay.portlet.polls.model.PollsChoice findByUuid_First(
260                    java.lang.String uuid,
261                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
262                    throws com.liferay.portal.kernel.exception.SystemException,
263                            com.liferay.portlet.polls.NoSuchChoiceException {
264                    return getPersistence().findByUuid_First(uuid, orderByComparator);
265            }
266    
267            /**
268            * Returns the last polls choice in the ordered set where uuid = &#63;.
269            *
270            * <p>
271            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
272            * </p>
273            *
274            * @param uuid the uuid
275            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
276            * @return the last matching polls choice
277            * @throws com.liferay.portlet.polls.NoSuchChoiceException if a matching polls choice could not be found
278            * @throws SystemException if a system exception occurred
279            */
280            public static com.liferay.portlet.polls.model.PollsChoice findByUuid_Last(
281                    java.lang.String uuid,
282                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
283                    throws com.liferay.portal.kernel.exception.SystemException,
284                            com.liferay.portlet.polls.NoSuchChoiceException {
285                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
286            }
287    
288            /**
289            * Returns the polls choices before and after the current polls choice in the ordered set where uuid = &#63;.
290            *
291            * <p>
292            * 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.
293            * </p>
294            *
295            * @param choiceId the primary key of the current polls choice
296            * @param uuid the uuid
297            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
298            * @return the previous, current, and next polls choice
299            * @throws com.liferay.portlet.polls.NoSuchChoiceException if a polls choice with the primary key could not be found
300            * @throws SystemException if a system exception occurred
301            */
302            public static com.liferay.portlet.polls.model.PollsChoice[] findByUuid_PrevAndNext(
303                    long choiceId, java.lang.String uuid,
304                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
305                    throws com.liferay.portal.kernel.exception.SystemException,
306                            com.liferay.portlet.polls.NoSuchChoiceException {
307                    return getPersistence()
308                                       .findByUuid_PrevAndNext(choiceId, uuid, orderByComparator);
309            }
310    
311            /**
312            * Returns all the polls choices where questionId = &#63;.
313            *
314            * @param questionId the question ID
315            * @return the matching polls choices
316            * @throws SystemException if a system exception occurred
317            */
318            public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
319                    long questionId)
320                    throws com.liferay.portal.kernel.exception.SystemException {
321                    return getPersistence().findByQuestionId(questionId);
322            }
323    
324            /**
325            * Returns a range of all the polls choices where questionId = &#63;.
326            *
327            * <p>
328            * 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.
329            * </p>
330            *
331            * @param questionId the question ID
332            * @param start the lower bound of the range of polls choices
333            * @param end the upper bound of the range of polls choices (not inclusive)
334            * @return the range of matching polls choices
335            * @throws SystemException if a system exception occurred
336            */
337            public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
338                    long questionId, int start, int end)
339                    throws com.liferay.portal.kernel.exception.SystemException {
340                    return getPersistence().findByQuestionId(questionId, start, end);
341            }
342    
343            /**
344            * Returns an ordered range of all the polls choices where questionId = &#63;.
345            *
346            * <p>
347            * 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.
348            * </p>
349            *
350            * @param questionId the question ID
351            * @param start the lower bound of the range of polls choices
352            * @param end the upper bound of the range of polls choices (not inclusive)
353            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
354            * @return the ordered range of matching polls choices
355            * @throws SystemException if a system exception occurred
356            */
357            public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
358                    long questionId, int start, int end,
359                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence()
362                                       .findByQuestionId(questionId, start, end, orderByComparator);
363            }
364    
365            /**
366            * Returns the first polls choice in the ordered set where questionId = &#63;.
367            *
368            * <p>
369            * 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.
370            * </p>
371            *
372            * @param questionId the question ID
373            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
374            * @return the first matching polls choice
375            * @throws com.liferay.portlet.polls.NoSuchChoiceException if a matching polls choice could not be found
376            * @throws SystemException if a system exception occurred
377            */
378            public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_First(
379                    long questionId,
380                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
381                    throws com.liferay.portal.kernel.exception.SystemException,
382                            com.liferay.portlet.polls.NoSuchChoiceException {
383                    return getPersistence()
384                                       .findByQuestionId_First(questionId, orderByComparator);
385            }
386    
387            /**
388            * Returns the last polls choice in the ordered set where questionId = &#63;.
389            *
390            * <p>
391            * 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.
392            * </p>
393            *
394            * @param questionId the question ID
395            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
396            * @return the last matching polls choice
397            * @throws com.liferay.portlet.polls.NoSuchChoiceException if a matching polls choice could not be found
398            * @throws SystemException if a system exception occurred
399            */
400            public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_Last(
401                    long questionId,
402                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
403                    throws com.liferay.portal.kernel.exception.SystemException,
404                            com.liferay.portlet.polls.NoSuchChoiceException {
405                    return getPersistence()
406                                       .findByQuestionId_Last(questionId, orderByComparator);
407            }
408    
409            /**
410            * Returns the polls choices before and after the current polls choice in the ordered set where questionId = &#63;.
411            *
412            * <p>
413            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
414            * </p>
415            *
416            * @param choiceId the primary key of the current polls choice
417            * @param questionId the question ID
418            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
419            * @return the previous, current, and next polls choice
420            * @throws com.liferay.portlet.polls.NoSuchChoiceException if a polls choice with the primary key could not be found
421            * @throws SystemException if a system exception occurred
422            */
423            public static com.liferay.portlet.polls.model.PollsChoice[] findByQuestionId_PrevAndNext(
424                    long choiceId, long questionId,
425                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
426                    throws com.liferay.portal.kernel.exception.SystemException,
427                            com.liferay.portlet.polls.NoSuchChoiceException {
428                    return getPersistence()
429                                       .findByQuestionId_PrevAndNext(choiceId, questionId,
430                            orderByComparator);
431            }
432    
433            /**
434            * Returns the polls choice where questionId = &#63; and name = &#63; or throws a {@link com.liferay.portlet.polls.NoSuchChoiceException} if it could not be found.
435            *
436            * @param questionId the question ID
437            * @param name the name
438            * @return the matching polls choice
439            * @throws com.liferay.portlet.polls.NoSuchChoiceException if a matching polls choice could not be found
440            * @throws SystemException if a system exception occurred
441            */
442            public static com.liferay.portlet.polls.model.PollsChoice findByQ_N(
443                    long questionId, java.lang.String name)
444                    throws com.liferay.portal.kernel.exception.SystemException,
445                            com.liferay.portlet.polls.NoSuchChoiceException {
446                    return getPersistence().findByQ_N(questionId, name);
447            }
448    
449            /**
450            * Returns the polls choice where questionId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
451            *
452            * @param questionId the question ID
453            * @param name the name
454            * @return the matching polls choice, or <code>null</code> if a matching polls choice could not be found
455            * @throws SystemException if a system exception occurred
456            */
457            public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
458                    long questionId, java.lang.String name)
459                    throws com.liferay.portal.kernel.exception.SystemException {
460                    return getPersistence().fetchByQ_N(questionId, name);
461            }
462    
463            /**
464            * Returns 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.
465            *
466            * @param questionId the question ID
467            * @param name the name
468            * @param retrieveFromCache whether to use the finder cache
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            * Returns 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            * Returns 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
497            * @param end the upper bound of the range of polls choices (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            * Returns 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
515            * @param end the upper bound of the range of polls choices (not inclusive)
516            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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
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
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
553            * @param name the name
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            * Returns the number of polls choices where uuid = &#63;.
574            *
575            * @param uuid the uuid
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            * Returns the number of polls choices where questionId = &#63;.
586            *
587            * @param questionId the question ID
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            * Returns the number of polls choices where questionId = &#63; and name = &#63;.
598            *
599            * @param questionId the question ID
600            * @param name the name
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            * Returns the number of 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                            ReferenceRegistry.registerReference(PollsChoiceUtil.class,
625                                    "_persistence");
626                    }
627    
628                    return _persistence;
629            }
630    
631            public void setPersistence(PollsChoicePersistence persistence) {
632                    _persistence = persistence;
633    
634                    ReferenceRegistry.registerReference(PollsChoiceUtil.class,
635                            "_persistence");
636            }
637    
638            private static PollsChoicePersistence _persistence;
639    }