1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.polls.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
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.SystemException,
96              com.liferay.portlet.polls.NoSuchQuestionException {
97          return getPersistence().remove(questionId);
98      }
99  
100     /**
101      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
102      */
103     public static com.liferay.portlet.polls.model.PollsQuestion update(
104         com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
105         throws com.liferay.portal.SystemException {
106         return getPersistence().update(pollsQuestion);
107     }
108 
109     public static com.liferay.portlet.polls.model.PollsQuestion updateImpl(
110         com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
111         boolean merge) throws com.liferay.portal.SystemException {
112         return getPersistence().updateImpl(pollsQuestion, merge);
113     }
114 
115     public static com.liferay.portlet.polls.model.PollsQuestion findByPrimaryKey(
116         long questionId)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.polls.NoSuchQuestionException {
119         return getPersistence().findByPrimaryKey(questionId);
120     }
121 
122     public static com.liferay.portlet.polls.model.PollsQuestion fetchByPrimaryKey(
123         long questionId) throws com.liferay.portal.SystemException {
124         return getPersistence().fetchByPrimaryKey(questionId);
125     }
126 
127     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
128         java.lang.String uuid) throws com.liferay.portal.SystemException {
129         return getPersistence().findByUuid(uuid);
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         throws com.liferay.portal.SystemException {
135         return getPersistence().findByUuid(uuid, start, end);
136     }
137 
138     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
139         java.lang.String uuid, int start, int end,
140         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141         throws com.liferay.portal.SystemException {
142         return getPersistence().findByUuid(uuid, start, end, orderByComparator);
143     }
144 
145     public static com.liferay.portlet.polls.model.PollsQuestion findByUuid_First(
146         java.lang.String uuid,
147         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
148         throws com.liferay.portal.SystemException,
149             com.liferay.portlet.polls.NoSuchQuestionException {
150         return getPersistence().findByUuid_First(uuid, orderByComparator);
151     }
152 
153     public static com.liferay.portlet.polls.model.PollsQuestion findByUuid_Last(
154         java.lang.String uuid,
155         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.polls.NoSuchQuestionException {
158         return getPersistence().findByUuid_Last(uuid, orderByComparator);
159     }
160 
161     public static com.liferay.portlet.polls.model.PollsQuestion[] findByUuid_PrevAndNext(
162         long questionId, java.lang.String uuid,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.polls.NoSuchQuestionException {
166         return getPersistence()
167                    .findByUuid_PrevAndNext(questionId, uuid, orderByComparator);
168     }
169 
170     public static com.liferay.portlet.polls.model.PollsQuestion findByUUID_G(
171         java.lang.String uuid, long groupId)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.polls.NoSuchQuestionException {
174         return getPersistence().findByUUID_G(uuid, groupId);
175     }
176 
177     public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G(
178         java.lang.String uuid, long groupId)
179         throws com.liferay.portal.SystemException {
180         return getPersistence().fetchByUUID_G(uuid, groupId);
181     }
182 
183     public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G(
184         java.lang.String uuid, long groupId, boolean retrieveFromCache)
185         throws com.liferay.portal.SystemException {
186         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
187     }
188 
189     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
190         long groupId) throws com.liferay.portal.SystemException {
191         return getPersistence().findByGroupId(groupId);
192     }
193 
194     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
195         long groupId, int start, int end)
196         throws com.liferay.portal.SystemException {
197         return getPersistence().findByGroupId(groupId, start, end);
198     }
199 
200     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
201         long groupId, int start, int end,
202         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203         throws com.liferay.portal.SystemException {
204         return getPersistence()
205                    .findByGroupId(groupId, start, end, orderByComparator);
206     }
207 
208     public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_First(
209         long groupId,
210         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211         throws com.liferay.portal.SystemException,
212             com.liferay.portlet.polls.NoSuchQuestionException {
213         return getPersistence().findByGroupId_First(groupId, orderByComparator);
214     }
215 
216     public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_Last(
217         long groupId,
218         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219         throws com.liferay.portal.SystemException,
220             com.liferay.portlet.polls.NoSuchQuestionException {
221         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
222     }
223 
224     public static com.liferay.portlet.polls.model.PollsQuestion[] findByGroupId_PrevAndNext(
225         long questionId, long groupId,
226         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227         throws com.liferay.portal.SystemException,
228             com.liferay.portlet.polls.NoSuchQuestionException {
229         return getPersistence()
230                    .findByGroupId_PrevAndNext(questionId, groupId,
231             orderByComparator);
232     }
233 
234     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll()
235         throws com.liferay.portal.SystemException {
236         return getPersistence().findAll();
237     }
238 
239     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll(
240         int start, int end) throws com.liferay.portal.SystemException {
241         return getPersistence().findAll(start, end);
242     }
243 
244     public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll(
245         int start, int end,
246         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
247         throws com.liferay.portal.SystemException {
248         return getPersistence().findAll(start, end, orderByComparator);
249     }
250 
251     public static void removeByUuid(java.lang.String uuid)
252         throws com.liferay.portal.SystemException {
253         getPersistence().removeByUuid(uuid);
254     }
255 
256     public static void removeByUUID_G(java.lang.String uuid, long groupId)
257         throws com.liferay.portal.SystemException,
258             com.liferay.portlet.polls.NoSuchQuestionException {
259         getPersistence().removeByUUID_G(uuid, groupId);
260     }
261 
262     public static void removeByGroupId(long groupId)
263         throws com.liferay.portal.SystemException {
264         getPersistence().removeByGroupId(groupId);
265     }
266 
267     public static void removeAll() throws com.liferay.portal.SystemException {
268         getPersistence().removeAll();
269     }
270 
271     public static int countByUuid(java.lang.String uuid)
272         throws com.liferay.portal.SystemException {
273         return getPersistence().countByUuid(uuid);
274     }
275 
276     public static int countByUUID_G(java.lang.String uuid, long groupId)
277         throws com.liferay.portal.SystemException {
278         return getPersistence().countByUUID_G(uuid, groupId);
279     }
280 
281     public static int countByGroupId(long groupId)
282         throws com.liferay.portal.SystemException {
283         return getPersistence().countByGroupId(groupId);
284     }
285 
286     public static int countAll() throws com.liferay.portal.SystemException {
287         return getPersistence().countAll();
288     }
289 
290     public static PollsQuestionPersistence getPersistence() {
291         if (_persistence == null) {
292             _persistence = (PollsQuestionPersistence)PortalBeanLocatorUtil.locate(PollsQuestionPersistence.class.getName());
293         }
294 
295         return _persistence;
296     }
297 
298     public void setPersistence(PollsQuestionPersistence persistence) {
299         _persistence = persistence;
300     }
301 
302     private static PollsQuestionPersistence _persistence;
303 }