1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.polls.service.persistence;
24  
25  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  
29  import com.liferay.portlet.polls.model.PollsChoice;
30  
31  import java.util.List;
32  
33  /**
34   * <a href="PollsChoiceUtil.java.html"><b><i>View Source</i></b></a>
35   *
36   * <p>
37   * ServiceBuilder generated this class. Modifications in this class will be
38   * overwritten the next time is generated.
39   * </p>
40   *
41   * @author    Brian Wing Shun Chan
42   * @see       PollsChoicePersistence
43   * @see       PollsChoicePersistenceImpl
44   * @generated
45   */
46  public class PollsChoiceUtil {
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
49       */
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
66          int start, int end) throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
72       */
73      public static PollsChoice remove(PollsChoice pollsChoice)
74          throws SystemException {
75          return getPersistence().remove(pollsChoice);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
80       */
81      public static PollsChoice update(PollsChoice pollsChoice, boolean merge)
82          throws SystemException {
83          return getPersistence().update(pollsChoice, merge);
84      }
85  
86      public static void cacheResult(
87          com.liferay.portlet.polls.model.PollsChoice pollsChoice) {
88          getPersistence().cacheResult(pollsChoice);
89      }
90  
91      public static void cacheResult(
92          java.util.List<com.liferay.portlet.polls.model.PollsChoice> pollsChoices) {
93          getPersistence().cacheResult(pollsChoices);
94      }
95  
96      public static com.liferay.portlet.polls.model.PollsChoice create(
97          long choiceId) {
98          return getPersistence().create(choiceId);
99      }
100 
101     public static com.liferay.portlet.polls.model.PollsChoice remove(
102         long choiceId)
103         throws com.liferay.portal.SystemException,
104             com.liferay.portlet.polls.NoSuchChoiceException {
105         return getPersistence().remove(choiceId);
106     }
107 
108     /**
109      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
110      */
111     public static com.liferay.portlet.polls.model.PollsChoice update(
112         com.liferay.portlet.polls.model.PollsChoice pollsChoice)
113         throws com.liferay.portal.SystemException {
114         return getPersistence().update(pollsChoice);
115     }
116 
117     public static com.liferay.portlet.polls.model.PollsChoice updateImpl(
118         com.liferay.portlet.polls.model.PollsChoice pollsChoice, boolean merge)
119         throws com.liferay.portal.SystemException {
120         return getPersistence().updateImpl(pollsChoice, merge);
121     }
122 
123     public static com.liferay.portlet.polls.model.PollsChoice findByPrimaryKey(
124         long choiceId)
125         throws com.liferay.portal.SystemException,
126             com.liferay.portlet.polls.NoSuchChoiceException {
127         return getPersistence().findByPrimaryKey(choiceId);
128     }
129 
130     public static com.liferay.portlet.polls.model.PollsChoice fetchByPrimaryKey(
131         long choiceId) throws com.liferay.portal.SystemException {
132         return getPersistence().fetchByPrimaryKey(choiceId);
133     }
134 
135     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
136         java.lang.String uuid) throws com.liferay.portal.SystemException {
137         return getPersistence().findByUuid(uuid);
138     }
139 
140     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
141         java.lang.String uuid, int start, int end)
142         throws com.liferay.portal.SystemException {
143         return getPersistence().findByUuid(uuid, start, end);
144     }
145 
146     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
147         java.lang.String uuid, int start, int end,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findByUuid(uuid, start, end, obc);
151     }
152 
153     public static com.liferay.portlet.polls.model.PollsChoice findByUuid_First(
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_First(uuid, obc);
159     }
160 
161     public static com.liferay.portlet.polls.model.PollsChoice findByUuid_Last(
162         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_Last(uuid, obc);
167     }
168 
169     public static com.liferay.portlet.polls.model.PollsChoice[] findByUuid_PrevAndNext(
170         long choiceId, java.lang.String uuid,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.polls.NoSuchChoiceException {
174         return getPersistence().findByUuid_PrevAndNext(choiceId, uuid, obc);
175     }
176 
177     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
178         long questionId) throws com.liferay.portal.SystemException {
179         return getPersistence().findByQuestionId(questionId);
180     }
181 
182     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
183         long questionId, int start, int end)
184         throws com.liferay.portal.SystemException {
185         return getPersistence().findByQuestionId(questionId, start, end);
186     }
187 
188     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
189         long questionId, int start, int end,
190         com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException {
192         return getPersistence().findByQuestionId(questionId, start, end, obc);
193     }
194 
195     public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_First(
196         long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException,
198             com.liferay.portlet.polls.NoSuchChoiceException {
199         return getPersistence().findByQuestionId_First(questionId, obc);
200     }
201 
202     public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_Last(
203         long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.SystemException,
205             com.liferay.portlet.polls.NoSuchChoiceException {
206         return getPersistence().findByQuestionId_Last(questionId, obc);
207     }
208 
209     public static com.liferay.portlet.polls.model.PollsChoice[] findByQuestionId_PrevAndNext(
210         long choiceId, long questionId,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.SystemException,
213             com.liferay.portlet.polls.NoSuchChoiceException {
214         return getPersistence()
215                    .findByQuestionId_PrevAndNext(choiceId, questionId, obc);
216     }
217 
218     public static com.liferay.portlet.polls.model.PollsChoice findByQ_N(
219         long questionId, java.lang.String name)
220         throws com.liferay.portal.SystemException,
221             com.liferay.portlet.polls.NoSuchChoiceException {
222         return getPersistence().findByQ_N(questionId, name);
223     }
224 
225     public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
226         long questionId, java.lang.String name)
227         throws com.liferay.portal.SystemException {
228         return getPersistence().fetchByQ_N(questionId, name);
229     }
230 
231     public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
232         long questionId, java.lang.String name, boolean retrieveFromCache)
233         throws com.liferay.portal.SystemException {
234         return getPersistence().fetchByQ_N(questionId, name, retrieveFromCache);
235     }
236 
237     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll()
238         throws com.liferay.portal.SystemException {
239         return getPersistence().findAll();
240     }
241 
242     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll(
243         int start, int end) throws com.liferay.portal.SystemException {
244         return getPersistence().findAll(start, end);
245     }
246 
247     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll(
248         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
249         throws com.liferay.portal.SystemException {
250         return getPersistence().findAll(start, end, obc);
251     }
252 
253     public static void removeByUuid(java.lang.String uuid)
254         throws com.liferay.portal.SystemException {
255         getPersistence().removeByUuid(uuid);
256     }
257 
258     public static void removeByQuestionId(long questionId)
259         throws com.liferay.portal.SystemException {
260         getPersistence().removeByQuestionId(questionId);
261     }
262 
263     public static void removeByQ_N(long questionId, java.lang.String name)
264         throws com.liferay.portal.SystemException,
265             com.liferay.portlet.polls.NoSuchChoiceException {
266         getPersistence().removeByQ_N(questionId, name);
267     }
268 
269     public static void removeAll() throws com.liferay.portal.SystemException {
270         getPersistence().removeAll();
271     }
272 
273     public static int countByUuid(java.lang.String uuid)
274         throws com.liferay.portal.SystemException {
275         return getPersistence().countByUuid(uuid);
276     }
277 
278     public static int countByQuestionId(long questionId)
279         throws com.liferay.portal.SystemException {
280         return getPersistence().countByQuestionId(questionId);
281     }
282 
283     public static int countByQ_N(long questionId, java.lang.String name)
284         throws com.liferay.portal.SystemException {
285         return getPersistence().countByQ_N(questionId, name);
286     }
287 
288     public static int countAll() throws com.liferay.portal.SystemException {
289         return getPersistence().countAll();
290     }
291 
292     public static PollsChoicePersistence getPersistence() {
293         if (_persistence == null) {
294             _persistence = (PollsChoicePersistence)PortalBeanLocatorUtil.locate(PollsChoicePersistence.class.getName());
295         }
296 
297         return _persistence;
298     }
299 
300     public void setPersistence(PollsChoicePersistence persistence) {
301         _persistence = persistence;
302     }
303 
304     private static PollsChoicePersistence _persistence;
305 }