001    /**
002     * Copyright (c) 2000-2011 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.PollsQuestion;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the polls question service. This utility wraps {@link PollsQuestionPersistenceImpl} 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 PollsQuestionPersistence
037     * @see PollsQuestionPersistenceImpl
038     * @generated
039     */
040    public class PollsQuestionUtil {
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(PollsQuestion pollsQuestion) {
058                    getPersistence().clearCache(pollsQuestion);
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<PollsQuestion> 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<PollsQuestion> 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<PollsQuestion> 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#remove(com.liferay.portal.model.BaseModel)
099             */
100            public static PollsQuestion remove(PollsQuestion pollsQuestion)
101                    throws SystemException {
102                    return getPersistence().remove(pollsQuestion);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
107             */
108            public static PollsQuestion update(PollsQuestion pollsQuestion,
109                    boolean merge) throws SystemException {
110                    return getPersistence().update(pollsQuestion, merge);
111            }
112    
113            /**
114             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
115             */
116            public static PollsQuestion update(PollsQuestion pollsQuestion,
117                    boolean merge, ServiceContext serviceContext) throws SystemException {
118                    return getPersistence().update(pollsQuestion, merge, serviceContext);
119            }
120    
121            /**
122            * Caches the polls question in the entity cache if it is enabled.
123            *
124            * @param pollsQuestion the polls question
125            */
126            public static void cacheResult(
127                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion) {
128                    getPersistence().cacheResult(pollsQuestion);
129            }
130    
131            /**
132            * Caches the polls questions in the entity cache if it is enabled.
133            *
134            * @param pollsQuestions the polls questions
135            */
136            public static void cacheResult(
137                    java.util.List<com.liferay.portlet.polls.model.PollsQuestion> pollsQuestions) {
138                    getPersistence().cacheResult(pollsQuestions);
139            }
140    
141            /**
142            * Creates a new polls question with the primary key. Does not add the polls question to the database.
143            *
144            * @param questionId the primary key for the new polls question
145            * @return the new polls question
146            */
147            public static com.liferay.portlet.polls.model.PollsQuestion create(
148                    long questionId) {
149                    return getPersistence().create(questionId);
150            }
151    
152            /**
153            * Removes the polls question with the primary key from the database. Also notifies the appropriate model listeners.
154            *
155            * @param questionId the primary key of the polls question
156            * @return the polls question that was removed
157            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            public static com.liferay.portlet.polls.model.PollsQuestion remove(
161                    long questionId)
162                    throws com.liferay.portal.kernel.exception.SystemException,
163                            com.liferay.portlet.polls.NoSuchQuestionException {
164                    return getPersistence().remove(questionId);
165            }
166    
167            public static com.liferay.portlet.polls.model.PollsQuestion updateImpl(
168                    com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
169                    boolean merge)
170                    throws com.liferay.portal.kernel.exception.SystemException {
171                    return getPersistence().updateImpl(pollsQuestion, merge);
172            }
173    
174            /**
175            * Returns the polls question with the primary key or throws a {@link com.liferay.portlet.polls.NoSuchQuestionException} if it could not be found.
176            *
177            * @param questionId the primary key of the polls question
178            * @return the polls question
179            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found
180            * @throws SystemException if a system exception occurred
181            */
182            public static com.liferay.portlet.polls.model.PollsQuestion findByPrimaryKey(
183                    long questionId)
184                    throws com.liferay.portal.kernel.exception.SystemException,
185                            com.liferay.portlet.polls.NoSuchQuestionException {
186                    return getPersistence().findByPrimaryKey(questionId);
187            }
188    
189            /**
190            * Returns the polls question with the primary key or returns <code>null</code> if it could not be found.
191            *
192            * @param questionId the primary key of the polls question
193            * @return the polls question, or <code>null</code> if a polls question with the primary key could not be found
194            * @throws SystemException if a system exception occurred
195            */
196            public static com.liferay.portlet.polls.model.PollsQuestion fetchByPrimaryKey(
197                    long questionId)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getPersistence().fetchByPrimaryKey(questionId);
200            }
201    
202            /**
203            * Returns all the polls questions where uuid = &#63;.
204            *
205            * @param uuid the uuid
206            * @return the matching polls questions
207            * @throws SystemException if a system exception occurred
208            */
209            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
210                    java.lang.String uuid)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getPersistence().findByUuid(uuid);
213            }
214    
215            /**
216            * Returns a range of all the polls questions where uuid = &#63;.
217            *
218            * <p>
219            * 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.
220            * </p>
221            *
222            * @param uuid the uuid
223            * @param start the lower bound of the range of polls questions
224            * @param end the upper bound of the range of polls questions (not inclusive)
225            * @return the range of matching polls questions
226            * @throws SystemException if a system exception occurred
227            */
228            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
229                    java.lang.String uuid, int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getPersistence().findByUuid(uuid, start, end);
232            }
233    
234            /**
235            * Returns an ordered range of all the polls questions where uuid = &#63;.
236            *
237            * <p>
238            * 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.
239            * </p>
240            *
241            * @param uuid the uuid
242            * @param start the lower bound of the range of polls questions
243            * @param end the upper bound of the range of polls questions (not inclusive)
244            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
245            * @return the ordered range of matching polls questions
246            * @throws SystemException if a system exception occurred
247            */
248            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
249                    java.lang.String uuid, int start, int end,
250                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251                    throws com.liferay.portal.kernel.exception.SystemException {
252                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
253            }
254    
255            /**
256            * Returns the first polls question in the ordered set where uuid = &#63;.
257            *
258            * <p>
259            * 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.
260            * </p>
261            *
262            * @param uuid the uuid
263            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
264            * @return the first matching polls question
265            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found
266            * @throws SystemException if a system exception occurred
267            */
268            public static com.liferay.portlet.polls.model.PollsQuestion findByUuid_First(
269                    java.lang.String uuid,
270                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
271                    throws com.liferay.portal.kernel.exception.SystemException,
272                            com.liferay.portlet.polls.NoSuchQuestionException {
273                    return getPersistence().findByUuid_First(uuid, orderByComparator);
274            }
275    
276            /**
277            * Returns the last polls question in the ordered set where uuid = &#63;.
278            *
279            * <p>
280            * 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.
281            * </p>
282            *
283            * @param uuid the uuid
284            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
285            * @return the last matching polls question
286            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found
287            * @throws SystemException if a system exception occurred
288            */
289            public static com.liferay.portlet.polls.model.PollsQuestion findByUuid_Last(
290                    java.lang.String uuid,
291                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
292                    throws com.liferay.portal.kernel.exception.SystemException,
293                            com.liferay.portlet.polls.NoSuchQuestionException {
294                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
295            }
296    
297            /**
298            * Returns the polls questions before and after the current polls question in the ordered set where uuid = &#63;.
299            *
300            * <p>
301            * 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.
302            * </p>
303            *
304            * @param questionId the primary key of the current polls question
305            * @param uuid the uuid
306            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
307            * @return the previous, current, and next polls question
308            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found
309            * @throws SystemException if a system exception occurred
310            */
311            public static com.liferay.portlet.polls.model.PollsQuestion[] findByUuid_PrevAndNext(
312                    long questionId, java.lang.String uuid,
313                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
314                    throws com.liferay.portal.kernel.exception.SystemException,
315                            com.liferay.portlet.polls.NoSuchQuestionException {
316                    return getPersistence()
317                                       .findByUuid_PrevAndNext(questionId, uuid, orderByComparator);
318            }
319    
320            /**
321            * Returns the polls question where uuid = &#63; and groupId = &#63; or throws a {@link com.liferay.portlet.polls.NoSuchQuestionException} if it could not be found.
322            *
323            * @param uuid the uuid
324            * @param groupId the group ID
325            * @return the matching polls question
326            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found
327            * @throws SystemException if a system exception occurred
328            */
329            public static com.liferay.portlet.polls.model.PollsQuestion findByUUID_G(
330                    java.lang.String uuid, long groupId)
331                    throws com.liferay.portal.kernel.exception.SystemException,
332                            com.liferay.portlet.polls.NoSuchQuestionException {
333                    return getPersistence().findByUUID_G(uuid, groupId);
334            }
335    
336            /**
337            * Returns the polls question where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
338            *
339            * @param uuid the uuid
340            * @param groupId the group ID
341            * @return the matching polls question, or <code>null</code> if a matching polls question could not be found
342            * @throws SystemException if a system exception occurred
343            */
344            public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G(
345                    java.lang.String uuid, long groupId)
346                    throws com.liferay.portal.kernel.exception.SystemException {
347                    return getPersistence().fetchByUUID_G(uuid, groupId);
348            }
349    
350            /**
351            * Returns the polls question where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
352            *
353            * @param uuid the uuid
354            * @param groupId the group ID
355            * @param retrieveFromCache whether to use the finder cache
356            * @return the matching polls question, or <code>null</code> if a matching polls question could not be found
357            * @throws SystemException if a system exception occurred
358            */
359            public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G(
360                    java.lang.String uuid, long groupId, boolean retrieveFromCache)
361                    throws com.liferay.portal.kernel.exception.SystemException {
362                    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
363            }
364    
365            /**
366            * Returns all the polls questions where groupId = &#63;.
367            *
368            * @param groupId the group ID
369            * @return the matching polls questions
370            * @throws SystemException if a system exception occurred
371            */
372            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
373                    long groupId)
374                    throws com.liferay.portal.kernel.exception.SystemException {
375                    return getPersistence().findByGroupId(groupId);
376            }
377    
378            /**
379            * Returns a range of all the polls questions where groupId = &#63;.
380            *
381            * <p>
382            * 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.
383            * </p>
384            *
385            * @param groupId the group ID
386            * @param start the lower bound of the range of polls questions
387            * @param end the upper bound of the range of polls questions (not inclusive)
388            * @return the range of matching polls questions
389            * @throws SystemException if a system exception occurred
390            */
391            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
392                    long groupId, int start, int end)
393                    throws com.liferay.portal.kernel.exception.SystemException {
394                    return getPersistence().findByGroupId(groupId, start, end);
395            }
396    
397            /**
398            * Returns an ordered range of all the polls questions where groupId = &#63;.
399            *
400            * <p>
401            * 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.
402            * </p>
403            *
404            * @param groupId the group ID
405            * @param start the lower bound of the range of polls questions
406            * @param end the upper bound of the range of polls questions (not inclusive)
407            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
408            * @return the ordered range of matching polls questions
409            * @throws SystemException if a system exception occurred
410            */
411            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
412                    long groupId, int start, int end,
413                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
414                    throws com.liferay.portal.kernel.exception.SystemException {
415                    return getPersistence()
416                                       .findByGroupId(groupId, start, end, orderByComparator);
417            }
418    
419            /**
420            * Returns the first polls question in the ordered set where groupId = &#63;.
421            *
422            * <p>
423            * 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.
424            * </p>
425            *
426            * @param groupId the group ID
427            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
428            * @return the first matching polls question
429            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found
430            * @throws SystemException if a system exception occurred
431            */
432            public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_First(
433                    long groupId,
434                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
435                    throws com.liferay.portal.kernel.exception.SystemException,
436                            com.liferay.portlet.polls.NoSuchQuestionException {
437                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
438            }
439    
440            /**
441            * Returns the last polls question in the ordered set where groupId = &#63;.
442            *
443            * <p>
444            * 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.
445            * </p>
446            *
447            * @param groupId the group ID
448            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
449            * @return the last matching polls question
450            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found
451            * @throws SystemException if a system exception occurred
452            */
453            public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_Last(
454                    long groupId,
455                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
456                    throws com.liferay.portal.kernel.exception.SystemException,
457                            com.liferay.portlet.polls.NoSuchQuestionException {
458                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
459            }
460    
461            /**
462            * Returns the polls questions before and after the current polls question in the ordered set where groupId = &#63;.
463            *
464            * <p>
465            * 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.
466            * </p>
467            *
468            * @param questionId the primary key of the current polls question
469            * @param groupId the group ID
470            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
471            * @return the previous, current, and next polls question
472            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found
473            * @throws SystemException if a system exception occurred
474            */
475            public static com.liferay.portlet.polls.model.PollsQuestion[] findByGroupId_PrevAndNext(
476                    long questionId, long groupId,
477                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
478                    throws com.liferay.portal.kernel.exception.SystemException,
479                            com.liferay.portlet.polls.NoSuchQuestionException {
480                    return getPersistence()
481                                       .findByGroupId_PrevAndNext(questionId, groupId,
482                            orderByComparator);
483            }
484    
485            /**
486            * Returns all the polls questions that the user has permission to view where groupId = &#63;.
487            *
488            * @param groupId the group ID
489            * @return the matching polls questions that the user has permission to view
490            * @throws SystemException if a system exception occurred
491            */
492            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId(
493                    long groupId)
494                    throws com.liferay.portal.kernel.exception.SystemException {
495                    return getPersistence().filterFindByGroupId(groupId);
496            }
497    
498            /**
499            * Returns a range of all the polls questions that the user has permission to view where groupId = &#63;.
500            *
501            * <p>
502            * 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.
503            * </p>
504            *
505            * @param groupId the group ID
506            * @param start the lower bound of the range of polls questions
507            * @param end the upper bound of the range of polls questions (not inclusive)
508            * @return the range of matching polls questions that the user has permission to view
509            * @throws SystemException if a system exception occurred
510            */
511            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId(
512                    long groupId, int start, int end)
513                    throws com.liferay.portal.kernel.exception.SystemException {
514                    return getPersistence().filterFindByGroupId(groupId, start, end);
515            }
516    
517            /**
518            * Returns an ordered range of all the polls questions that the user has permissions to view where groupId = &#63;.
519            *
520            * <p>
521            * 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.
522            * </p>
523            *
524            * @param groupId the group ID
525            * @param start the lower bound of the range of polls questions
526            * @param end the upper bound of the range of polls questions (not inclusive)
527            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
528            * @return the ordered range of matching polls questions that the user has permission to view
529            * @throws SystemException if a system exception occurred
530            */
531            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId(
532                    long groupId, int start, int end,
533                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
534                    throws com.liferay.portal.kernel.exception.SystemException {
535                    return getPersistence()
536                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
537            }
538    
539            /**
540            * Returns the polls questions before and after the current polls question in the ordered set of polls questions that the user has permission to view where groupId = &#63;.
541            *
542            * @param questionId the primary key of the current polls question
543            * @param groupId the group ID
544            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
545            * @return the previous, current, and next polls question
546            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found
547            * @throws SystemException if a system exception occurred
548            */
549            public static com.liferay.portlet.polls.model.PollsQuestion[] filterFindByGroupId_PrevAndNext(
550                    long questionId, long groupId,
551                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
552                    throws com.liferay.portal.kernel.exception.SystemException,
553                            com.liferay.portlet.polls.NoSuchQuestionException {
554                    return getPersistence()
555                                       .filterFindByGroupId_PrevAndNext(questionId, groupId,
556                            orderByComparator);
557            }
558    
559            /**
560            * Returns all the polls questions.
561            *
562            * @return the polls questions
563            * @throws SystemException if a system exception occurred
564            */
565            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll()
566                    throws com.liferay.portal.kernel.exception.SystemException {
567                    return getPersistence().findAll();
568            }
569    
570            /**
571            * Returns a range of all the polls questions.
572            *
573            * <p>
574            * 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.
575            * </p>
576            *
577            * @param start the lower bound of the range of polls questions
578            * @param end the upper bound of the range of polls questions (not inclusive)
579            * @return the range of polls questions
580            * @throws SystemException if a system exception occurred
581            */
582            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll(
583                    int start, int end)
584                    throws com.liferay.portal.kernel.exception.SystemException {
585                    return getPersistence().findAll(start, end);
586            }
587    
588            /**
589            * Returns an ordered range of all the polls questions.
590            *
591            * <p>
592            * 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.
593            * </p>
594            *
595            * @param start the lower bound of the range of polls questions
596            * @param end the upper bound of the range of polls questions (not inclusive)
597            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
598            * @return the ordered range of polls questions
599            * @throws SystemException if a system exception occurred
600            */
601            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll(
602                    int start, int end,
603                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
604                    throws com.liferay.portal.kernel.exception.SystemException {
605                    return getPersistence().findAll(start, end, orderByComparator);
606            }
607    
608            /**
609            * Removes all the polls questions where uuid = &#63; from the database.
610            *
611            * @param uuid the uuid
612            * @throws SystemException if a system exception occurred
613            */
614            public static void removeByUuid(java.lang.String uuid)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    getPersistence().removeByUuid(uuid);
617            }
618    
619            /**
620            * Removes the polls question where uuid = &#63; and groupId = &#63; from the database.
621            *
622            * @param uuid the uuid
623            * @param groupId the group ID
624            * @throws SystemException if a system exception occurred
625            */
626            public static void removeByUUID_G(java.lang.String uuid, long groupId)
627                    throws com.liferay.portal.kernel.exception.SystemException,
628                            com.liferay.portlet.polls.NoSuchQuestionException {
629                    getPersistence().removeByUUID_G(uuid, groupId);
630            }
631    
632            /**
633            * Removes all the polls questions where groupId = &#63; from the database.
634            *
635            * @param groupId the group ID
636            * @throws SystemException if a system exception occurred
637            */
638            public static void removeByGroupId(long groupId)
639                    throws com.liferay.portal.kernel.exception.SystemException {
640                    getPersistence().removeByGroupId(groupId);
641            }
642    
643            /**
644            * Removes all the polls questions from the database.
645            *
646            * @throws SystemException if a system exception occurred
647            */
648            public static void removeAll()
649                    throws com.liferay.portal.kernel.exception.SystemException {
650                    getPersistence().removeAll();
651            }
652    
653            /**
654            * Returns the number of polls questions where uuid = &#63;.
655            *
656            * @param uuid the uuid
657            * @return the number of matching polls questions
658            * @throws SystemException if a system exception occurred
659            */
660            public static int countByUuid(java.lang.String uuid)
661                    throws com.liferay.portal.kernel.exception.SystemException {
662                    return getPersistence().countByUuid(uuid);
663            }
664    
665            /**
666            * Returns the number of polls questions where uuid = &#63; and groupId = &#63;.
667            *
668            * @param uuid the uuid
669            * @param groupId the group ID
670            * @return the number of matching polls questions
671            * @throws SystemException if a system exception occurred
672            */
673            public static int countByUUID_G(java.lang.String uuid, long groupId)
674                    throws com.liferay.portal.kernel.exception.SystemException {
675                    return getPersistence().countByUUID_G(uuid, groupId);
676            }
677    
678            /**
679            * Returns the number of polls questions where groupId = &#63;.
680            *
681            * @param groupId the group ID
682            * @return the number of matching polls questions
683            * @throws SystemException if a system exception occurred
684            */
685            public static int countByGroupId(long groupId)
686                    throws com.liferay.portal.kernel.exception.SystemException {
687                    return getPersistence().countByGroupId(groupId);
688            }
689    
690            /**
691            * Returns the number of polls questions that the user has permission to view where groupId = &#63;.
692            *
693            * @param groupId the group ID
694            * @return the number of matching polls questions that the user has permission to view
695            * @throws SystemException if a system exception occurred
696            */
697            public static int filterCountByGroupId(long groupId)
698                    throws com.liferay.portal.kernel.exception.SystemException {
699                    return getPersistence().filterCountByGroupId(groupId);
700            }
701    
702            /**
703            * Returns the number of polls questions.
704            *
705            * @return the number of polls questions
706            * @throws SystemException if a system exception occurred
707            */
708            public static int countAll()
709                    throws com.liferay.portal.kernel.exception.SystemException {
710                    return getPersistence().countAll();
711            }
712    
713            public static PollsQuestionPersistence getPersistence() {
714                    if (_persistence == null) {
715                            _persistence = (PollsQuestionPersistence)PortalBeanLocatorUtil.locate(PollsQuestionPersistence.class.getName());
716    
717                            ReferenceRegistry.registerReference(PollsQuestionUtil.class,
718                                    "_persistence");
719                    }
720    
721                    return _persistence;
722            }
723    
724            public void setPersistence(PollsQuestionPersistence persistence) {
725                    _persistence = persistence;
726    
727                    ReferenceRegistry.registerReference(PollsQuestionUtil.class,
728                            "_persistence");
729            }
730    
731            private static PollsQuestionPersistence _persistence;
732    }