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.PollsChoice;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="PollsChoiceUtil.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       PollsChoicePersistence
35   * @see       PollsChoicePersistenceImpl
36   * @generated
37   */
38  public class PollsChoiceUtil {
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 PollsChoice remove(PollsChoice pollsChoice)
66          throws SystemException {
67          return getPersistence().remove(pollsChoice);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
72       */
73      public static PollsChoice update(PollsChoice pollsChoice, boolean merge)
74          throws SystemException {
75          return getPersistence().update(pollsChoice, merge);
76      }
77  
78      public static void cacheResult(
79          com.liferay.portlet.polls.model.PollsChoice pollsChoice) {
80          getPersistence().cacheResult(pollsChoice);
81      }
82  
83      public static void cacheResult(
84          java.util.List<com.liferay.portlet.polls.model.PollsChoice> pollsChoices) {
85          getPersistence().cacheResult(pollsChoices);
86      }
87  
88      public static com.liferay.portlet.polls.model.PollsChoice create(
89          long choiceId) {
90          return getPersistence().create(choiceId);
91      }
92  
93      public static com.liferay.portlet.polls.model.PollsChoice remove(
94          long choiceId)
95          throws com.liferay.portal.kernel.exception.SystemException,
96              com.liferay.portlet.polls.NoSuchChoiceException {
97          return getPersistence().remove(choiceId);
98      }
99  
100     public static com.liferay.portlet.polls.model.PollsChoice updateImpl(
101         com.liferay.portlet.polls.model.PollsChoice pollsChoice, boolean merge)
102         throws com.liferay.portal.kernel.exception.SystemException {
103         return getPersistence().updateImpl(pollsChoice, merge);
104     }
105 
106     public static com.liferay.portlet.polls.model.PollsChoice findByPrimaryKey(
107         long choiceId)
108         throws com.liferay.portal.kernel.exception.SystemException,
109             com.liferay.portlet.polls.NoSuchChoiceException {
110         return getPersistence().findByPrimaryKey(choiceId);
111     }
112 
113     public static com.liferay.portlet.polls.model.PollsChoice fetchByPrimaryKey(
114         long choiceId)
115         throws com.liferay.portal.kernel.exception.SystemException {
116         return getPersistence().fetchByPrimaryKey(choiceId);
117     }
118 
119     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
120         java.lang.String uuid)
121         throws com.liferay.portal.kernel.exception.SystemException {
122         return getPersistence().findByUuid(uuid);
123     }
124 
125     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
126         java.lang.String uuid, int start, int end)
127         throws com.liferay.portal.kernel.exception.SystemException {
128         return getPersistence().findByUuid(uuid, start, end);
129     }
130 
131     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
132         java.lang.String uuid, int start, int end,
133         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
134         throws com.liferay.portal.kernel.exception.SystemException {
135         return getPersistence().findByUuid(uuid, start, end, orderByComparator);
136     }
137 
138     public static com.liferay.portlet.polls.model.PollsChoice findByUuid_First(
139         java.lang.String uuid,
140         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141         throws com.liferay.portal.kernel.exception.SystemException,
142             com.liferay.portlet.polls.NoSuchChoiceException {
143         return getPersistence().findByUuid_First(uuid, orderByComparator);
144     }
145 
146     public static com.liferay.portlet.polls.model.PollsChoice findByUuid_Last(
147         java.lang.String uuid,
148         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149         throws com.liferay.portal.kernel.exception.SystemException,
150             com.liferay.portlet.polls.NoSuchChoiceException {
151         return getPersistence().findByUuid_Last(uuid, orderByComparator);
152     }
153 
154     public static com.liferay.portlet.polls.model.PollsChoice[] findByUuid_PrevAndNext(
155         long choiceId, java.lang.String uuid,
156         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157         throws com.liferay.portal.kernel.exception.SystemException,
158             com.liferay.portlet.polls.NoSuchChoiceException {
159         return getPersistence()
160                    .findByUuid_PrevAndNext(choiceId, uuid, orderByComparator);
161     }
162 
163     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
164         long questionId)
165         throws com.liferay.portal.kernel.exception.SystemException {
166         return getPersistence().findByQuestionId(questionId);
167     }
168 
169     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
170         long questionId, int start, int end)
171         throws com.liferay.portal.kernel.exception.SystemException {
172         return getPersistence().findByQuestionId(questionId, start, end);
173     }
174 
175     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
176         long questionId, int start, int end,
177         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178         throws com.liferay.portal.kernel.exception.SystemException {
179         return getPersistence()
180                    .findByQuestionId(questionId, start, end, orderByComparator);
181     }
182 
183     public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_First(
184         long questionId,
185         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
186         throws com.liferay.portal.kernel.exception.SystemException,
187             com.liferay.portlet.polls.NoSuchChoiceException {
188         return getPersistence()
189                    .findByQuestionId_First(questionId, orderByComparator);
190     }
191 
192     public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_Last(
193         long questionId,
194         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195         throws com.liferay.portal.kernel.exception.SystemException,
196             com.liferay.portlet.polls.NoSuchChoiceException {
197         return getPersistence()
198                    .findByQuestionId_Last(questionId, orderByComparator);
199     }
200 
201     public static com.liferay.portlet.polls.model.PollsChoice[] findByQuestionId_PrevAndNext(
202         long choiceId, long questionId,
203         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204         throws com.liferay.portal.kernel.exception.SystemException,
205             com.liferay.portlet.polls.NoSuchChoiceException {
206         return getPersistence()
207                    .findByQuestionId_PrevAndNext(choiceId, questionId,
208             orderByComparator);
209     }
210 
211     public static com.liferay.portlet.polls.model.PollsChoice findByQ_N(
212         long questionId, java.lang.String name)
213         throws com.liferay.portal.kernel.exception.SystemException,
214             com.liferay.portlet.polls.NoSuchChoiceException {
215         return getPersistence().findByQ_N(questionId, name);
216     }
217 
218     public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
219         long questionId, java.lang.String name)
220         throws com.liferay.portal.kernel.exception.SystemException {
221         return getPersistence().fetchByQ_N(questionId, name);
222     }
223 
224     public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
225         long questionId, java.lang.String name, boolean retrieveFromCache)
226         throws com.liferay.portal.kernel.exception.SystemException {
227         return getPersistence().fetchByQ_N(questionId, name, retrieveFromCache);
228     }
229 
230     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll()
231         throws com.liferay.portal.kernel.exception.SystemException {
232         return getPersistence().findAll();
233     }
234 
235     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll(
236         int start, int end)
237         throws com.liferay.portal.kernel.exception.SystemException {
238         return getPersistence().findAll(start, end);
239     }
240 
241     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll(
242         int start, int end,
243         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244         throws com.liferay.portal.kernel.exception.SystemException {
245         return getPersistence().findAll(start, end, orderByComparator);
246     }
247 
248     public static void removeByUuid(java.lang.String uuid)
249         throws com.liferay.portal.kernel.exception.SystemException {
250         getPersistence().removeByUuid(uuid);
251     }
252 
253     public static void removeByQuestionId(long questionId)
254         throws com.liferay.portal.kernel.exception.SystemException {
255         getPersistence().removeByQuestionId(questionId);
256     }
257 
258     public static void removeByQ_N(long questionId, java.lang.String name)
259         throws com.liferay.portal.kernel.exception.SystemException,
260             com.liferay.portlet.polls.NoSuchChoiceException {
261         getPersistence().removeByQ_N(questionId, name);
262     }
263 
264     public static void removeAll()
265         throws com.liferay.portal.kernel.exception.SystemException {
266         getPersistence().removeAll();
267     }
268 
269     public static int countByUuid(java.lang.String uuid)
270         throws com.liferay.portal.kernel.exception.SystemException {
271         return getPersistence().countByUuid(uuid);
272     }
273 
274     public static int countByQuestionId(long questionId)
275         throws com.liferay.portal.kernel.exception.SystemException {
276         return getPersistence().countByQuestionId(questionId);
277     }
278 
279     public static int countByQ_N(long questionId, java.lang.String name)
280         throws com.liferay.portal.kernel.exception.SystemException {
281         return getPersistence().countByQ_N(questionId, name);
282     }
283 
284     public static int countAll()
285         throws com.liferay.portal.kernel.exception.SystemException {
286         return getPersistence().countAll();
287     }
288 
289     public static PollsChoicePersistence getPersistence() {
290         if (_persistence == null) {
291             _persistence = (PollsChoicePersistence)PortalBeanLocatorUtil.locate(PollsChoicePersistence.class.getName());
292         }
293 
294         return _persistence;
295     }
296 
297     public void setPersistence(PollsChoicePersistence persistence) {
298         _persistence = persistence;
299     }
300 
301     private static PollsChoicePersistence _persistence;
302 }