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
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.SystemException,
94 com.liferay.portlet.polls.NoSuchVoteException {
95 return getPersistence().remove(voteId);
96 }
97
98
101 public static com.liferay.portlet.polls.model.PollsVote update(
102 com.liferay.portlet.polls.model.PollsVote pollsVote)
103 throws com.liferay.portal.SystemException {
104 return getPersistence().update(pollsVote);
105 }
106
107 public static com.liferay.portlet.polls.model.PollsVote updateImpl(
108 com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
109 throws com.liferay.portal.SystemException {
110 return getPersistence().updateImpl(pollsVote, merge);
111 }
112
113 public static com.liferay.portlet.polls.model.PollsVote findByPrimaryKey(
114 long voteId)
115 throws com.liferay.portal.SystemException,
116 com.liferay.portlet.polls.NoSuchVoteException {
117 return getPersistence().findByPrimaryKey(voteId);
118 }
119
120 public static com.liferay.portlet.polls.model.PollsVote fetchByPrimaryKey(
121 long voteId) throws com.liferay.portal.SystemException {
122 return getPersistence().fetchByPrimaryKey(voteId);
123 }
124
125 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
126 long questionId) throws com.liferay.portal.SystemException {
127 return getPersistence().findByQuestionId(questionId);
128 }
129
130 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
131 long questionId, int start, int end)
132 throws com.liferay.portal.SystemException {
133 return getPersistence().findByQuestionId(questionId, start, end);
134 }
135
136 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
137 long questionId, int start, int end,
138 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139 throws com.liferay.portal.SystemException {
140 return getPersistence()
141 .findByQuestionId(questionId, start, end, orderByComparator);
142 }
143
144 public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_First(
145 long questionId,
146 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
147 throws com.liferay.portal.SystemException,
148 com.liferay.portlet.polls.NoSuchVoteException {
149 return getPersistence()
150 .findByQuestionId_First(questionId, orderByComparator);
151 }
152
153 public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_Last(
154 long questionId,
155 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156 throws com.liferay.portal.SystemException,
157 com.liferay.portlet.polls.NoSuchVoteException {
158 return getPersistence()
159 .findByQuestionId_Last(questionId, orderByComparator);
160 }
161
162 public static com.liferay.portlet.polls.model.PollsVote[] findByQuestionId_PrevAndNext(
163 long voteId, long questionId,
164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165 throws com.liferay.portal.SystemException,
166 com.liferay.portlet.polls.NoSuchVoteException {
167 return getPersistence()
168 .findByQuestionId_PrevAndNext(voteId, questionId,
169 orderByComparator);
170 }
171
172 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
173 long choiceId) throws com.liferay.portal.SystemException {
174 return getPersistence().findByChoiceId(choiceId);
175 }
176
177 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
178 long choiceId, int start, int end)
179 throws com.liferay.portal.SystemException {
180 return getPersistence().findByChoiceId(choiceId, start, end);
181 }
182
183 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
184 long choiceId, int start, int end,
185 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
186 throws com.liferay.portal.SystemException {
187 return getPersistence()
188 .findByChoiceId(choiceId, start, end, orderByComparator);
189 }
190
191 public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_First(
192 long choiceId,
193 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194 throws com.liferay.portal.SystemException,
195 com.liferay.portlet.polls.NoSuchVoteException {
196 return getPersistence().findByChoiceId_First(choiceId, orderByComparator);
197 }
198
199 public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_Last(
200 long choiceId,
201 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202 throws com.liferay.portal.SystemException,
203 com.liferay.portlet.polls.NoSuchVoteException {
204 return getPersistence().findByChoiceId_Last(choiceId, orderByComparator);
205 }
206
207 public static com.liferay.portlet.polls.model.PollsVote[] findByChoiceId_PrevAndNext(
208 long voteId, long choiceId,
209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210 throws com.liferay.portal.SystemException,
211 com.liferay.portlet.polls.NoSuchVoteException {
212 return getPersistence()
213 .findByChoiceId_PrevAndNext(voteId, choiceId,
214 orderByComparator);
215 }
216
217 public static com.liferay.portlet.polls.model.PollsVote findByQ_U(
218 long questionId, long userId)
219 throws com.liferay.portal.SystemException,
220 com.liferay.portlet.polls.NoSuchVoteException {
221 return getPersistence().findByQ_U(questionId, userId);
222 }
223
224 public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
225 long questionId, long userId) throws com.liferay.portal.SystemException {
226 return getPersistence().fetchByQ_U(questionId, userId);
227 }
228
229 public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
230 long questionId, long userId, boolean retrieveFromCache)
231 throws com.liferay.portal.SystemException {
232 return getPersistence().fetchByQ_U(questionId, userId, retrieveFromCache);
233 }
234
235 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll()
236 throws com.liferay.portal.SystemException {
237 return getPersistence().findAll();
238 }
239
240 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
241 int start, int end) throws com.liferay.portal.SystemException {
242 return getPersistence().findAll(start, end);
243 }
244
245 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
246 int start, int end,
247 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
248 throws com.liferay.portal.SystemException {
249 return getPersistence().findAll(start, end, orderByComparator);
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 removeByChoiceId(long choiceId)
258 throws com.liferay.portal.SystemException {
259 getPersistence().removeByChoiceId(choiceId);
260 }
261
262 public static void removeByQ_U(long questionId, long userId)
263 throws com.liferay.portal.SystemException,
264 com.liferay.portlet.polls.NoSuchVoteException {
265 getPersistence().removeByQ_U(questionId, userId);
266 }
267
268 public static void removeAll() throws com.liferay.portal.SystemException {
269 getPersistence().removeAll();
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 countByChoiceId(long choiceId)
278 throws com.liferay.portal.SystemException {
279 return getPersistence().countByChoiceId(choiceId);
280 }
281
282 public static int countByQ_U(long questionId, long userId)
283 throws com.liferay.portal.SystemException {
284 return getPersistence().countByQ_U(questionId, userId);
285 }
286
287 public static int countAll() throws com.liferay.portal.SystemException {
288 return getPersistence().countAll();
289 }
290
291 public static PollsVotePersistence getPersistence() {
292 if (_persistence == null) {
293 _persistence = (PollsVotePersistence)PortalBeanLocatorUtil.locate(PollsVotePersistence.class.getName());
294 }
295
296 return _persistence;
297 }
298
299 public void setPersistence(PollsVotePersistence persistence) {
300 _persistence = persistence;
301 }
302
303 private static PollsVotePersistence _persistence;
304 }