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