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 obc)
131 throws com.liferay.portal.kernel.exception.SystemException {
132 return getPersistence().findByQuestionId(questionId, start, end, obc);
133 }
134
135 public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_First(
136 long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
137 throws com.liferay.portal.kernel.exception.SystemException,
138 com.liferay.portlet.polls.NoSuchVoteException {
139 return getPersistence().findByQuestionId_First(questionId, obc);
140 }
141
142 public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_Last(
143 long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
144 throws com.liferay.portal.kernel.exception.SystemException,
145 com.liferay.portlet.polls.NoSuchVoteException {
146 return getPersistence().findByQuestionId_Last(questionId, obc);
147 }
148
149 public static com.liferay.portlet.polls.model.PollsVote[] findByQuestionId_PrevAndNext(
150 long voteId, long questionId,
151 com.liferay.portal.kernel.util.OrderByComparator obc)
152 throws com.liferay.portal.kernel.exception.SystemException,
153 com.liferay.portlet.polls.NoSuchVoteException {
154 return getPersistence()
155 .findByQuestionId_PrevAndNext(voteId, questionId, obc);
156 }
157
158 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
159 long choiceId)
160 throws com.liferay.portal.kernel.exception.SystemException {
161 return getPersistence().findByChoiceId(choiceId);
162 }
163
164 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
165 long choiceId, int start, int end)
166 throws com.liferay.portal.kernel.exception.SystemException {
167 return getPersistence().findByChoiceId(choiceId, start, end);
168 }
169
170 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
171 long choiceId, int start, int end,
172 com.liferay.portal.kernel.util.OrderByComparator obc)
173 throws com.liferay.portal.kernel.exception.SystemException {
174 return getPersistence().findByChoiceId(choiceId, start, end, obc);
175 }
176
177 public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_First(
178 long choiceId, com.liferay.portal.kernel.util.OrderByComparator obc)
179 throws com.liferay.portal.kernel.exception.SystemException,
180 com.liferay.portlet.polls.NoSuchVoteException {
181 return getPersistence().findByChoiceId_First(choiceId, obc);
182 }
183
184 public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_Last(
185 long choiceId, com.liferay.portal.kernel.util.OrderByComparator obc)
186 throws com.liferay.portal.kernel.exception.SystemException,
187 com.liferay.portlet.polls.NoSuchVoteException {
188 return getPersistence().findByChoiceId_Last(choiceId, obc);
189 }
190
191 public static com.liferay.portlet.polls.model.PollsVote[] findByChoiceId_PrevAndNext(
192 long voteId, long choiceId,
193 com.liferay.portal.kernel.util.OrderByComparator obc)
194 throws com.liferay.portal.kernel.exception.SystemException,
195 com.liferay.portlet.polls.NoSuchVoteException {
196 return getPersistence().findByChoiceId_PrevAndNext(voteId, choiceId, obc);
197 }
198
199 public static com.liferay.portlet.polls.model.PollsVote findByQ_U(
200 long questionId, long userId)
201 throws com.liferay.portal.kernel.exception.SystemException,
202 com.liferay.portlet.polls.NoSuchVoteException {
203 return getPersistence().findByQ_U(questionId, userId);
204 }
205
206 public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
207 long questionId, long userId)
208 throws com.liferay.portal.kernel.exception.SystemException {
209 return getPersistence().fetchByQ_U(questionId, userId);
210 }
211
212 public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
213 long questionId, long userId, boolean retrieveFromCache)
214 throws com.liferay.portal.kernel.exception.SystemException {
215 return getPersistence().fetchByQ_U(questionId, userId, retrieveFromCache);
216 }
217
218 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll()
219 throws com.liferay.portal.kernel.exception.SystemException {
220 return getPersistence().findAll();
221 }
222
223 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
224 int start, int end)
225 throws com.liferay.portal.kernel.exception.SystemException {
226 return getPersistence().findAll(start, end);
227 }
228
229 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
230 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
231 throws com.liferay.portal.kernel.exception.SystemException {
232 return getPersistence().findAll(start, end, obc);
233 }
234
235 public static void removeByQuestionId(long questionId)
236 throws com.liferay.portal.kernel.exception.SystemException {
237 getPersistence().removeByQuestionId(questionId);
238 }
239
240 public static void removeByChoiceId(long choiceId)
241 throws com.liferay.portal.kernel.exception.SystemException {
242 getPersistence().removeByChoiceId(choiceId);
243 }
244
245 public static void removeByQ_U(long questionId, long userId)
246 throws com.liferay.portal.kernel.exception.SystemException,
247 com.liferay.portlet.polls.NoSuchVoteException {
248 getPersistence().removeByQ_U(questionId, userId);
249 }
250
251 public static void removeAll()
252 throws com.liferay.portal.kernel.exception.SystemException {
253 getPersistence().removeAll();
254 }
255
256 public static int countByQuestionId(long questionId)
257 throws com.liferay.portal.kernel.exception.SystemException {
258 return getPersistence().countByQuestionId(questionId);
259 }
260
261 public static int countByChoiceId(long choiceId)
262 throws com.liferay.portal.kernel.exception.SystemException {
263 return getPersistence().countByChoiceId(choiceId);
264 }
265
266 public static int countByQ_U(long questionId, long userId)
267 throws com.liferay.portal.kernel.exception.SystemException {
268 return getPersistence().countByQ_U(questionId, userId);
269 }
270
271 public static int countAll()
272 throws com.liferay.portal.kernel.exception.SystemException {
273 return getPersistence().countAll();
274 }
275
276 public static PollsVotePersistence getPersistence() {
277 if (_persistence == null) {
278 _persistence = (PollsVotePersistence)PortalBeanLocatorUtil.locate(PollsVotePersistence.class.getName());
279 }
280
281 return _persistence;
282 }
283
284 public void setPersistence(PollsVotePersistence persistence) {
285 _persistence = persistence;
286 }
287
288 private static PollsVotePersistence _persistence;
289 }