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 obc)
134         throws com.liferay.portal.kernel.exception.SystemException {
135         return getPersistence().findByUuid(uuid, start, end, obc);
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 obc)
141         throws com.liferay.portal.kernel.exception.SystemException,
142             com.liferay.portlet.polls.NoSuchChoiceException {
143         return getPersistence().findByUuid_First(uuid, obc);
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 obc)
149         throws com.liferay.portal.kernel.exception.SystemException,
150             com.liferay.portlet.polls.NoSuchChoiceException {
151         return getPersistence().findByUuid_Last(uuid, obc);
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 obc)
157         throws com.liferay.portal.kernel.exception.SystemException,
158             com.liferay.portlet.polls.NoSuchChoiceException {
159         return getPersistence().findByUuid_PrevAndNext(choiceId, uuid, obc);
160     }
161 
162     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
163         long questionId)
164         throws com.liferay.portal.kernel.exception.SystemException {
165         return getPersistence().findByQuestionId(questionId);
166     }
167 
168     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
169         long questionId, int start, int end)
170         throws com.liferay.portal.kernel.exception.SystemException {
171         return getPersistence().findByQuestionId(questionId, start, end);
172     }
173 
174     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
175         long questionId, int start, int end,
176         com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.kernel.exception.SystemException {
178         return getPersistence().findByQuestionId(questionId, start, end, obc);
179     }
180 
181     public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_First(
182         long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.kernel.exception.SystemException,
184             com.liferay.portlet.polls.NoSuchChoiceException {
185         return getPersistence().findByQuestionId_First(questionId, obc);
186     }
187 
188     public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_Last(
189         long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.kernel.exception.SystemException,
191             com.liferay.portlet.polls.NoSuchChoiceException {
192         return getPersistence().findByQuestionId_Last(questionId, obc);
193     }
194 
195     public static com.liferay.portlet.polls.model.PollsChoice[] findByQuestionId_PrevAndNext(
196         long choiceId, long questionId,
197         com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.kernel.exception.SystemException,
199             com.liferay.portlet.polls.NoSuchChoiceException {
200         return getPersistence()
201                    .findByQuestionId_PrevAndNext(choiceId, questionId, obc);
202     }
203 
204     public static com.liferay.portlet.polls.model.PollsChoice findByQ_N(
205         long questionId, java.lang.String name)
206         throws com.liferay.portal.kernel.exception.SystemException,
207             com.liferay.portlet.polls.NoSuchChoiceException {
208         return getPersistence().findByQ_N(questionId, name);
209     }
210 
211     public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
212         long questionId, java.lang.String name)
213         throws com.liferay.portal.kernel.exception.SystemException {
214         return getPersistence().fetchByQ_N(questionId, name);
215     }
216 
217     public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
218         long questionId, java.lang.String name, boolean retrieveFromCache)
219         throws com.liferay.portal.kernel.exception.SystemException {
220         return getPersistence().fetchByQ_N(questionId, name, retrieveFromCache);
221     }
222 
223     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll()
224         throws com.liferay.portal.kernel.exception.SystemException {
225         return getPersistence().findAll();
226     }
227 
228     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll(
229         int start, int end)
230         throws com.liferay.portal.kernel.exception.SystemException {
231         return getPersistence().findAll(start, end);
232     }
233 
234     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll(
235         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.kernel.exception.SystemException {
237         return getPersistence().findAll(start, end, obc);
238     }
239 
240     public static void removeByUuid(java.lang.String uuid)
241         throws com.liferay.portal.kernel.exception.SystemException {
242         getPersistence().removeByUuid(uuid);
243     }
244 
245     public static void removeByQuestionId(long questionId)
246         throws com.liferay.portal.kernel.exception.SystemException {
247         getPersistence().removeByQuestionId(questionId);
248     }
249 
250     public static void removeByQ_N(long questionId, java.lang.String name)
251         throws com.liferay.portal.kernel.exception.SystemException,
252             com.liferay.portlet.polls.NoSuchChoiceException {
253         getPersistence().removeByQ_N(questionId, name);
254     }
255 
256     public static void removeAll()
257         throws com.liferay.portal.kernel.exception.SystemException {
258         getPersistence().removeAll();
259     }
260 
261     public static int countByUuid(java.lang.String uuid)
262         throws com.liferay.portal.kernel.exception.SystemException {
263         return getPersistence().countByUuid(uuid);
264     }
265 
266     public static int countByQuestionId(long questionId)
267         throws com.liferay.portal.kernel.exception.SystemException {
268         return getPersistence().countByQuestionId(questionId);
269     }
270 
271     public static int countByQ_N(long questionId, java.lang.String name)
272         throws com.liferay.portal.kernel.exception.SystemException {
273         return getPersistence().countByQ_N(questionId, name);
274     }
275 
276     public static int countAll()
277         throws com.liferay.portal.kernel.exception.SystemException {
278         return getPersistence().countAll();
279     }
280 
281     public static PollsChoicePersistence getPersistence() {
282         if (_persistence == null) {
283             _persistence = (PollsChoicePersistence)PortalBeanLocatorUtil.locate(PollsChoicePersistence.class.getName());
284         }
285 
286         return _persistence;
287     }
288 
289     public void setPersistence(PollsChoicePersistence persistence) {
290         _persistence = persistence;
291     }
292 
293     private static PollsChoicePersistence _persistence;
294 }