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