001
014
015 package com.liferay.portlet.polls.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.kernel.util.OrderByComparator;
021 import com.liferay.portal.service.ServiceContext;
022
023 import com.liferay.portlet.polls.model.PollsVote;
024
025 import java.util.List;
026
027
033 public class PollsVoteUtil {
034
037 public static void clearCache() {
038 getPersistence().clearCache();
039 }
040
041
044 public static void clearCache(PollsVote pollsVote) {
045 getPersistence().clearCache(pollsVote);
046 }
047
048
051 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
052 throws SystemException {
053 return getPersistence().countWithDynamicQuery(dynamicQuery);
054 }
055
056
059 public static List<PollsVote> findWithDynamicQuery(
060 DynamicQuery dynamicQuery) throws SystemException {
061 return getPersistence().findWithDynamicQuery(dynamicQuery);
062 }
063
064
067 public static List<PollsVote> findWithDynamicQuery(
068 DynamicQuery dynamicQuery, int start, int end)
069 throws SystemException {
070 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
071 }
072
073
076 public static List<PollsVote> findWithDynamicQuery(
077 DynamicQuery dynamicQuery, int start, int end,
078 OrderByComparator orderByComparator) throws SystemException {
079 return getPersistence()
080 .findWithDynamicQuery(dynamicQuery, start, end,
081 orderByComparator);
082 }
083
084
087 public static PollsVote remove(PollsVote pollsVote)
088 throws SystemException {
089 return getPersistence().remove(pollsVote);
090 }
091
092
095 public static PollsVote update(PollsVote pollsVote, boolean merge)
096 throws SystemException {
097 return getPersistence().update(pollsVote, merge);
098 }
099
100
103 public static PollsVote update(PollsVote pollsVote, boolean merge,
104 ServiceContext serviceContext) throws SystemException {
105 return getPersistence().update(pollsVote, merge, serviceContext);
106 }
107
108 public static void cacheResult(
109 com.liferay.portlet.polls.model.PollsVote pollsVote) {
110 getPersistence().cacheResult(pollsVote);
111 }
112
113 public static void cacheResult(
114 java.util.List<com.liferay.portlet.polls.model.PollsVote> pollsVotes) {
115 getPersistence().cacheResult(pollsVotes);
116 }
117
118 public static com.liferay.portlet.polls.model.PollsVote create(long voteId) {
119 return getPersistence().create(voteId);
120 }
121
122 public static com.liferay.portlet.polls.model.PollsVote remove(long voteId)
123 throws com.liferay.portal.kernel.exception.SystemException,
124 com.liferay.portlet.polls.NoSuchVoteException {
125 return getPersistence().remove(voteId);
126 }
127
128 public static com.liferay.portlet.polls.model.PollsVote updateImpl(
129 com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
130 throws com.liferay.portal.kernel.exception.SystemException {
131 return getPersistence().updateImpl(pollsVote, merge);
132 }
133
134 public static com.liferay.portlet.polls.model.PollsVote findByPrimaryKey(
135 long voteId)
136 throws com.liferay.portal.kernel.exception.SystemException,
137 com.liferay.portlet.polls.NoSuchVoteException {
138 return getPersistence().findByPrimaryKey(voteId);
139 }
140
141 public static com.liferay.portlet.polls.model.PollsVote fetchByPrimaryKey(
142 long voteId) throws com.liferay.portal.kernel.exception.SystemException {
143 return getPersistence().fetchByPrimaryKey(voteId);
144 }
145
146 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
147 long questionId)
148 throws com.liferay.portal.kernel.exception.SystemException {
149 return getPersistence().findByQuestionId(questionId);
150 }
151
152 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
153 long questionId, int start, int end)
154 throws com.liferay.portal.kernel.exception.SystemException {
155 return getPersistence().findByQuestionId(questionId, start, end);
156 }
157
158 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
159 long questionId, int start, int end,
160 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161 throws com.liferay.portal.kernel.exception.SystemException {
162 return getPersistence()
163 .findByQuestionId(questionId, start, end, orderByComparator);
164 }
165
166 public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_First(
167 long questionId,
168 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169 throws com.liferay.portal.kernel.exception.SystemException,
170 com.liferay.portlet.polls.NoSuchVoteException {
171 return getPersistence()
172 .findByQuestionId_First(questionId, orderByComparator);
173 }
174
175 public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_Last(
176 long questionId,
177 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178 throws com.liferay.portal.kernel.exception.SystemException,
179 com.liferay.portlet.polls.NoSuchVoteException {
180 return getPersistence()
181 .findByQuestionId_Last(questionId, orderByComparator);
182 }
183
184 public static com.liferay.portlet.polls.model.PollsVote[] findByQuestionId_PrevAndNext(
185 long voteId, long questionId,
186 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
187 throws com.liferay.portal.kernel.exception.SystemException,
188 com.liferay.portlet.polls.NoSuchVoteException {
189 return getPersistence()
190 .findByQuestionId_PrevAndNext(voteId, questionId,
191 orderByComparator);
192 }
193
194 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
195 long choiceId)
196 throws com.liferay.portal.kernel.exception.SystemException {
197 return getPersistence().findByChoiceId(choiceId);
198 }
199
200 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
201 long choiceId, int start, int end)
202 throws com.liferay.portal.kernel.exception.SystemException {
203 return getPersistence().findByChoiceId(choiceId, start, end);
204 }
205
206 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
207 long choiceId, int start, int end,
208 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
209 throws com.liferay.portal.kernel.exception.SystemException {
210 return getPersistence()
211 .findByChoiceId(choiceId, start, end, orderByComparator);
212 }
213
214 public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_First(
215 long choiceId,
216 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
217 throws com.liferay.portal.kernel.exception.SystemException,
218 com.liferay.portlet.polls.NoSuchVoteException {
219 return getPersistence().findByChoiceId_First(choiceId, orderByComparator);
220 }
221
222 public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_Last(
223 long choiceId,
224 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
225 throws com.liferay.portal.kernel.exception.SystemException,
226 com.liferay.portlet.polls.NoSuchVoteException {
227 return getPersistence().findByChoiceId_Last(choiceId, orderByComparator);
228 }
229
230 public static com.liferay.portlet.polls.model.PollsVote[] findByChoiceId_PrevAndNext(
231 long voteId, long choiceId,
232 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
233 throws com.liferay.portal.kernel.exception.SystemException,
234 com.liferay.portlet.polls.NoSuchVoteException {
235 return getPersistence()
236 .findByChoiceId_PrevAndNext(voteId, choiceId,
237 orderByComparator);
238 }
239
240 public static com.liferay.portlet.polls.model.PollsVote findByQ_U(
241 long questionId, long userId)
242 throws com.liferay.portal.kernel.exception.SystemException,
243 com.liferay.portlet.polls.NoSuchVoteException {
244 return getPersistence().findByQ_U(questionId, userId);
245 }
246
247 public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
248 long questionId, long userId)
249 throws com.liferay.portal.kernel.exception.SystemException {
250 return getPersistence().fetchByQ_U(questionId, userId);
251 }
252
253 public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
254 long questionId, long userId, boolean retrieveFromCache)
255 throws com.liferay.portal.kernel.exception.SystemException {
256 return getPersistence().fetchByQ_U(questionId, userId, retrieveFromCache);
257 }
258
259 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll()
260 throws com.liferay.portal.kernel.exception.SystemException {
261 return getPersistence().findAll();
262 }
263
264 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
265 int start, int end)
266 throws com.liferay.portal.kernel.exception.SystemException {
267 return getPersistence().findAll(start, end);
268 }
269
270 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
271 int start, int end,
272 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
273 throws com.liferay.portal.kernel.exception.SystemException {
274 return getPersistence().findAll(start, end, orderByComparator);
275 }
276
277 public static void removeByQuestionId(long questionId)
278 throws com.liferay.portal.kernel.exception.SystemException {
279 getPersistence().removeByQuestionId(questionId);
280 }
281
282 public static void removeByChoiceId(long choiceId)
283 throws com.liferay.portal.kernel.exception.SystemException {
284 getPersistence().removeByChoiceId(choiceId);
285 }
286
287 public static void removeByQ_U(long questionId, long userId)
288 throws com.liferay.portal.kernel.exception.SystemException,
289 com.liferay.portlet.polls.NoSuchVoteException {
290 getPersistence().removeByQ_U(questionId, userId);
291 }
292
293 public static void removeAll()
294 throws com.liferay.portal.kernel.exception.SystemException {
295 getPersistence().removeAll();
296 }
297
298 public static int countByQuestionId(long questionId)
299 throws com.liferay.portal.kernel.exception.SystemException {
300 return getPersistence().countByQuestionId(questionId);
301 }
302
303 public static int countByChoiceId(long choiceId)
304 throws com.liferay.portal.kernel.exception.SystemException {
305 return getPersistence().countByChoiceId(choiceId);
306 }
307
308 public static int countByQ_U(long questionId, long userId)
309 throws com.liferay.portal.kernel.exception.SystemException {
310 return getPersistence().countByQ_U(questionId, userId);
311 }
312
313 public static int countAll()
314 throws com.liferay.portal.kernel.exception.SystemException {
315 return getPersistence().countAll();
316 }
317
318 public static PollsVotePersistence getPersistence() {
319 if (_persistence == null) {
320 _persistence = (PollsVotePersistence)PortalBeanLocatorUtil.locate(PollsVotePersistence.class.getName());
321 }
322
323 return _persistence;
324 }
325
326 public void setPersistence(PollsVotePersistence persistence) {
327 _persistence = persistence;
328 }
329
330 private static PollsVotePersistence _persistence;
331 }