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