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.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.SystemException,
96              com.liferay.portlet.polls.NoSuchChoiceException {
97          return getPersistence().remove(choiceId);
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.PollsChoice update(
104         com.liferay.portlet.polls.model.PollsChoice pollsChoice)
105         throws com.liferay.portal.SystemException {
106         return getPersistence().update(pollsChoice);
107     }
108 
109     public static com.liferay.portlet.polls.model.PollsChoice updateImpl(
110         com.liferay.portlet.polls.model.PollsChoice pollsChoice, boolean merge)
111         throws com.liferay.portal.SystemException {
112         return getPersistence().updateImpl(pollsChoice, merge);
113     }
114 
115     public static com.liferay.portlet.polls.model.PollsChoice findByPrimaryKey(
116         long choiceId)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.polls.NoSuchChoiceException {
119         return getPersistence().findByPrimaryKey(choiceId);
120     }
121 
122     public static com.liferay.portlet.polls.model.PollsChoice fetchByPrimaryKey(
123         long choiceId) throws com.liferay.portal.SystemException {
124         return getPersistence().fetchByPrimaryKey(choiceId);
125     }
126 
127     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> 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.PollsChoice> 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.PollsChoice> findByUuid(
139         java.lang.String uuid, int start, int end,
140         com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.SystemException {
142         return getPersistence().findByUuid(uuid, start, end, obc);
143     }
144 
145     public static com.liferay.portlet.polls.model.PollsChoice findByUuid_First(
146         java.lang.String uuid,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException,
149             com.liferay.portlet.polls.NoSuchChoiceException {
150         return getPersistence().findByUuid_First(uuid, obc);
151     }
152 
153     public static com.liferay.portlet.polls.model.PollsChoice findByUuid_Last(
154         java.lang.String uuid,
155         com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.polls.NoSuchChoiceException {
158         return getPersistence().findByUuid_Last(uuid, obc);
159     }
160 
161     public static com.liferay.portlet.polls.model.PollsChoice[] findByUuid_PrevAndNext(
162         long choiceId, java.lang.String uuid,
163         com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.polls.NoSuchChoiceException {
166         return getPersistence().findByUuid_PrevAndNext(choiceId, uuid, obc);
167     }
168 
169     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
170         long questionId) throws com.liferay.portal.SystemException {
171         return getPersistence().findByQuestionId(questionId);
172     }
173 
174     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
175         long questionId, int start, int end)
176         throws com.liferay.portal.SystemException {
177         return getPersistence().findByQuestionId(questionId, start, end);
178     }
179 
180     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
181         long questionId, int start, int end,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException {
184         return getPersistence().findByQuestionId(questionId, start, end, obc);
185     }
186 
187     public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_First(
188         long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.SystemException,
190             com.liferay.portlet.polls.NoSuchChoiceException {
191         return getPersistence().findByQuestionId_First(questionId, obc);
192     }
193 
194     public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_Last(
195         long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.SystemException,
197             com.liferay.portlet.polls.NoSuchChoiceException {
198         return getPersistence().findByQuestionId_Last(questionId, obc);
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 obc)
204         throws com.liferay.portal.SystemException,
205             com.liferay.portlet.polls.NoSuchChoiceException {
206         return getPersistence()
207                    .findByQuestionId_PrevAndNext(choiceId, questionId, obc);
208     }
209 
210     public static com.liferay.portlet.polls.model.PollsChoice findByQ_N(
211         long questionId, java.lang.String name)
212         throws com.liferay.portal.SystemException,
213             com.liferay.portlet.polls.NoSuchChoiceException {
214         return getPersistence().findByQ_N(questionId, name);
215     }
216 
217     public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
218         long questionId, java.lang.String name)
219         throws com.liferay.portal.SystemException {
220         return getPersistence().fetchByQ_N(questionId, name);
221     }
222 
223     public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
224         long questionId, java.lang.String name, boolean retrieveFromCache)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().fetchByQ_N(questionId, name, retrieveFromCache);
227     }
228 
229     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll()
230         throws com.liferay.portal.SystemException {
231         return getPersistence().findAll();
232     }
233 
234     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll(
235         int start, int end) throws com.liferay.portal.SystemException {
236         return getPersistence().findAll(start, end);
237     }
238 
239     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll(
240         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
241         throws com.liferay.portal.SystemException {
242         return getPersistence().findAll(start, end, obc);
243     }
244 
245     public static void removeByUuid(java.lang.String uuid)
246         throws com.liferay.portal.SystemException {
247         getPersistence().removeByUuid(uuid);
248     }
249 
250     public static void removeByQuestionId(long questionId)
251         throws com.liferay.portal.SystemException {
252         getPersistence().removeByQuestionId(questionId);
253     }
254 
255     public static void removeByQ_N(long questionId, java.lang.String name)
256         throws com.liferay.portal.SystemException,
257             com.liferay.portlet.polls.NoSuchChoiceException {
258         getPersistence().removeByQ_N(questionId, name);
259     }
260 
261     public static void removeAll() throws com.liferay.portal.SystemException {
262         getPersistence().removeAll();
263     }
264 
265     public static int countByUuid(java.lang.String uuid)
266         throws com.liferay.portal.SystemException {
267         return getPersistence().countByUuid(uuid);
268     }
269 
270     public static int countByQuestionId(long questionId)
271         throws com.liferay.portal.SystemException {
272         return getPersistence().countByQuestionId(questionId);
273     }
274 
275     public static int countByQ_N(long questionId, java.lang.String name)
276         throws com.liferay.portal.SystemException {
277         return getPersistence().countByQ_N(questionId, name);
278     }
279 
280     public static int countAll() throws com.liferay.portal.SystemException {
281         return getPersistence().countAll();
282     }
283 
284     public static PollsChoicePersistence getPersistence() {
285         if (_persistence == null) {
286             _persistence = (PollsChoicePersistence)PortalBeanLocatorUtil.locate(PollsChoicePersistence.class.getName());
287         }
288 
289         return _persistence;
290     }
291 
292     public void setPersistence(PollsChoicePersistence persistence) {
293         _persistence = persistence;
294     }
295 
296     private static PollsChoicePersistence _persistence;
297 }