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