001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 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.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.polls.model.PollsVote; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the polls vote service. This utility wraps {@link PollsVotePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see PollsVotePersistence 037 * @see PollsVotePersistenceImpl 038 * @generated 039 */ 040 public class PollsVoteUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(PollsVote pollsVote) { 058 getPersistence().clearCache(pollsVote); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<PollsVote> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<PollsVote> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<PollsVote> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 099 */ 100 public static PollsVote update(PollsVote pollsVote, boolean merge) 101 throws SystemException { 102 return getPersistence().update(pollsVote, merge); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 107 */ 108 public static PollsVote update(PollsVote pollsVote, boolean merge, 109 ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(pollsVote, merge, serviceContext); 111 } 112 113 /** 114 * Caches the polls vote in the entity cache if it is enabled. 115 * 116 * @param pollsVote the polls vote 117 */ 118 public static void cacheResult( 119 com.liferay.portlet.polls.model.PollsVote pollsVote) { 120 getPersistence().cacheResult(pollsVote); 121 } 122 123 /** 124 * Caches the polls votes in the entity cache if it is enabled. 125 * 126 * @param pollsVotes the polls votes 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portlet.polls.model.PollsVote> pollsVotes) { 130 getPersistence().cacheResult(pollsVotes); 131 } 132 133 /** 134 * Creates a new polls vote with the primary key. Does not add the polls vote to the database. 135 * 136 * @param voteId the primary key for the new polls vote 137 * @return the new polls vote 138 */ 139 public static com.liferay.portlet.polls.model.PollsVote create(long voteId) { 140 return getPersistence().create(voteId); 141 } 142 143 /** 144 * Removes the polls vote with the primary key from the database. Also notifies the appropriate model listeners. 145 * 146 * @param voteId the primary key of the polls vote 147 * @return the polls vote that was removed 148 * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found 149 * @throws SystemException if a system exception occurred 150 */ 151 public static com.liferay.portlet.polls.model.PollsVote remove(long voteId) 152 throws com.liferay.portal.kernel.exception.SystemException, 153 com.liferay.portlet.polls.NoSuchVoteException { 154 return getPersistence().remove(voteId); 155 } 156 157 public static com.liferay.portlet.polls.model.PollsVote updateImpl( 158 com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge) 159 throws com.liferay.portal.kernel.exception.SystemException { 160 return getPersistence().updateImpl(pollsVote, merge); 161 } 162 163 /** 164 * Returns the polls vote with the primary key or throws a {@link com.liferay.portlet.polls.NoSuchVoteException} if it could not be found. 165 * 166 * @param voteId the primary key of the polls vote 167 * @return the polls vote 168 * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found 169 * @throws SystemException if a system exception occurred 170 */ 171 public static com.liferay.portlet.polls.model.PollsVote findByPrimaryKey( 172 long voteId) 173 throws com.liferay.portal.kernel.exception.SystemException, 174 com.liferay.portlet.polls.NoSuchVoteException { 175 return getPersistence().findByPrimaryKey(voteId); 176 } 177 178 /** 179 * Returns the polls vote with the primary key or returns <code>null</code> if it could not be found. 180 * 181 * @param voteId the primary key of the polls vote 182 * @return the polls vote, or <code>null</code> if a polls vote with the primary key could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public static com.liferay.portlet.polls.model.PollsVote fetchByPrimaryKey( 186 long voteId) throws com.liferay.portal.kernel.exception.SystemException { 187 return getPersistence().fetchByPrimaryKey(voteId); 188 } 189 190 /** 191 * Returns all the polls votes where questionId = ?. 192 * 193 * @param questionId the question ID 194 * @return the matching polls votes 195 * @throws SystemException if a system exception occurred 196 */ 197 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId( 198 long questionId) 199 throws com.liferay.portal.kernel.exception.SystemException { 200 return getPersistence().findByQuestionId(questionId); 201 } 202 203 /** 204 * Returns a range of all the polls votes where questionId = ?. 205 * 206 * <p> 207 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 208 * </p> 209 * 210 * @param questionId the question ID 211 * @param start the lower bound of the range of polls votes 212 * @param end the upper bound of the range of polls votes (not inclusive) 213 * @return the range of matching polls votes 214 * @throws SystemException if a system exception occurred 215 */ 216 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId( 217 long questionId, int start, int end) 218 throws com.liferay.portal.kernel.exception.SystemException { 219 return getPersistence().findByQuestionId(questionId, start, end); 220 } 221 222 /** 223 * Returns an ordered range of all the polls votes where questionId = ?. 224 * 225 * <p> 226 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 227 * </p> 228 * 229 * @param questionId the question ID 230 * @param start the lower bound of the range of polls votes 231 * @param end the upper bound of the range of polls votes (not inclusive) 232 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 233 * @return the ordered range of matching polls votes 234 * @throws SystemException if a system exception occurred 235 */ 236 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId( 237 long questionId, int start, int end, 238 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 239 throws com.liferay.portal.kernel.exception.SystemException { 240 return getPersistence() 241 .findByQuestionId(questionId, start, end, orderByComparator); 242 } 243 244 /** 245 * Returns the first polls vote in the ordered set where questionId = ?. 246 * 247 * <p> 248 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 249 * </p> 250 * 251 * @param questionId the question ID 252 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 253 * @return the first matching polls vote 254 * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found 255 * @throws SystemException if a system exception occurred 256 */ 257 public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_First( 258 long questionId, 259 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 260 throws com.liferay.portal.kernel.exception.SystemException, 261 com.liferay.portlet.polls.NoSuchVoteException { 262 return getPersistence() 263 .findByQuestionId_First(questionId, orderByComparator); 264 } 265 266 /** 267 * Returns the last polls vote in the ordered set where questionId = ?. 268 * 269 * <p> 270 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 271 * </p> 272 * 273 * @param questionId the question ID 274 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 275 * @return the last matching polls vote 276 * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found 277 * @throws SystemException if a system exception occurred 278 */ 279 public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_Last( 280 long questionId, 281 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 282 throws com.liferay.portal.kernel.exception.SystemException, 283 com.liferay.portlet.polls.NoSuchVoteException { 284 return getPersistence() 285 .findByQuestionId_Last(questionId, orderByComparator); 286 } 287 288 /** 289 * Returns the polls votes before and after the current polls vote in the ordered set where questionId = ?. 290 * 291 * <p> 292 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 293 * </p> 294 * 295 * @param voteId the primary key of the current polls vote 296 * @param questionId the question ID 297 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 298 * @return the previous, current, and next polls vote 299 * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found 300 * @throws SystemException if a system exception occurred 301 */ 302 public static com.liferay.portlet.polls.model.PollsVote[] findByQuestionId_PrevAndNext( 303 long voteId, long questionId, 304 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 305 throws com.liferay.portal.kernel.exception.SystemException, 306 com.liferay.portlet.polls.NoSuchVoteException { 307 return getPersistence() 308 .findByQuestionId_PrevAndNext(voteId, questionId, 309 orderByComparator); 310 } 311 312 /** 313 * Returns all the polls votes where choiceId = ?. 314 * 315 * @param choiceId the choice ID 316 * @return the matching polls votes 317 * @throws SystemException if a system exception occurred 318 */ 319 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId( 320 long choiceId) 321 throws com.liferay.portal.kernel.exception.SystemException { 322 return getPersistence().findByChoiceId(choiceId); 323 } 324 325 /** 326 * Returns a range of all the polls votes where choiceId = ?. 327 * 328 * <p> 329 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 330 * </p> 331 * 332 * @param choiceId the choice ID 333 * @param start the lower bound of the range of polls votes 334 * @param end the upper bound of the range of polls votes (not inclusive) 335 * @return the range of matching polls votes 336 * @throws SystemException if a system exception occurred 337 */ 338 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId( 339 long choiceId, int start, int end) 340 throws com.liferay.portal.kernel.exception.SystemException { 341 return getPersistence().findByChoiceId(choiceId, start, end); 342 } 343 344 /** 345 * Returns an ordered range of all the polls votes where choiceId = ?. 346 * 347 * <p> 348 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 349 * </p> 350 * 351 * @param choiceId the choice ID 352 * @param start the lower bound of the range of polls votes 353 * @param end the upper bound of the range of polls votes (not inclusive) 354 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 355 * @return the ordered range of matching polls votes 356 * @throws SystemException if a system exception occurred 357 */ 358 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId( 359 long choiceId, int start, int end, 360 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 361 throws com.liferay.portal.kernel.exception.SystemException { 362 return getPersistence() 363 .findByChoiceId(choiceId, start, end, orderByComparator); 364 } 365 366 /** 367 * Returns the first polls vote in the ordered set where choiceId = ?. 368 * 369 * <p> 370 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 371 * </p> 372 * 373 * @param choiceId the choice ID 374 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 375 * @return the first matching polls vote 376 * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found 377 * @throws SystemException if a system exception occurred 378 */ 379 public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_First( 380 long choiceId, 381 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 382 throws com.liferay.portal.kernel.exception.SystemException, 383 com.liferay.portlet.polls.NoSuchVoteException { 384 return getPersistence().findByChoiceId_First(choiceId, orderByComparator); 385 } 386 387 /** 388 * Returns the last polls vote in the ordered set where choiceId = ?. 389 * 390 * <p> 391 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 392 * </p> 393 * 394 * @param choiceId the choice ID 395 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 396 * @return the last matching polls vote 397 * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found 398 * @throws SystemException if a system exception occurred 399 */ 400 public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_Last( 401 long choiceId, 402 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 403 throws com.liferay.portal.kernel.exception.SystemException, 404 com.liferay.portlet.polls.NoSuchVoteException { 405 return getPersistence().findByChoiceId_Last(choiceId, orderByComparator); 406 } 407 408 /** 409 * Returns the polls votes before and after the current polls vote in the ordered set where choiceId = ?. 410 * 411 * <p> 412 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 413 * </p> 414 * 415 * @param voteId the primary key of the current polls vote 416 * @param choiceId the choice ID 417 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 418 * @return the previous, current, and next polls vote 419 * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found 420 * @throws SystemException if a system exception occurred 421 */ 422 public static com.liferay.portlet.polls.model.PollsVote[] findByChoiceId_PrevAndNext( 423 long voteId, long choiceId, 424 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 425 throws com.liferay.portal.kernel.exception.SystemException, 426 com.liferay.portlet.polls.NoSuchVoteException { 427 return getPersistence() 428 .findByChoiceId_PrevAndNext(voteId, choiceId, 429 orderByComparator); 430 } 431 432 /** 433 * Returns the polls vote where questionId = ? and userId = ? or throws a {@link com.liferay.portlet.polls.NoSuchVoteException} if it could not be found. 434 * 435 * @param questionId the question ID 436 * @param userId the user ID 437 * @return the matching polls vote 438 * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found 439 * @throws SystemException if a system exception occurred 440 */ 441 public static com.liferay.portlet.polls.model.PollsVote findByQ_U( 442 long questionId, long userId) 443 throws com.liferay.portal.kernel.exception.SystemException, 444 com.liferay.portlet.polls.NoSuchVoteException { 445 return getPersistence().findByQ_U(questionId, userId); 446 } 447 448 /** 449 * Returns the polls vote where questionId = ? and userId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 450 * 451 * @param questionId the question ID 452 * @param userId the user ID 453 * @return the matching polls vote, or <code>null</code> if a matching polls vote could not be found 454 * @throws SystemException if a system exception occurred 455 */ 456 public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U( 457 long questionId, long userId) 458 throws com.liferay.portal.kernel.exception.SystemException { 459 return getPersistence().fetchByQ_U(questionId, userId); 460 } 461 462 /** 463 * Returns the polls vote where questionId = ? and userId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 464 * 465 * @param questionId the question ID 466 * @param userId the user ID 467 * @param retrieveFromCache whether to use the finder cache 468 * @return the matching polls vote, or <code>null</code> if a matching polls vote could not be found 469 * @throws SystemException if a system exception occurred 470 */ 471 public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U( 472 long questionId, long userId, boolean retrieveFromCache) 473 throws com.liferay.portal.kernel.exception.SystemException { 474 return getPersistence().fetchByQ_U(questionId, userId, retrieveFromCache); 475 } 476 477 /** 478 * Returns all the polls votes. 479 * 480 * @return the polls votes 481 * @throws SystemException if a system exception occurred 482 */ 483 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll() 484 throws com.liferay.portal.kernel.exception.SystemException { 485 return getPersistence().findAll(); 486 } 487 488 /** 489 * Returns a range of all the polls votes. 490 * 491 * <p> 492 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 493 * </p> 494 * 495 * @param start the lower bound of the range of polls votes 496 * @param end the upper bound of the range of polls votes (not inclusive) 497 * @return the range of polls votes 498 * @throws SystemException if a system exception occurred 499 */ 500 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll( 501 int start, int end) 502 throws com.liferay.portal.kernel.exception.SystemException { 503 return getPersistence().findAll(start, end); 504 } 505 506 /** 507 * Returns an ordered range of all the polls votes. 508 * 509 * <p> 510 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 511 * </p> 512 * 513 * @param start the lower bound of the range of polls votes 514 * @param end the upper bound of the range of polls votes (not inclusive) 515 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 516 * @return the ordered range of polls votes 517 * @throws SystemException if a system exception occurred 518 */ 519 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll( 520 int start, int end, 521 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 522 throws com.liferay.portal.kernel.exception.SystemException { 523 return getPersistence().findAll(start, end, orderByComparator); 524 } 525 526 /** 527 * Removes all the polls votes where questionId = ? from the database. 528 * 529 * @param questionId the question ID 530 * @throws SystemException if a system exception occurred 531 */ 532 public static void removeByQuestionId(long questionId) 533 throws com.liferay.portal.kernel.exception.SystemException { 534 getPersistence().removeByQuestionId(questionId); 535 } 536 537 /** 538 * Removes all the polls votes where choiceId = ? from the database. 539 * 540 * @param choiceId the choice ID 541 * @throws SystemException if a system exception occurred 542 */ 543 public static void removeByChoiceId(long choiceId) 544 throws com.liferay.portal.kernel.exception.SystemException { 545 getPersistence().removeByChoiceId(choiceId); 546 } 547 548 /** 549 * Removes the polls vote where questionId = ? and userId = ? from the database. 550 * 551 * @param questionId the question ID 552 * @param userId the user ID 553 * @throws SystemException if a system exception occurred 554 */ 555 public static void removeByQ_U(long questionId, long userId) 556 throws com.liferay.portal.kernel.exception.SystemException, 557 com.liferay.portlet.polls.NoSuchVoteException { 558 getPersistence().removeByQ_U(questionId, userId); 559 } 560 561 /** 562 * Removes all the polls votes from the database. 563 * 564 * @throws SystemException if a system exception occurred 565 */ 566 public static void removeAll() 567 throws com.liferay.portal.kernel.exception.SystemException { 568 getPersistence().removeAll(); 569 } 570 571 /** 572 * Returns the number of polls votes where questionId = ?. 573 * 574 * @param questionId the question ID 575 * @return the number of matching polls votes 576 * @throws SystemException if a system exception occurred 577 */ 578 public static int countByQuestionId(long questionId) 579 throws com.liferay.portal.kernel.exception.SystemException { 580 return getPersistence().countByQuestionId(questionId); 581 } 582 583 /** 584 * Returns the number of polls votes where choiceId = ?. 585 * 586 * @param choiceId the choice ID 587 * @return the number of matching polls votes 588 * @throws SystemException if a system exception occurred 589 */ 590 public static int countByChoiceId(long choiceId) 591 throws com.liferay.portal.kernel.exception.SystemException { 592 return getPersistence().countByChoiceId(choiceId); 593 } 594 595 /** 596 * Returns the number of polls votes where questionId = ? and userId = ?. 597 * 598 * @param questionId the question ID 599 * @param userId the user ID 600 * @return the number of matching polls votes 601 * @throws SystemException if a system exception occurred 602 */ 603 public static int countByQ_U(long questionId, long userId) 604 throws com.liferay.portal.kernel.exception.SystemException { 605 return getPersistence().countByQ_U(questionId, userId); 606 } 607 608 /** 609 * Returns the number of polls votes. 610 * 611 * @return the number of polls votes 612 * @throws SystemException if a system exception occurred 613 */ 614 public static int countAll() 615 throws com.liferay.portal.kernel.exception.SystemException { 616 return getPersistence().countAll(); 617 } 618 619 public static PollsVotePersistence getPersistence() { 620 if (_persistence == null) { 621 _persistence = (PollsVotePersistence)PortalBeanLocatorUtil.locate(PollsVotePersistence.class.getName()); 622 623 ReferenceRegistry.registerReference(PollsVoteUtil.class, 624 "_persistence"); 625 } 626 627 return _persistence; 628 } 629 630 public void setPersistence(PollsVotePersistence persistence) { 631 _persistence = persistence; 632 633 ReferenceRegistry.registerReference(PollsVoteUtil.class, "_persistence"); 634 } 635 636 private static PollsVotePersistence _persistence; 637 }