1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.polls.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  
21  import com.liferay.portlet.polls.model.PollsQuestion;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="PollsQuestionUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       PollsQuestionPersistence
35   * @see       PollsQuestionPersistenceImpl
36   * @generated
37   */
38  public class PollsQuestionUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(PollsQuestion)
48       */
49      public static void clearCache(PollsQuestion pollsQuestion) {
50          getPersistence().clearCache(pollsQuestion);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<PollsQuestion> findWithDynamicQuery(
65          DynamicQuery dynamicQuery) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<PollsQuestion> findWithDynamicQuery(
73          DynamicQuery dynamicQuery, int start, int end)
74          throws SystemException {
75          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
80       */
81      public static PollsQuestion remove(PollsQuestion pollsQuestion)
82          throws SystemException {
83          return getPersistence().remove(pollsQuestion);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static PollsQuestion update(PollsQuestion pollsQuestion,
90          boolean merge) throws SystemException {
91          return getPersistence().update(pollsQuestion, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion) {
96          getPersistence().cacheResult(pollsQuestion);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.polls.model.PollsQuestion> pollsQuestions) {
101         getPersistence().cacheResult(pollsQuestions);
102     }
103 
104     public static com.liferay.portlet.polls.model.PollsQuestion create(
105         long questionId) {
106         return getPersistence().create(questionId);
107     }
108 
109     public static com.liferay.portlet.polls.model.PollsQuestion remove(
110         long questionId)
111         throws com.liferay.portal.kernel.exception.SystemException,
112             com.liferay.portlet.polls.NoSuchQuestionException {
113         return getPersistence().remove(questionId);
114     }
115 
116     public static com.liferay.portlet.polls.model.PollsQuestion updateImpl(
117         com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
118         boolean merge)
119         throws com.liferay.portal.kernel.exception.SystemException {
120         return getPersistence().updateImpl(pollsQuestion, merge);
121     }
122 
123     public static com.liferay.portlet.polls.model.PollsQuestion findByPrimaryKey(
124         long questionId)
125         throws com.liferay.portal.kernel.exception.SystemException,
126             com.liferay.portlet.polls.NoSuchQuestionException {
127         return getPersistence().findByPrimaryKey(questionId);
128     }
129 
130     public static com.liferay.portlet.polls.model.PollsQuestion fetchByPrimaryKey(
131         long questionId)
132         throws com.liferay.portal.kernel.exception.SystemException {
133         return getPersistence().fetchByPrimaryKey(questionId);
134     }
135 
136     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
137         java.lang.String uuid)
138         throws com.liferay.portal.kernel.exception.SystemException {
139         return getPersistence().findByUuid(uuid);
140     }
141 
142     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
143         java.lang.String uuid, int start, int end)
144         throws com.liferay.portal.kernel.exception.SystemException {
145         return getPersistence().findByUuid(uuid, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
149         java.lang.String uuid, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151         throws com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence().findByUuid(uuid, start, end, orderByComparator);
153     }
154 
155     public static com.liferay.portlet.polls.model.PollsQuestion findByUuid_First(
156         java.lang.String uuid,
157         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158         throws com.liferay.portal.kernel.exception.SystemException,
159             com.liferay.portlet.polls.NoSuchQuestionException {
160         return getPersistence().findByUuid_First(uuid, orderByComparator);
161     }
162 
163     public static com.liferay.portlet.polls.model.PollsQuestion findByUuid_Last(
164         java.lang.String uuid,
165         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166         throws com.liferay.portal.kernel.exception.SystemException,
167             com.liferay.portlet.polls.NoSuchQuestionException {
168         return getPersistence().findByUuid_Last(uuid, orderByComparator);
169     }
170 
171     public static com.liferay.portlet.polls.model.PollsQuestion[] findByUuid_PrevAndNext(
172         long questionId, java.lang.String uuid,
173         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
174         throws com.liferay.portal.kernel.exception.SystemException,
175             com.liferay.portlet.polls.NoSuchQuestionException {
176         return getPersistence()
177                    .findByUuid_PrevAndNext(questionId, uuid, orderByComparator);
178     }
179 
180     public static com.liferay.portlet.polls.model.PollsQuestion findByUUID_G(
181         java.lang.String uuid, long groupId)
182         throws com.liferay.portal.kernel.exception.SystemException,
183             com.liferay.portlet.polls.NoSuchQuestionException {
184         return getPersistence().findByUUID_G(uuid, groupId);
185     }
186 
187     public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G(
188         java.lang.String uuid, long groupId)
189         throws com.liferay.portal.kernel.exception.SystemException {
190         return getPersistence().fetchByUUID_G(uuid, groupId);
191     }
192 
193     public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G(
194         java.lang.String uuid, long groupId, boolean retrieveFromCache)
195         throws com.liferay.portal.kernel.exception.SystemException {
196         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
197     }
198 
199     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
200         long groupId)
201         throws com.liferay.portal.kernel.exception.SystemException {
202         return getPersistence().findByGroupId(groupId);
203     }
204 
205     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
206         long groupId, int start, int end)
207         throws com.liferay.portal.kernel.exception.SystemException {
208         return getPersistence().findByGroupId(groupId, start, end);
209     }
210 
211     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
212         long groupId, int start, int end,
213         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214         throws com.liferay.portal.kernel.exception.SystemException {
215         return getPersistence()
216                    .findByGroupId(groupId, start, end, orderByComparator);
217     }
218 
219     public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_First(
220         long groupId,
221         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222         throws com.liferay.portal.kernel.exception.SystemException,
223             com.liferay.portlet.polls.NoSuchQuestionException {
224         return getPersistence().findByGroupId_First(groupId, orderByComparator);
225     }
226 
227     public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_Last(
228         long groupId,
229         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230         throws com.liferay.portal.kernel.exception.SystemException,
231             com.liferay.portlet.polls.NoSuchQuestionException {
232         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
233     }
234 
235     public static com.liferay.portlet.polls.model.PollsQuestion[] findByGroupId_PrevAndNext(
236         long questionId, long groupId,
237         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
238         throws com.liferay.portal.kernel.exception.SystemException,
239             com.liferay.portlet.polls.NoSuchQuestionException {
240         return getPersistence()
241                    .findByGroupId_PrevAndNext(questionId, groupId,
242             orderByComparator);
243     }
244 
245     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId(
246         long groupId)
247         throws com.liferay.portal.kernel.exception.SystemException {
248         return getPersistence().filterFindByGroupId(groupId);
249     }
250 
251     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId(
252         long groupId, int start, int end)
253         throws com.liferay.portal.kernel.exception.SystemException {
254         return getPersistence().filterFindByGroupId(groupId, start, end);
255     }
256 
257     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId(
258         long groupId, int start, int end,
259         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
260         throws com.liferay.portal.kernel.exception.SystemException {
261         return getPersistence()
262                    .filterFindByGroupId(groupId, start, end, orderByComparator);
263     }
264 
265     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll()
266         throws com.liferay.portal.kernel.exception.SystemException {
267         return getPersistence().findAll();
268     }
269 
270     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll(
271         int start, int end)
272         throws com.liferay.portal.kernel.exception.SystemException {
273         return getPersistence().findAll(start, end);
274     }
275 
276     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll(
277         int start, int end,
278         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
279         throws com.liferay.portal.kernel.exception.SystemException {
280         return getPersistence().findAll(start, end, orderByComparator);
281     }
282 
283     public static void removeByUuid(java.lang.String uuid)
284         throws com.liferay.portal.kernel.exception.SystemException {
285         getPersistence().removeByUuid(uuid);
286     }
287 
288     public static void removeByUUID_G(java.lang.String uuid, long groupId)
289         throws com.liferay.portal.kernel.exception.SystemException,
290             com.liferay.portlet.polls.NoSuchQuestionException {
291         getPersistence().removeByUUID_G(uuid, groupId);
292     }
293 
294     public static void removeByGroupId(long groupId)
295         throws com.liferay.portal.kernel.exception.SystemException {
296         getPersistence().removeByGroupId(groupId);
297     }
298 
299     public static void removeAll()
300         throws com.liferay.portal.kernel.exception.SystemException {
301         getPersistence().removeAll();
302     }
303 
304     public static int countByUuid(java.lang.String uuid)
305         throws com.liferay.portal.kernel.exception.SystemException {
306         return getPersistence().countByUuid(uuid);
307     }
308 
309     public static int countByUUID_G(java.lang.String uuid, long groupId)
310         throws com.liferay.portal.kernel.exception.SystemException {
311         return getPersistence().countByUUID_G(uuid, groupId);
312     }
313 
314     public static int countByGroupId(long groupId)
315         throws com.liferay.portal.kernel.exception.SystemException {
316         return getPersistence().countByGroupId(groupId);
317     }
318 
319     public static int filterCountByGroupId(long groupId)
320         throws com.liferay.portal.kernel.exception.SystemException {
321         return getPersistence().filterCountByGroupId(groupId);
322     }
323 
324     public static int countAll()
325         throws com.liferay.portal.kernel.exception.SystemException {
326         return getPersistence().countAll();
327     }
328 
329     public static PollsQuestionPersistence getPersistence() {
330         if (_persistence == null) {
331             _persistence = (PollsQuestionPersistence)PortalBeanLocatorUtil.locate(PollsQuestionPersistence.class.getName());
332         }
333 
334         return _persistence;
335     }
336 
337     public void setPersistence(PollsQuestionPersistence persistence) {
338         _persistence = persistence;
339     }
340 
341     private static PollsQuestionPersistence _persistence;
342 }