001 /** 002 * Copyright (c) 2000-2011 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#remove(com.liferay.portal.model.BaseModel) 099 */ 100 public static PollsVote remove(PollsVote pollsVote) 101 throws SystemException { 102 return getPersistence().remove(pollsVote); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 107 */ 108 public static PollsVote update(PollsVote pollsVote, boolean merge) 109 throws SystemException { 110 return getPersistence().update(pollsVote, merge); 111 } 112 113 /** 114 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 115 */ 116 public static PollsVote update(PollsVote pollsVote, boolean merge, 117 ServiceContext serviceContext) throws SystemException { 118 return getPersistence().update(pollsVote, merge, serviceContext); 119 } 120 121 /** 122 * Caches the polls vote in the entity cache if it is enabled. 123 * 124 * @param pollsVote the polls vote 125 */ 126 public static void cacheResult( 127 com.liferay.portlet.polls.model.PollsVote pollsVote) { 128 getPersistence().cacheResult(pollsVote); 129 } 130 131 /** 132 * Caches the polls votes in the entity cache if it is enabled. 133 * 134 * @param pollsVotes the polls votes 135 */ 136 public static void cacheResult( 137 java.util.List<com.liferay.portlet.polls.model.PollsVote> pollsVotes) { 138 getPersistence().cacheResult(pollsVotes); 139 } 140 141 /** 142 * Creates a new polls vote with the primary key. Does not add the polls vote to the database. 143 * 144 * @param voteId the primary key for the new polls vote 145 * @return the new polls vote 146 */ 147 public static com.liferay.portlet.polls.model.PollsVote create(long voteId) { 148 return getPersistence().create(voteId); 149 } 150 151 /** 152 * Removes the polls vote with the primary key from the database. Also notifies the appropriate model listeners. 153 * 154 * @param voteId the primary key of the polls vote 155 * @return the polls vote that was removed 156 * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found 157 * @throws SystemException if a system exception occurred 158 */ 159 public static com.liferay.portlet.polls.model.PollsVote remove(long voteId) 160 throws com.liferay.portal.kernel.exception.SystemException, 161 com.liferay.portlet.polls.NoSuchVoteException { 162 return getPersistence().remove(voteId); 163 } 164 165 public static com.liferay.portlet.polls.model.PollsVote updateImpl( 166 com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge) 167 throws com.liferay.portal.kernel.exception.SystemException { 168 return getPersistence().updateImpl(pollsVote, merge); 169 } 170 171 /** 172 * Returns the polls vote with the primary key or throws a {@link com.liferay.portlet.polls.NoSuchVoteException} if it could not be found. 173 * 174 * @param voteId the primary key of the polls vote 175 * @return the polls vote 176 * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found 177 * @throws SystemException if a system exception occurred 178 */ 179 public static com.liferay.portlet.polls.model.PollsVote findByPrimaryKey( 180 long voteId) 181 throws com.liferay.portal.kernel.exception.SystemException, 182 com.liferay.portlet.polls.NoSuchVoteException { 183 return getPersistence().findByPrimaryKey(voteId); 184 } 185 186 /** 187 * Returns the polls vote with the primary key or returns <code>null</code> if it could not be found. 188 * 189 * @param voteId the primary key of the polls vote 190 * @return the polls vote, or <code>null</code> if a polls vote with the primary key could not be found 191 * @throws SystemException if a system exception occurred 192 */ 193 public static com.liferay.portlet.polls.model.PollsVote fetchByPrimaryKey( 194 long voteId) throws com.liferay.portal.kernel.exception.SystemException { 195 return getPersistence().fetchByPrimaryKey(voteId); 196 } 197 198 /** 199 * Returns all the polls votes where questionId = ?. 200 * 201 * @param questionId the question ID 202 * @return the matching polls votes 203 * @throws SystemException if a system exception occurred 204 */ 205 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId( 206 long questionId) 207 throws com.liferay.portal.kernel.exception.SystemException { 208 return getPersistence().findByQuestionId(questionId); 209 } 210 211 /** 212 * Returns a range of all the polls votes where questionId = ?. 213 * 214 * <p> 215 * 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. 216 * </p> 217 * 218 * @param questionId the question ID 219 * @param start the lower bound of the range of polls votes 220 * @param end the upper bound of the range of polls votes (not inclusive) 221 * @return the range of matching polls votes 222 * @throws SystemException if a system exception occurred 223 */ 224 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId( 225 long questionId, int start, int end) 226 throws com.liferay.portal.kernel.exception.SystemException { 227 return getPersistence().findByQuestionId(questionId, start, end); 228 } 229 230 /** 231 * Returns an ordered range of all the polls votes where questionId = ?. 232 * 233 * <p> 234 * 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. 235 * </p> 236 * 237 * @param questionId the question ID 238 * @param start the lower bound of the range of polls votes 239 * @param end the upper bound of the range of polls votes (not inclusive) 240 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 241 * @return the ordered range of matching polls votes 242 * @throws SystemException if a system exception occurred 243 */ 244 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId( 245 long questionId, int start, int end, 246 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 247 throws com.liferay.portal.kernel.exception.SystemException { 248 return getPersistence() 249 .findByQuestionId(questionId, start, end, orderByComparator); 250 } 251 252 /** 253 * Returns the first polls vote in the ordered set where questionId = ?. 254 * 255 * <p> 256 * 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. 257 * </p> 258 * 259 * @param questionId the question ID 260 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 261 * @return the first matching polls vote 262 * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found 263 * @throws SystemException if a system exception occurred 264 */ 265 public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_First( 266 long questionId, 267 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 268 throws com.liferay.portal.kernel.exception.SystemException, 269 com.liferay.portlet.polls.NoSuchVoteException { 270 return getPersistence() 271 .findByQuestionId_First(questionId, orderByComparator); 272 } 273 274 /** 275 * Returns the last polls vote in the ordered set where questionId = ?. 276 * 277 * <p> 278 * 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. 279 * </p> 280 * 281 * @param questionId the question ID 282 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 283 * @return the last matching polls vote 284 * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found 285 * @throws SystemException if a system exception occurred 286 */ 287 public static com.liferay.portlet.polls.model.PollsVote findByQuestionId_Last( 288 long questionId, 289 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 290 throws com.liferay.portal.kernel.exception.SystemException, 291 com.liferay.portlet.polls.NoSuchVoteException { 292 return getPersistence() 293 .findByQuestionId_Last(questionId, orderByComparator); 294 } 295 296 /** 297 * Returns the polls votes before and after the current polls vote in the ordered set where questionId = ?. 298 * 299 * <p> 300 * 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. 301 * </p> 302 * 303 * @param voteId the primary key of the current polls vote 304 * @param questionId the question ID 305 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 306 * @return the previous, current, and next polls vote 307 * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found 308 * @throws SystemException if a system exception occurred 309 */ 310 public static com.liferay.portlet.polls.model.PollsVote[] findByQuestionId_PrevAndNext( 311 long voteId, long questionId, 312 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 313 throws com.liferay.portal.kernel.exception.SystemException, 314 com.liferay.portlet.polls.NoSuchVoteException { 315 return getPersistence() 316 .findByQuestionId_PrevAndNext(voteId, questionId, 317 orderByComparator); 318 } 319 320 /** 321 * Returns all the polls votes where choiceId = ?. 322 * 323 * @param choiceId the choice ID 324 * @return the matching polls votes 325 * @throws SystemException if a system exception occurred 326 */ 327 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId( 328 long choiceId) 329 throws com.liferay.portal.kernel.exception.SystemException { 330 return getPersistence().findByChoiceId(choiceId); 331 } 332 333 /** 334 * Returns a range of all the polls votes where choiceId = ?. 335 * 336 * <p> 337 * 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. 338 * </p> 339 * 340 * @param choiceId the choice ID 341 * @param start the lower bound of the range of polls votes 342 * @param end the upper bound of the range of polls votes (not inclusive) 343 * @return the range of matching polls votes 344 * @throws SystemException if a system exception occurred 345 */ 346 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId( 347 long choiceId, int start, int end) 348 throws com.liferay.portal.kernel.exception.SystemException { 349 return getPersistence().findByChoiceId(choiceId, start, end); 350 } 351 352 /** 353 * Returns an ordered range of all the polls votes where choiceId = ?. 354 * 355 * <p> 356 * 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. 357 * </p> 358 * 359 * @param choiceId the choice ID 360 * @param start the lower bound of the range of polls votes 361 * @param end the upper bound of the range of polls votes (not inclusive) 362 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 363 * @return the ordered range of matching polls votes 364 * @throws SystemException if a system exception occurred 365 */ 366 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId( 367 long choiceId, int start, int end, 368 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 369 throws com.liferay.portal.kernel.exception.SystemException { 370 return getPersistence() 371 .findByChoiceId(choiceId, start, end, orderByComparator); 372 } 373 374 /** 375 * Returns the first polls vote in the ordered set where choiceId = ?. 376 * 377 * <p> 378 * 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. 379 * </p> 380 * 381 * @param choiceId the choice ID 382 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 383 * @return the first matching polls vote 384 * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found 385 * @throws SystemException if a system exception occurred 386 */ 387 public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_First( 388 long choiceId, 389 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 390 throws com.liferay.portal.kernel.exception.SystemException, 391 com.liferay.portlet.polls.NoSuchVoteException { 392 return getPersistence().findByChoiceId_First(choiceId, orderByComparator); 393 } 394 395 /** 396 * Returns the last polls vote in the ordered set where choiceId = ?. 397 * 398 * <p> 399 * 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. 400 * </p> 401 * 402 * @param choiceId the choice ID 403 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 404 * @return the last matching polls vote 405 * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found 406 * @throws SystemException if a system exception occurred 407 */ 408 public static com.liferay.portlet.polls.model.PollsVote findByChoiceId_Last( 409 long choiceId, 410 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 411 throws com.liferay.portal.kernel.exception.SystemException, 412 com.liferay.portlet.polls.NoSuchVoteException { 413 return getPersistence().findByChoiceId_Last(choiceId, orderByComparator); 414 } 415 416 /** 417 * Returns the polls votes before and after the current polls vote in the ordered set where choiceId = ?. 418 * 419 * <p> 420 * 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. 421 * </p> 422 * 423 * @param voteId the primary key of the current polls vote 424 * @param choiceId the choice ID 425 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 426 * @return the previous, current, and next polls vote 427 * @throws com.liferay.portlet.polls.NoSuchVoteException if a polls vote with the primary key could not be found 428 * @throws SystemException if a system exception occurred 429 */ 430 public static com.liferay.portlet.polls.model.PollsVote[] findByChoiceId_PrevAndNext( 431 long voteId, long choiceId, 432 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 433 throws com.liferay.portal.kernel.exception.SystemException, 434 com.liferay.portlet.polls.NoSuchVoteException { 435 return getPersistence() 436 .findByChoiceId_PrevAndNext(voteId, choiceId, 437 orderByComparator); 438 } 439 440 /** 441 * Returns the polls vote where questionId = ? and userId = ? or throws a {@link com.liferay.portlet.polls.NoSuchVoteException} if it could not be found. 442 * 443 * @param questionId the question ID 444 * @param userId the user ID 445 * @return the matching polls vote 446 * @throws com.liferay.portlet.polls.NoSuchVoteException if a matching polls vote could not be found 447 * @throws SystemException if a system exception occurred 448 */ 449 public static com.liferay.portlet.polls.model.PollsVote findByQ_U( 450 long questionId, long userId) 451 throws com.liferay.portal.kernel.exception.SystemException, 452 com.liferay.portlet.polls.NoSuchVoteException { 453 return getPersistence().findByQ_U(questionId, userId); 454 } 455 456 /** 457 * Returns the polls vote where questionId = ? and userId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 458 * 459 * @param questionId the question ID 460 * @param userId the user ID 461 * @return the matching polls vote, or <code>null</code> if a matching polls vote could not be found 462 * @throws SystemException if a system exception occurred 463 */ 464 public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U( 465 long questionId, long userId) 466 throws com.liferay.portal.kernel.exception.SystemException { 467 return getPersistence().fetchByQ_U(questionId, userId); 468 } 469 470 /** 471 * Returns the polls vote where questionId = ? and userId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 472 * 473 * @param questionId the question ID 474 * @param userId the user ID 475 * @param retrieveFromCache whether to use the finder cache 476 * @return the matching polls vote, or <code>null</code> if a matching polls vote could not be found 477 * @throws SystemException if a system exception occurred 478 */ 479 public static com.liferay.portlet.polls.model.PollsVote fetchByQ_U( 480 long questionId, long userId, boolean retrieveFromCache) 481 throws com.liferay.portal.kernel.exception.SystemException { 482 return getPersistence().fetchByQ_U(questionId, userId, retrieveFromCache); 483 } 484 485 /** 486 * Returns all the polls votes. 487 * 488 * @return the polls votes 489 * @throws SystemException if a system exception occurred 490 */ 491 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll() 492 throws com.liferay.portal.kernel.exception.SystemException { 493 return getPersistence().findAll(); 494 } 495 496 /** 497 * Returns a range of all the polls votes. 498 * 499 * <p> 500 * 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. 501 * </p> 502 * 503 * @param start the lower bound of the range of polls votes 504 * @param end the upper bound of the range of polls votes (not inclusive) 505 * @return the range of polls votes 506 * @throws SystemException if a system exception occurred 507 */ 508 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll( 509 int start, int end) 510 throws com.liferay.portal.kernel.exception.SystemException { 511 return getPersistence().findAll(start, end); 512 } 513 514 /** 515 * Returns an ordered range of all the polls votes. 516 * 517 * <p> 518 * 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. 519 * </p> 520 * 521 * @param start the lower bound of the range of polls votes 522 * @param end the upper bound of the range of polls votes (not inclusive) 523 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 524 * @return the ordered range of polls votes 525 * @throws SystemException if a system exception occurred 526 */ 527 public static java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll( 528 int start, int end, 529 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 530 throws com.liferay.portal.kernel.exception.SystemException { 531 return getPersistence().findAll(start, end, orderByComparator); 532 } 533 534 /** 535 * Removes all the polls votes where questionId = ? from the database. 536 * 537 * @param questionId the question ID 538 * @throws SystemException if a system exception occurred 539 */ 540 public static void removeByQuestionId(long questionId) 541 throws com.liferay.portal.kernel.exception.SystemException { 542 getPersistence().removeByQuestionId(questionId); 543 } 544 545 /** 546 * Removes all the polls votes where choiceId = ? from the database. 547 * 548 * @param choiceId the choice ID 549 * @throws SystemException if a system exception occurred 550 */ 551 public static void removeByChoiceId(long choiceId) 552 throws com.liferay.portal.kernel.exception.SystemException { 553 getPersistence().removeByChoiceId(choiceId); 554 } 555 556 /** 557 * Removes the polls vote where questionId = ? and userId = ? from the database. 558 * 559 * @param questionId the question ID 560 * @param userId the user ID 561 * @throws SystemException if a system exception occurred 562 */ 563 public static void removeByQ_U(long questionId, long userId) 564 throws com.liferay.portal.kernel.exception.SystemException, 565 com.liferay.portlet.polls.NoSuchVoteException { 566 getPersistence().removeByQ_U(questionId, userId); 567 } 568 569 /** 570 * Removes all the polls votes from the database. 571 * 572 * @throws SystemException if a system exception occurred 573 */ 574 public static void removeAll() 575 throws com.liferay.portal.kernel.exception.SystemException { 576 getPersistence().removeAll(); 577 } 578 579 /** 580 * Returns the number of polls votes where questionId = ?. 581 * 582 * @param questionId the question ID 583 * @return the number of matching polls votes 584 * @throws SystemException if a system exception occurred 585 */ 586 public static int countByQuestionId(long questionId) 587 throws com.liferay.portal.kernel.exception.SystemException { 588 return getPersistence().countByQuestionId(questionId); 589 } 590 591 /** 592 * Returns the number of polls votes where choiceId = ?. 593 * 594 * @param choiceId the choice ID 595 * @return the number of matching polls votes 596 * @throws SystemException if a system exception occurred 597 */ 598 public static int countByChoiceId(long choiceId) 599 throws com.liferay.portal.kernel.exception.SystemException { 600 return getPersistence().countByChoiceId(choiceId); 601 } 602 603 /** 604 * Returns the number of polls votes where questionId = ? and userId = ?. 605 * 606 * @param questionId the question ID 607 * @param userId the user ID 608 * @return the number of matching polls votes 609 * @throws SystemException if a system exception occurred 610 */ 611 public static int countByQ_U(long questionId, long userId) 612 throws com.liferay.portal.kernel.exception.SystemException { 613 return getPersistence().countByQ_U(questionId, userId); 614 } 615 616 /** 617 * Returns the number of polls votes. 618 * 619 * @return the number of polls votes 620 * @throws SystemException if a system exception occurred 621 */ 622 public static int countAll() 623 throws com.liferay.portal.kernel.exception.SystemException { 624 return getPersistence().countAll(); 625 } 626 627 public static PollsVotePersistence getPersistence() { 628 if (_persistence == null) { 629 _persistence = (PollsVotePersistence)PortalBeanLocatorUtil.locate(PollsVotePersistence.class.getName()); 630 631 ReferenceRegistry.registerReference(PollsVoteUtil.class, 632 "_persistence"); 633 } 634 635 return _persistence; 636 } 637 638 public void setPersistence(PollsVotePersistence persistence) { 639 _persistence = persistence; 640 641 ReferenceRegistry.registerReference(PollsVoteUtil.class, "_persistence"); 642 } 643 644 private static PollsVotePersistence _persistence; 645 }