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#findWithDynamicQuery(DynamicQuery)
48       */
49      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50          throws SystemException {
51          return getPersistence().findWithDynamicQuery(dynamicQuery);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
58          int start, int end) throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
64       */
65      public static PollsQuestion remove(PollsQuestion pollsQuestion)
66          throws SystemException {
67          return getPersistence().remove(pollsQuestion);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
72       */
73      public static PollsQuestion update(PollsQuestion pollsQuestion,
74          boolean merge) throws SystemException {
75          return getPersistence().update(pollsQuestion, merge);
76      }
77  
78      public static void cacheResult(
79          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion) {
80          getPersistence().cacheResult(pollsQuestion);
81      }
82  
83      public static void cacheResult(
84          java.util.List<com.liferay.portlet.polls.model.PollsQuestion> pollsQuestions) {
85          getPersistence().cacheResult(pollsQuestions);
86      }
87  
88      public static com.liferay.portlet.polls.model.PollsQuestion create(
89          long questionId) {
90          return getPersistence().create(questionId);
91      }
92  
93      public static com.liferay.portlet.polls.model.PollsQuestion remove(
94          long questionId)
95          throws com.liferay.portal.kernel.exception.SystemException,
96              com.liferay.portlet.polls.NoSuchQuestionException {
97          return getPersistence().remove(questionId);
98      }
99  
100     public static com.liferay.portlet.polls.model.PollsQuestion updateImpl(
101         com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
102         boolean merge)
103         throws com.liferay.portal.kernel.exception.SystemException {
104         return getPersistence().updateImpl(pollsQuestion, merge);
105     }
106 
107     public static com.liferay.portlet.polls.model.PollsQuestion findByPrimaryKey(
108         long questionId)
109         throws com.liferay.portal.kernel.exception.SystemException,
110             com.liferay.portlet.polls.NoSuchQuestionException {
111         return getPersistence().findByPrimaryKey(questionId);
112     }
113 
114     public static com.liferay.portlet.polls.model.PollsQuestion fetchByPrimaryKey(
115         long questionId)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getPersistence().fetchByPrimaryKey(questionId);
118     }
119 
120     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
121         java.lang.String uuid)
122         throws com.liferay.portal.kernel.exception.SystemException {
123         return getPersistence().findByUuid(uuid);
124     }
125 
126     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
127         java.lang.String uuid, int start, int end)
128         throws com.liferay.portal.kernel.exception.SystemException {
129         return getPersistence().findByUuid(uuid, start, end);
130     }
131 
132     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
133         java.lang.String uuid, int start, int end,
134         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135         throws com.liferay.portal.kernel.exception.SystemException {
136         return getPersistence().findByUuid(uuid, start, end, orderByComparator);
137     }
138 
139     public static com.liferay.portlet.polls.model.PollsQuestion findByUuid_First(
140         java.lang.String uuid,
141         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142         throws com.liferay.portal.kernel.exception.SystemException,
143             com.liferay.portlet.polls.NoSuchQuestionException {
144         return getPersistence().findByUuid_First(uuid, orderByComparator);
145     }
146 
147     public static com.liferay.portlet.polls.model.PollsQuestion findByUuid_Last(
148         java.lang.String uuid,
149         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150         throws com.liferay.portal.kernel.exception.SystemException,
151             com.liferay.portlet.polls.NoSuchQuestionException {
152         return getPersistence().findByUuid_Last(uuid, orderByComparator);
153     }
154 
155     public static com.liferay.portlet.polls.model.PollsQuestion[] findByUuid_PrevAndNext(
156         long questionId, 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()
161                    .findByUuid_PrevAndNext(questionId, uuid, orderByComparator);
162     }
163 
164     public static com.liferay.portlet.polls.model.PollsQuestion findByUUID_G(
165         java.lang.String uuid, long groupId)
166         throws com.liferay.portal.kernel.exception.SystemException,
167             com.liferay.portlet.polls.NoSuchQuestionException {
168         return getPersistence().findByUUID_G(uuid, groupId);
169     }
170 
171     public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G(
172         java.lang.String uuid, long groupId)
173         throws com.liferay.portal.kernel.exception.SystemException {
174         return getPersistence().fetchByUUID_G(uuid, groupId);
175     }
176 
177     public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G(
178         java.lang.String uuid, long groupId, boolean retrieveFromCache)
179         throws com.liferay.portal.kernel.exception.SystemException {
180         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
181     }
182 
183     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
184         long groupId)
185         throws com.liferay.portal.kernel.exception.SystemException {
186         return getPersistence().findByGroupId(groupId);
187     }
188 
189     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
190         long groupId, int start, int end)
191         throws com.liferay.portal.kernel.exception.SystemException {
192         return getPersistence().findByGroupId(groupId, start, end);
193     }
194 
195     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
196         long groupId, int start, int end,
197         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
198         throws com.liferay.portal.kernel.exception.SystemException {
199         return getPersistence()
200                    .findByGroupId(groupId, start, end, orderByComparator);
201     }
202 
203     public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_First(
204         long groupId,
205         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
206         throws com.liferay.portal.kernel.exception.SystemException,
207             com.liferay.portlet.polls.NoSuchQuestionException {
208         return getPersistence().findByGroupId_First(groupId, orderByComparator);
209     }
210 
211     public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_Last(
212         long groupId,
213         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214         throws com.liferay.portal.kernel.exception.SystemException,
215             com.liferay.portlet.polls.NoSuchQuestionException {
216         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
217     }
218 
219     public static com.liferay.portlet.polls.model.PollsQuestion[] findByGroupId_PrevAndNext(
220         long questionId, 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()
225                    .findByGroupId_PrevAndNext(questionId, groupId,
226             orderByComparator);
227     }
228 
229     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll()
230         throws com.liferay.portal.kernel.exception.SystemException {
231         return getPersistence().findAll();
232     }
233 
234     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll(
235         int start, int end)
236         throws com.liferay.portal.kernel.exception.SystemException {
237         return getPersistence().findAll(start, end);
238     }
239 
240     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll(
241         int start, int end,
242         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243         throws com.liferay.portal.kernel.exception.SystemException {
244         return getPersistence().findAll(start, end, orderByComparator);
245     }
246 
247     public static void removeByUuid(java.lang.String uuid)
248         throws com.liferay.portal.kernel.exception.SystemException {
249         getPersistence().removeByUuid(uuid);
250     }
251 
252     public static void removeByUUID_G(java.lang.String uuid, long groupId)
253         throws com.liferay.portal.kernel.exception.SystemException,
254             com.liferay.portlet.polls.NoSuchQuestionException {
255         getPersistence().removeByUUID_G(uuid, groupId);
256     }
257 
258     public static void removeByGroupId(long groupId)
259         throws com.liferay.portal.kernel.exception.SystemException {
260         getPersistence().removeByGroupId(groupId);
261     }
262 
263     public static void removeAll()
264         throws com.liferay.portal.kernel.exception.SystemException {
265         getPersistence().removeAll();
266     }
267 
268     public static int countByUuid(java.lang.String uuid)
269         throws com.liferay.portal.kernel.exception.SystemException {
270         return getPersistence().countByUuid(uuid);
271     }
272 
273     public static int countByUUID_G(java.lang.String uuid, long groupId)
274         throws com.liferay.portal.kernel.exception.SystemException {
275         return getPersistence().countByUUID_G(uuid, groupId);
276     }
277 
278     public static int countByGroupId(long groupId)
279         throws com.liferay.portal.kernel.exception.SystemException {
280         return getPersistence().countByGroupId(groupId);
281     }
282 
283     public static int countAll()
284         throws com.liferay.portal.kernel.exception.SystemException {
285         return getPersistence().countAll();
286     }
287 
288     public static PollsQuestionPersistence getPersistence() {
289         if (_persistence == null) {
290             _persistence = (PollsQuestionPersistence)PortalBeanLocatorUtil.locate(PollsQuestionPersistence.class.getName());
291         }
292 
293         return _persistence;
294     }
295 
296     public void setPersistence(PollsQuestionPersistence persistence) {
297         _persistence = persistence;
298     }
299 
300     private static PollsQuestionPersistence _persistence;
301 }