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