001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 to cache
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 to cache
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 to remove
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            * Finds 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 to find
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            * Finds 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 to find
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            * Finds all the polls questions where uuid = &#63;.
204            *
205            * @param uuid the uuid to search with
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            * Finds 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 to search with
223            * @param start the lower bound of the range of polls questions to return
224            * @param end the upper bound of the range of polls questions to return (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            * Finds 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 to search with
242            * @param start the lower bound of the range of polls questions to return
243            * @param end the upper bound of the range of polls questions to return (not inclusive)
244            * @param orderByComparator the comparator to order the results by
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            * Finds 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 to search with
263            * @param orderByComparator the comparator to order the set by
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            * Finds 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 to search with
284            * @param orderByComparator the comparator to order the set by
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            * Finds 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 to search with
306            * @param orderByComparator the comparator to order the set by
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            * Finds 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 to search with
324            * @param groupId the group ID to search with
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            * Finds 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 to search with
340            * @param groupId the group ID to search with
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            * Finds 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 to search with
354            * @param groupId the group ID to search with
355            * @return the matching polls question, or <code>null</code> if a matching polls question could not be found
356            * @throws SystemException if a system exception occurred
357            */
358            public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G(
359                    java.lang.String uuid, long groupId, boolean retrieveFromCache)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
362            }
363    
364            /**
365            * Finds all the polls questions where groupId = &#63;.
366            *
367            * @param groupId the group ID to search with
368            * @return the matching polls questions
369            * @throws SystemException if a system exception occurred
370            */
371            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
372                    long groupId)
373                    throws com.liferay.portal.kernel.exception.SystemException {
374                    return getPersistence().findByGroupId(groupId);
375            }
376    
377            /**
378            * Finds a range of all the polls questions where groupId = &#63;.
379            *
380            * <p>
381            * 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.
382            * </p>
383            *
384            * @param groupId the group ID to search with
385            * @param start the lower bound of the range of polls questions to return
386            * @param end the upper bound of the range of polls questions to return (not inclusive)
387            * @return the range of matching polls questions
388            * @throws SystemException if a system exception occurred
389            */
390            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
391                    long groupId, int start, int end)
392                    throws com.liferay.portal.kernel.exception.SystemException {
393                    return getPersistence().findByGroupId(groupId, start, end);
394            }
395    
396            /**
397            * Finds an ordered range of all the polls questions where groupId = &#63;.
398            *
399            * <p>
400            * 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.
401            * </p>
402            *
403            * @param groupId the group ID to search with
404            * @param start the lower bound of the range of polls questions to return
405            * @param end the upper bound of the range of polls questions to return (not inclusive)
406            * @param orderByComparator the comparator to order the results by
407            * @return the ordered range of matching polls questions
408            * @throws SystemException if a system exception occurred
409            */
410            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
411                    long groupId, int start, int end,
412                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
413                    throws com.liferay.portal.kernel.exception.SystemException {
414                    return getPersistence()
415                                       .findByGroupId(groupId, start, end, orderByComparator);
416            }
417    
418            /**
419            * Finds the first polls question in the ordered set where groupId = &#63;.
420            *
421            * <p>
422            * 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.
423            * </p>
424            *
425            * @param groupId the group ID to search with
426            * @param orderByComparator the comparator to order the set by
427            * @return the first matching polls question
428            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found
429            * @throws SystemException if a system exception occurred
430            */
431            public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_First(
432                    long groupId,
433                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
434                    throws com.liferay.portal.kernel.exception.SystemException,
435                            com.liferay.portlet.polls.NoSuchQuestionException {
436                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
437            }
438    
439            /**
440            * Finds the last polls question in the ordered set where groupId = &#63;.
441            *
442            * <p>
443            * 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.
444            * </p>
445            *
446            * @param groupId the group ID to search with
447            * @param orderByComparator the comparator to order the set by
448            * @return the last matching polls question
449            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found
450            * @throws SystemException if a system exception occurred
451            */
452            public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_Last(
453                    long groupId,
454                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
455                    throws com.liferay.portal.kernel.exception.SystemException,
456                            com.liferay.portlet.polls.NoSuchQuestionException {
457                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
458            }
459    
460            /**
461            * Finds the polls questions before and after the current polls question in the ordered set where groupId = &#63;.
462            *
463            * <p>
464            * 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.
465            * </p>
466            *
467            * @param questionId the primary key of the current polls question
468            * @param groupId the group ID to search with
469            * @param orderByComparator the comparator to order the set by
470            * @return the previous, current, and next polls question
471            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found
472            * @throws SystemException if a system exception occurred
473            */
474            public static com.liferay.portlet.polls.model.PollsQuestion[] findByGroupId_PrevAndNext(
475                    long questionId, long groupId,
476                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
477                    throws com.liferay.portal.kernel.exception.SystemException,
478                            com.liferay.portlet.polls.NoSuchQuestionException {
479                    return getPersistence()
480                                       .findByGroupId_PrevAndNext(questionId, groupId,
481                            orderByComparator);
482            }
483    
484            /**
485            * Filters by the user's permissions and finds all the polls questions where groupId = &#63;.
486            *
487            * @param groupId the group ID to search with
488            * @return the matching polls questions that the user has permission to view
489            * @throws SystemException if a system exception occurred
490            */
491            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId(
492                    long groupId)
493                    throws com.liferay.portal.kernel.exception.SystemException {
494                    return getPersistence().filterFindByGroupId(groupId);
495            }
496    
497            /**
498            * Filters by the user's permissions and finds a range of all the polls questions where groupId = &#63;.
499            *
500            * <p>
501            * 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.
502            * </p>
503            *
504            * @param groupId the group ID to search with
505            * @param start the lower bound of the range of polls questions to return
506            * @param end the upper bound of the range of polls questions to return (not inclusive)
507            * @return the range of matching polls questions that the user has permission to view
508            * @throws SystemException if a system exception occurred
509            */
510            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId(
511                    long groupId, int start, int end)
512                    throws com.liferay.portal.kernel.exception.SystemException {
513                    return getPersistence().filterFindByGroupId(groupId, start, end);
514            }
515    
516            /**
517            * Filters by the user's permissions and finds an ordered range of all the polls questions where groupId = &#63;.
518            *
519            * <p>
520            * 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.
521            * </p>
522            *
523            * @param groupId the group ID to search with
524            * @param start the lower bound of the range of polls questions to return
525            * @param end the upper bound of the range of polls questions to return (not inclusive)
526            * @param orderByComparator the comparator to order the results by
527            * @return the ordered range of matching polls questions that the user has permission to view
528            * @throws SystemException if a system exception occurred
529            */
530            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId(
531                    long groupId, int start, int end,
532                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
533                    throws com.liferay.portal.kernel.exception.SystemException {
534                    return getPersistence()
535                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
536            }
537    
538            /**
539            * Filters the polls questions before and after the current polls question in the ordered set where groupId = &#63;.
540            *
541            * <p>
542            * 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.
543            * </p>
544            *
545            * @param questionId the primary key of the current polls question
546            * @param groupId the group ID to search with
547            * @param orderByComparator the comparator to order the set by
548            * @return the previous, current, and next polls question
549            * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found
550            * @throws SystemException if a system exception occurred
551            */
552            public static com.liferay.portlet.polls.model.PollsQuestion[] filterFindByGroupId_PrevAndNext(
553                    long questionId, long groupId,
554                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
555                    throws com.liferay.portal.kernel.exception.SystemException,
556                            com.liferay.portlet.polls.NoSuchQuestionException {
557                    return getPersistence()
558                                       .filterFindByGroupId_PrevAndNext(questionId, groupId,
559                            orderByComparator);
560            }
561    
562            /**
563            * Finds all the polls questions.
564            *
565            * @return the polls questions
566            * @throws SystemException if a system exception occurred
567            */
568            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll()
569                    throws com.liferay.portal.kernel.exception.SystemException {
570                    return getPersistence().findAll();
571            }
572    
573            /**
574            * Finds a range of all the polls questions.
575            *
576            * <p>
577            * 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.
578            * </p>
579            *
580            * @param start the lower bound of the range of polls questions to return
581            * @param end the upper bound of the range of polls questions to return (not inclusive)
582            * @return the range of polls questions
583            * @throws SystemException if a system exception occurred
584            */
585            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll(
586                    int start, int end)
587                    throws com.liferay.portal.kernel.exception.SystemException {
588                    return getPersistence().findAll(start, end);
589            }
590    
591            /**
592            * Finds an ordered range of all the polls questions.
593            *
594            * <p>
595            * 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.
596            * </p>
597            *
598            * @param start the lower bound of the range of polls questions to return
599            * @param end the upper bound of the range of polls questions to return (not inclusive)
600            * @param orderByComparator the comparator to order the results by
601            * @return the ordered range of polls questions
602            * @throws SystemException if a system exception occurred
603            */
604            public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll(
605                    int start, int end,
606                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
607                    throws com.liferay.portal.kernel.exception.SystemException {
608                    return getPersistence().findAll(start, end, orderByComparator);
609            }
610    
611            /**
612            * Removes all the polls questions where uuid = &#63; from the database.
613            *
614            * @param uuid the uuid to search with
615            * @throws SystemException if a system exception occurred
616            */
617            public static void removeByUuid(java.lang.String uuid)
618                    throws com.liferay.portal.kernel.exception.SystemException {
619                    getPersistence().removeByUuid(uuid);
620            }
621    
622            /**
623            * Removes the polls question where uuid = &#63; and groupId = &#63; from the database.
624            *
625            * @param uuid the uuid to search with
626            * @param groupId the group ID to search with
627            * @throws SystemException if a system exception occurred
628            */
629            public static void removeByUUID_G(java.lang.String uuid, long groupId)
630                    throws com.liferay.portal.kernel.exception.SystemException,
631                            com.liferay.portlet.polls.NoSuchQuestionException {
632                    getPersistence().removeByUUID_G(uuid, groupId);
633            }
634    
635            /**
636            * Removes all the polls questions where groupId = &#63; from the database.
637            *
638            * @param groupId the group ID to search with
639            * @throws SystemException if a system exception occurred
640            */
641            public static void removeByGroupId(long groupId)
642                    throws com.liferay.portal.kernel.exception.SystemException {
643                    getPersistence().removeByGroupId(groupId);
644            }
645    
646            /**
647            * Removes all the polls questions from the database.
648            *
649            * @throws SystemException if a system exception occurred
650            */
651            public static void removeAll()
652                    throws com.liferay.portal.kernel.exception.SystemException {
653                    getPersistence().removeAll();
654            }
655    
656            /**
657            * Counts all the polls questions where uuid = &#63;.
658            *
659            * @param uuid the uuid to search with
660            * @return the number of matching polls questions
661            * @throws SystemException if a system exception occurred
662            */
663            public static int countByUuid(java.lang.String uuid)
664                    throws com.liferay.portal.kernel.exception.SystemException {
665                    return getPersistence().countByUuid(uuid);
666            }
667    
668            /**
669            * Counts all the polls questions where uuid = &#63; and groupId = &#63;.
670            *
671            * @param uuid the uuid to search with
672            * @param groupId the group ID to search with
673            * @return the number of matching polls questions
674            * @throws SystemException if a system exception occurred
675            */
676            public static int countByUUID_G(java.lang.String uuid, long groupId)
677                    throws com.liferay.portal.kernel.exception.SystemException {
678                    return getPersistence().countByUUID_G(uuid, groupId);
679            }
680    
681            /**
682            * Counts all the polls questions where groupId = &#63;.
683            *
684            * @param groupId the group ID to search with
685            * @return the number of matching polls questions
686            * @throws SystemException if a system exception occurred
687            */
688            public static int countByGroupId(long groupId)
689                    throws com.liferay.portal.kernel.exception.SystemException {
690                    return getPersistence().countByGroupId(groupId);
691            }
692    
693            /**
694            * Filters by the user's permissions and counts all the polls questions where groupId = &#63;.
695            *
696            * @param groupId the group ID to search with
697            * @return the number of matching polls questions that the user has permission to view
698            * @throws SystemException if a system exception occurred
699            */
700            public static int filterCountByGroupId(long groupId)
701                    throws com.liferay.portal.kernel.exception.SystemException {
702                    return getPersistence().filterCountByGroupId(groupId);
703            }
704    
705            /**
706            * Counts all the polls questions.
707            *
708            * @return the number of polls questions
709            * @throws SystemException if a system exception occurred
710            */
711            public static int countAll()
712                    throws com.liferay.portal.kernel.exception.SystemException {
713                    return getPersistence().countAll();
714            }
715    
716            public static PollsQuestionPersistence getPersistence() {
717                    if (_persistence == null) {
718                            _persistence = (PollsQuestionPersistence)PortalBeanLocatorUtil.locate(PollsQuestionPersistence.class.getName());
719    
720                            ReferenceRegistry.registerReference(PollsQuestionUtil.class,
721                                    "_persistence");
722                    }
723    
724                    return _persistence;
725            }
726    
727            public void setPersistence(PollsQuestionPersistence persistence) {
728                    _persistence = persistence;
729    
730                    ReferenceRegistry.registerReference(PollsQuestionUtil.class,
731                            "_persistence");
732            }
733    
734            private static PollsQuestionPersistence _persistence;
735    }