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  
26  /**
27   * <a href="PollsChoiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       PollsChoicePersistence
36   * @see       PollsChoicePersistenceImpl
37   * @generated
38   */
39  public class PollsChoiceUtil {
40      public static void cacheResult(
41          com.liferay.portlet.polls.model.PollsChoice pollsChoice) {
42          getPersistence().cacheResult(pollsChoice);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portlet.polls.model.PollsChoice> pollsChoices) {
47          getPersistence().cacheResult(pollsChoices);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portlet.polls.model.PollsChoice create(
55          long choiceId) {
56          return getPersistence().create(choiceId);
57      }
58  
59      public static com.liferay.portlet.polls.model.PollsChoice remove(
60          long choiceId)
61          throws com.liferay.portal.SystemException,
62              com.liferay.portlet.polls.NoSuchChoiceException {
63          return getPersistence().remove(choiceId);
64      }
65  
66      public static com.liferay.portlet.polls.model.PollsChoice remove(
67          com.liferay.portlet.polls.model.PollsChoice pollsChoice)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(pollsChoice);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(PollsChoice, boolean merge)}.
74       */
75      public static com.liferay.portlet.polls.model.PollsChoice update(
76          com.liferay.portlet.polls.model.PollsChoice pollsChoice)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(pollsChoice);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  pollsChoice the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when pollsChoice is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portlet.polls.model.PollsChoice update(
94          com.liferay.portlet.polls.model.PollsChoice pollsChoice, boolean merge)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().update(pollsChoice, merge);
97      }
98  
99      public static com.liferay.portlet.polls.model.PollsChoice updateImpl(
100         com.liferay.portlet.polls.model.PollsChoice pollsChoice, boolean merge)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(pollsChoice, merge);
103     }
104 
105     public static com.liferay.portlet.polls.model.PollsChoice findByPrimaryKey(
106         long choiceId)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.polls.NoSuchChoiceException {
109         return getPersistence().findByPrimaryKey(choiceId);
110     }
111 
112     public static com.liferay.portlet.polls.model.PollsChoice fetchByPrimaryKey(
113         long choiceId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(choiceId);
115     }
116 
117     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
118         java.lang.String uuid) throws com.liferay.portal.SystemException {
119         return getPersistence().findByUuid(uuid);
120     }
121 
122     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
123         java.lang.String uuid, int start, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByUuid(uuid, start, end);
126     }
127 
128     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
129         java.lang.String uuid, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByUuid(uuid, start, end, obc);
133     }
134 
135     public static com.liferay.portlet.polls.model.PollsChoice findByUuid_First(
136         java.lang.String uuid,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException,
139             com.liferay.portlet.polls.NoSuchChoiceException {
140         return getPersistence().findByUuid_First(uuid, obc);
141     }
142 
143     public static com.liferay.portlet.polls.model.PollsChoice findByUuid_Last(
144         java.lang.String uuid,
145         com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.SystemException,
147             com.liferay.portlet.polls.NoSuchChoiceException {
148         return getPersistence().findByUuid_Last(uuid, obc);
149     }
150 
151     public static com.liferay.portlet.polls.model.PollsChoice[] findByUuid_PrevAndNext(
152         long choiceId, java.lang.String uuid,
153         com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.polls.NoSuchChoiceException {
156         return getPersistence().findByUuid_PrevAndNext(choiceId, uuid, obc);
157     }
158 
159     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
160         long questionId) throws com.liferay.portal.SystemException {
161         return getPersistence().findByQuestionId(questionId);
162     }
163 
164     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
165         long questionId, int start, int end)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findByQuestionId(questionId, start, end);
168     }
169 
170     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
171         long questionId, int start, int end,
172         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findByQuestionId(questionId, start, end, obc);
175     }
176 
177     public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_First(
178         long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException,
180             com.liferay.portlet.polls.NoSuchChoiceException {
181         return getPersistence().findByQuestionId_First(questionId, obc);
182     }
183 
184     public static com.liferay.portlet.polls.model.PollsChoice findByQuestionId_Last(
185         long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.polls.NoSuchChoiceException {
188         return getPersistence().findByQuestionId_Last(questionId, obc);
189     }
190 
191     public static com.liferay.portlet.polls.model.PollsChoice[] findByQuestionId_PrevAndNext(
192         long choiceId, long questionId,
193         com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.SystemException,
195             com.liferay.portlet.polls.NoSuchChoiceException {
196         return getPersistence()
197                    .findByQuestionId_PrevAndNext(choiceId, questionId, obc);
198     }
199 
200     public static com.liferay.portlet.polls.model.PollsChoice findByQ_N(
201         long questionId, java.lang.String name)
202         throws com.liferay.portal.SystemException,
203             com.liferay.portlet.polls.NoSuchChoiceException {
204         return getPersistence().findByQ_N(questionId, name);
205     }
206 
207     public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
208         long questionId, java.lang.String name)
209         throws com.liferay.portal.SystemException {
210         return getPersistence().fetchByQ_N(questionId, name);
211     }
212 
213     public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
214         long questionId, java.lang.String name, boolean retrieveFromCache)
215         throws com.liferay.portal.SystemException {
216         return getPersistence().fetchByQ_N(questionId, name, retrieveFromCache);
217     }
218 
219     public static java.util.List<Object> findWithDynamicQuery(
220         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
221         throws com.liferay.portal.SystemException {
222         return getPersistence().findWithDynamicQuery(dynamicQuery);
223     }
224 
225     public static java.util.List<Object> findWithDynamicQuery(
226         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
227         int end) throws com.liferay.portal.SystemException {
228         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
229     }
230 
231     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll()
232         throws com.liferay.portal.SystemException {
233         return getPersistence().findAll();
234     }
235 
236     public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll(
237         int start, int end) throws com.liferay.portal.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, com.liferay.portal.kernel.util.OrderByComparator obc)
243         throws com.liferay.portal.SystemException {
244         return getPersistence().findAll(start, end, obc);
245     }
246 
247     public static void removeByUuid(java.lang.String uuid)
248         throws com.liferay.portal.SystemException {
249         getPersistence().removeByUuid(uuid);
250     }
251 
252     public static void removeByQuestionId(long questionId)
253         throws com.liferay.portal.SystemException {
254         getPersistence().removeByQuestionId(questionId);
255     }
256 
257     public static void removeByQ_N(long questionId, java.lang.String name)
258         throws com.liferay.portal.SystemException,
259             com.liferay.portlet.polls.NoSuchChoiceException {
260         getPersistence().removeByQ_N(questionId, name);
261     }
262 
263     public static void removeAll() throws com.liferay.portal.SystemException {
264         getPersistence().removeAll();
265     }
266 
267     public static int countByUuid(java.lang.String uuid)
268         throws com.liferay.portal.SystemException {
269         return getPersistence().countByUuid(uuid);
270     }
271 
272     public static int countByQuestionId(long questionId)
273         throws com.liferay.portal.SystemException {
274         return getPersistence().countByQuestionId(questionId);
275     }
276 
277     public static int countByQ_N(long questionId, java.lang.String name)
278         throws com.liferay.portal.SystemException {
279         return getPersistence().countByQ_N(questionId, name);
280     }
281 
282     public static int countAll() throws com.liferay.portal.SystemException {
283         return getPersistence().countAll();
284     }
285 
286     public static PollsChoicePersistence getPersistence() {
287         return _persistence;
288     }
289 
290     public void setPersistence(PollsChoicePersistence persistence) {
291         _persistence = persistence;
292     }
293 
294     private static PollsChoicePersistence _persistence;
295 }