001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 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 to cache 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 to cache 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 to remove 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 * Finds 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 to find 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 * Finds 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 to find 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 * Finds all the polls choices where uuid = ?. 203 * 204 * @param uuid the uuid to search with 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 * Finds 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 to search with 222 * @param start the lower bound of the range of polls choices to return 223 * @param end the upper bound of the range of polls choices to return (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 * Finds 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 to search with 241 * @param start the lower bound of the range of polls choices to return 242 * @param end the upper bound of the range of polls choices to return (not inclusive) 243 * @param orderByComparator the comparator to order the results by 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 * Finds 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 to search with 262 * @param orderByComparator the comparator to order the set by 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 * Finds 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 to search with 283 * @param orderByComparator the comparator to order the set by 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 * Finds 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 to search with 305 * @param orderByComparator the comparator to order the set by 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 * Finds all the polls choices where questionId = ?. 321 * 322 * @param questionId the question ID to search with 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 * Finds 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 to search with 340 * @param start the lower bound of the range of polls choices to return 341 * @param end the upper bound of the range of polls choices to return (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 * Finds 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 to search with 359 * @param start the lower bound of the range of polls choices to return 360 * @param end the upper bound of the range of polls choices to return (not inclusive) 361 * @param orderByComparator the comparator to order the results by 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 * Finds 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 to search with 381 * @param orderByComparator the comparator to order the set by 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 * Finds 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 to search with 403 * @param orderByComparator the comparator to order the set by 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 * Finds 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 to search with 426 * @param orderByComparator the comparator to order the set by 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 * Finds 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 to search with 445 * @param name the name to search with 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 * Finds 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 to search with 461 * @param name the name to search with 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 * Finds 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 to search with 475 * @param name the name to search with 476 * @return the matching polls choice, or <code>null</code> if a matching polls choice could not be found 477 * @throws SystemException if a system exception occurred 478 */ 479 public static com.liferay.portlet.polls.model.PollsChoice fetchByQ_N( 480 long questionId, java.lang.String name, boolean retrieveFromCache) 481 throws com.liferay.portal.kernel.exception.SystemException { 482 return getPersistence().fetchByQ_N(questionId, name, retrieveFromCache); 483 } 484 485 /** 486 * Finds all the polls choices. 487 * 488 * @return the polls choices 489 * @throws SystemException if a system exception occurred 490 */ 491 public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll() 492 throws com.liferay.portal.kernel.exception.SystemException { 493 return getPersistence().findAll(); 494 } 495 496 /** 497 * Finds a range of all the polls choices. 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 choices to return 504 * @param end the upper bound of the range of polls choices to return (not inclusive) 505 * @return the range of polls choices 506 * @throws SystemException if a system exception occurred 507 */ 508 public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll( 509 int start, int end) 510 throws com.liferay.portal.kernel.exception.SystemException { 511 return getPersistence().findAll(start, end); 512 } 513 514 /** 515 * Finds an ordered range of all the polls choices. 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 choices to return 522 * @param end the upper bound of the range of polls choices to return (not inclusive) 523 * @param orderByComparator the comparator to order the results by 524 * @return the ordered range of polls choices 525 * @throws SystemException if a system exception occurred 526 */ 527 public static java.util.List<com.liferay.portlet.polls.model.PollsChoice> 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 choices where uuid = ? from the database. 536 * 537 * @param uuid the uuid to search with 538 * @throws SystemException if a system exception occurred 539 */ 540 public static void removeByUuid(java.lang.String uuid) 541 throws com.liferay.portal.kernel.exception.SystemException { 542 getPersistence().removeByUuid(uuid); 543 } 544 545 /** 546 * Removes all the polls choices where questionId = ? from the database. 547 * 548 * @param questionId the question ID to search with 549 * @throws SystemException if a system exception occurred 550 */ 551 public static void removeByQuestionId(long questionId) 552 throws com.liferay.portal.kernel.exception.SystemException { 553 getPersistence().removeByQuestionId(questionId); 554 } 555 556 /** 557 * Removes the polls choice where questionId = ? and name = ? from the database. 558 * 559 * @param questionId the question ID to search with 560 * @param name the name to search with 561 * @throws SystemException if a system exception occurred 562 */ 563 public static void removeByQ_N(long questionId, java.lang.String name) 564 throws com.liferay.portal.kernel.exception.SystemException, 565 com.liferay.portlet.polls.NoSuchChoiceException { 566 getPersistence().removeByQ_N(questionId, name); 567 } 568 569 /** 570 * Removes all the polls choices 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 * Counts all the polls choices where uuid = ?. 581 * 582 * @param uuid the uuid to search with 583 * @return the number of matching polls choices 584 * @throws SystemException if a system exception occurred 585 */ 586 public static int countByUuid(java.lang.String uuid) 587 throws com.liferay.portal.kernel.exception.SystemException { 588 return getPersistence().countByUuid(uuid); 589 } 590 591 /** 592 * Counts all the polls choices where questionId = ?. 593 * 594 * @param questionId the question ID to search with 595 * @return the number of matching polls choices 596 * @throws SystemException if a system exception occurred 597 */ 598 public static int countByQuestionId(long questionId) 599 throws com.liferay.portal.kernel.exception.SystemException { 600 return getPersistence().countByQuestionId(questionId); 601 } 602 603 /** 604 * Counts all the polls choices where questionId = ? and name = ?. 605 * 606 * @param questionId the question ID to search with 607 * @param name the name to search with 608 * @return the number of matching polls choices 609 * @throws SystemException if a system exception occurred 610 */ 611 public static int countByQ_N(long questionId, java.lang.String name) 612 throws com.liferay.portal.kernel.exception.SystemException { 613 return getPersistence().countByQ_N(questionId, name); 614 } 615 616 /** 617 * Counts all the polls choices. 618 * 619 * @return the number of polls choices 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 PollsChoicePersistence getPersistence() { 628 if (_persistence == null) { 629 _persistence = (PollsChoicePersistence)PortalBeanLocatorUtil.locate(PollsChoicePersistence.class.getName()); 630 631 ReferenceRegistry.registerReference(PollsChoiceUtil.class, 632 "_persistence"); 633 } 634 635 return _persistence; 636 } 637 638 public void setPersistence(PollsChoicePersistence persistence) { 639 _persistence = persistence; 640 641 ReferenceRegistry.registerReference(PollsChoiceUtil.class, 642 "_persistence"); 643 } 644 645 private static PollsChoicePersistence _persistence; 646 }