001 /** 002 * Copyright (c) 2000-2013 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.PollsQuestion; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the polls question service. This utility wraps {@link PollsQuestionPersistenceImpl} 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 PollsQuestionPersistence 037 * @see PollsQuestionPersistenceImpl 038 * @generated 039 */ 040 public class PollsQuestionUtil { 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(PollsQuestion pollsQuestion) { 058 getPersistence().clearCache(pollsQuestion); 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<PollsQuestion> 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<PollsQuestion> 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<PollsQuestion> 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 PollsQuestion update(PollsQuestion pollsQuestion, 101 boolean merge) throws SystemException { 102 return getPersistence().update(pollsQuestion, merge); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 107 */ 108 public static PollsQuestion update(PollsQuestion pollsQuestion, 109 boolean merge, ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(pollsQuestion, merge, serviceContext); 111 } 112 113 /** 114 * Caches the polls question in the entity cache if it is enabled. 115 * 116 * @param pollsQuestion the polls question 117 */ 118 public static void cacheResult( 119 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion) { 120 getPersistence().cacheResult(pollsQuestion); 121 } 122 123 /** 124 * Caches the polls questions in the entity cache if it is enabled. 125 * 126 * @param pollsQuestions the polls questions 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portlet.polls.model.PollsQuestion> pollsQuestions) { 130 getPersistence().cacheResult(pollsQuestions); 131 } 132 133 /** 134 * Creates a new polls question with the primary key. Does not add the polls question to the database. 135 * 136 * @param questionId the primary key for the new polls question 137 * @return the new polls question 138 */ 139 public static com.liferay.portlet.polls.model.PollsQuestion create( 140 long questionId) { 141 return getPersistence().create(questionId); 142 } 143 144 /** 145 * Removes the polls question with the primary key from the database. Also notifies the appropriate model listeners. 146 * 147 * @param questionId the primary key of the polls question 148 * @return the polls question that was removed 149 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 public static com.liferay.portlet.polls.model.PollsQuestion remove( 153 long questionId) 154 throws com.liferay.portal.kernel.exception.SystemException, 155 com.liferay.portlet.polls.NoSuchQuestionException { 156 return getPersistence().remove(questionId); 157 } 158 159 public static com.liferay.portlet.polls.model.PollsQuestion updateImpl( 160 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion, 161 boolean merge) 162 throws com.liferay.portal.kernel.exception.SystemException { 163 return getPersistence().updateImpl(pollsQuestion, merge); 164 } 165 166 /** 167 * Returns the polls question with the primary key or throws a {@link com.liferay.portlet.polls.NoSuchQuestionException} if it could not be found. 168 * 169 * @param questionId the primary key of the polls question 170 * @return the polls question 171 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found 172 * @throws SystemException if a system exception occurred 173 */ 174 public static com.liferay.portlet.polls.model.PollsQuestion findByPrimaryKey( 175 long questionId) 176 throws com.liferay.portal.kernel.exception.SystemException, 177 com.liferay.portlet.polls.NoSuchQuestionException { 178 return getPersistence().findByPrimaryKey(questionId); 179 } 180 181 /** 182 * Returns the polls question with the primary key or returns <code>null</code> if it could not be found. 183 * 184 * @param questionId the primary key of the polls question 185 * @return the polls question, or <code>null</code> if a polls question with the primary key could not be found 186 * @throws SystemException if a system exception occurred 187 */ 188 public static com.liferay.portlet.polls.model.PollsQuestion fetchByPrimaryKey( 189 long questionId) 190 throws com.liferay.portal.kernel.exception.SystemException { 191 return getPersistence().fetchByPrimaryKey(questionId); 192 } 193 194 /** 195 * Returns all the polls questions where uuid = ?. 196 * 197 * @param uuid the uuid 198 * @return the matching polls questions 199 * @throws SystemException if a system exception occurred 200 */ 201 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid( 202 java.lang.String uuid) 203 throws com.liferay.portal.kernel.exception.SystemException { 204 return getPersistence().findByUuid(uuid); 205 } 206 207 /** 208 * Returns a range of all the polls questions where uuid = ?. 209 * 210 * <p> 211 * 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. 212 * </p> 213 * 214 * @param uuid the uuid 215 * @param start the lower bound of the range of polls questions 216 * @param end the upper bound of the range of polls questions (not inclusive) 217 * @return the range of matching polls questions 218 * @throws SystemException if a system exception occurred 219 */ 220 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid( 221 java.lang.String uuid, int start, int end) 222 throws com.liferay.portal.kernel.exception.SystemException { 223 return getPersistence().findByUuid(uuid, start, end); 224 } 225 226 /** 227 * Returns an ordered range of all the polls questions where uuid = ?. 228 * 229 * <p> 230 * 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. 231 * </p> 232 * 233 * @param uuid the uuid 234 * @param start the lower bound of the range of polls questions 235 * @param end the upper bound of the range of polls questions (not inclusive) 236 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 237 * @return the ordered range of matching polls questions 238 * @throws SystemException if a system exception occurred 239 */ 240 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid( 241 java.lang.String uuid, int start, int end, 242 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 243 throws com.liferay.portal.kernel.exception.SystemException { 244 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 245 } 246 247 /** 248 * Returns the first polls question in the ordered set where uuid = ?. 249 * 250 * @param uuid the uuid 251 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 252 * @return the first matching polls question 253 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found 254 * @throws SystemException if a system exception occurred 255 */ 256 public static com.liferay.portlet.polls.model.PollsQuestion findByUuid_First( 257 java.lang.String uuid, 258 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 259 throws com.liferay.portal.kernel.exception.SystemException, 260 com.liferay.portlet.polls.NoSuchQuestionException { 261 return getPersistence().findByUuid_First(uuid, orderByComparator); 262 } 263 264 /** 265 * Returns the first polls question in the ordered set where uuid = ?. 266 * 267 * @param uuid the uuid 268 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 269 * @return the first matching polls question, or <code>null</code> if a matching polls question could not be found 270 * @throws SystemException if a system exception occurred 271 */ 272 public static com.liferay.portlet.polls.model.PollsQuestion fetchByUuid_First( 273 java.lang.String uuid, 274 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 275 throws com.liferay.portal.kernel.exception.SystemException { 276 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 277 } 278 279 /** 280 * Returns the last polls question in the ordered set where uuid = ?. 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 question 285 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found 286 * @throws SystemException if a system exception occurred 287 */ 288 public static com.liferay.portlet.polls.model.PollsQuestion 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.NoSuchQuestionException { 293 return getPersistence().findByUuid_Last(uuid, orderByComparator); 294 } 295 296 /** 297 * Returns the last polls question in the ordered set where uuid = ?. 298 * 299 * @param uuid the uuid 300 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 301 * @return the last matching polls question, or <code>null</code> if a matching polls question could not be found 302 * @throws SystemException if a system exception occurred 303 */ 304 public static com.liferay.portlet.polls.model.PollsQuestion fetchByUuid_Last( 305 java.lang.String uuid, 306 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 307 throws com.liferay.portal.kernel.exception.SystemException { 308 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 309 } 310 311 /** 312 * Returns the polls questions before and after the current polls question in the ordered set where uuid = ?. 313 * 314 * @param questionId the primary key of the current polls question 315 * @param uuid the uuid 316 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 317 * @return the previous, current, and next polls question 318 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found 319 * @throws SystemException if a system exception occurred 320 */ 321 public static com.liferay.portlet.polls.model.PollsQuestion[] findByUuid_PrevAndNext( 322 long questionId, java.lang.String uuid, 323 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 324 throws com.liferay.portal.kernel.exception.SystemException, 325 com.liferay.portlet.polls.NoSuchQuestionException { 326 return getPersistence() 327 .findByUuid_PrevAndNext(questionId, uuid, orderByComparator); 328 } 329 330 /** 331 * Returns the polls question where uuid = ? and groupId = ? or throws a {@link com.liferay.portlet.polls.NoSuchQuestionException} if it could not be found. 332 * 333 * @param uuid the uuid 334 * @param groupId the group ID 335 * @return the matching polls question 336 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found 337 * @throws SystemException if a system exception occurred 338 */ 339 public static com.liferay.portlet.polls.model.PollsQuestion findByUUID_G( 340 java.lang.String uuid, long groupId) 341 throws com.liferay.portal.kernel.exception.SystemException, 342 com.liferay.portlet.polls.NoSuchQuestionException { 343 return getPersistence().findByUUID_G(uuid, groupId); 344 } 345 346 /** 347 * Returns the polls question where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 348 * 349 * @param uuid the uuid 350 * @param groupId the group ID 351 * @return the matching polls question, or <code>null</code> if a matching polls question could not be found 352 * @throws SystemException if a system exception occurred 353 */ 354 public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G( 355 java.lang.String uuid, long groupId) 356 throws com.liferay.portal.kernel.exception.SystemException { 357 return getPersistence().fetchByUUID_G(uuid, groupId); 358 } 359 360 /** 361 * Returns the polls question where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 362 * 363 * @param uuid the uuid 364 * @param groupId the group ID 365 * @param retrieveFromCache whether to use the finder cache 366 * @return the matching polls question, or <code>null</code> if a matching polls question could not be found 367 * @throws SystemException if a system exception occurred 368 */ 369 public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G( 370 java.lang.String uuid, long groupId, boolean retrieveFromCache) 371 throws com.liferay.portal.kernel.exception.SystemException { 372 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 373 } 374 375 /** 376 * Returns all the polls questions where groupId = ?. 377 * 378 * @param groupId the group ID 379 * @return the matching polls questions 380 * @throws SystemException if a system exception occurred 381 */ 382 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId( 383 long groupId) 384 throws com.liferay.portal.kernel.exception.SystemException { 385 return getPersistence().findByGroupId(groupId); 386 } 387 388 /** 389 * Returns a range of all the polls questions where groupId = ?. 390 * 391 * <p> 392 * 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. 393 * </p> 394 * 395 * @param groupId the group ID 396 * @param start the lower bound of the range of polls questions 397 * @param end the upper bound of the range of polls questions (not inclusive) 398 * @return the range of matching polls questions 399 * @throws SystemException if a system exception occurred 400 */ 401 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId( 402 long groupId, int start, int end) 403 throws com.liferay.portal.kernel.exception.SystemException { 404 return getPersistence().findByGroupId(groupId, start, end); 405 } 406 407 /** 408 * Returns an ordered range of all the polls questions where groupId = ?. 409 * 410 * <p> 411 * 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. 412 * </p> 413 * 414 * @param groupId the group ID 415 * @param start the lower bound of the range of polls questions 416 * @param end the upper bound of the range of polls questions (not inclusive) 417 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 418 * @return the ordered range of matching polls questions 419 * @throws SystemException if a system exception occurred 420 */ 421 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId( 422 long groupId, int start, int end, 423 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 424 throws com.liferay.portal.kernel.exception.SystemException { 425 return getPersistence() 426 .findByGroupId(groupId, start, end, orderByComparator); 427 } 428 429 /** 430 * Returns the first polls question in the ordered set where groupId = ?. 431 * 432 * @param groupId the group ID 433 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 434 * @return the first matching polls question 435 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found 436 * @throws SystemException if a system exception occurred 437 */ 438 public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_First( 439 long groupId, 440 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 441 throws com.liferay.portal.kernel.exception.SystemException, 442 com.liferay.portlet.polls.NoSuchQuestionException { 443 return getPersistence().findByGroupId_First(groupId, orderByComparator); 444 } 445 446 /** 447 * Returns the first polls question in the ordered set where groupId = ?. 448 * 449 * @param groupId the group ID 450 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 451 * @return the first matching polls question, or <code>null</code> if a matching polls question could not be found 452 * @throws SystemException if a system exception occurred 453 */ 454 public static com.liferay.portlet.polls.model.PollsQuestion fetchByGroupId_First( 455 long groupId, 456 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 457 throws com.liferay.portal.kernel.exception.SystemException { 458 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 459 } 460 461 /** 462 * Returns the last polls question in the ordered set where groupId = ?. 463 * 464 * @param groupId the group ID 465 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 466 * @return the last matching polls question 467 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found 468 * @throws SystemException if a system exception occurred 469 */ 470 public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_Last( 471 long groupId, 472 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 473 throws com.liferay.portal.kernel.exception.SystemException, 474 com.liferay.portlet.polls.NoSuchQuestionException { 475 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 476 } 477 478 /** 479 * Returns the last polls question in the ordered set where groupId = ?. 480 * 481 * @param groupId the group ID 482 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 483 * @return the last matching polls question, or <code>null</code> if a matching polls question could not be found 484 * @throws SystemException if a system exception occurred 485 */ 486 public static com.liferay.portlet.polls.model.PollsQuestion fetchByGroupId_Last( 487 long groupId, 488 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 489 throws com.liferay.portal.kernel.exception.SystemException { 490 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 491 } 492 493 /** 494 * Returns the polls questions before and after the current polls question in the ordered set where groupId = ?. 495 * 496 * @param questionId the primary key of the current polls question 497 * @param groupId the group ID 498 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 499 * @return the previous, current, and next polls question 500 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found 501 * @throws SystemException if a system exception occurred 502 */ 503 public static com.liferay.portlet.polls.model.PollsQuestion[] findByGroupId_PrevAndNext( 504 long questionId, long groupId, 505 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 506 throws com.liferay.portal.kernel.exception.SystemException, 507 com.liferay.portlet.polls.NoSuchQuestionException { 508 return getPersistence() 509 .findByGroupId_PrevAndNext(questionId, groupId, 510 orderByComparator); 511 } 512 513 /** 514 * Returns all the polls questions that the user has permission to view where groupId = ?. 515 * 516 * @param groupId the group ID 517 * @return the matching polls questions that the user has permission to view 518 * @throws SystemException if a system exception occurred 519 */ 520 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId( 521 long groupId) 522 throws com.liferay.portal.kernel.exception.SystemException { 523 return getPersistence().filterFindByGroupId(groupId); 524 } 525 526 /** 527 * Returns a range of all the polls questions that the user has permission to view where groupId = ?. 528 * 529 * <p> 530 * 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. 531 * </p> 532 * 533 * @param groupId the group ID 534 * @param start the lower bound of the range of polls questions 535 * @param end the upper bound of the range of polls questions (not inclusive) 536 * @return the range of matching polls questions that the user has permission to view 537 * @throws SystemException if a system exception occurred 538 */ 539 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId( 540 long groupId, int start, int end) 541 throws com.liferay.portal.kernel.exception.SystemException { 542 return getPersistence().filterFindByGroupId(groupId, start, end); 543 } 544 545 /** 546 * Returns an ordered range of all the polls questions that the user has permissions to view where groupId = ?. 547 * 548 * <p> 549 * 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. 550 * </p> 551 * 552 * @param groupId the group ID 553 * @param start the lower bound of the range of polls questions 554 * @param end the upper bound of the range of polls questions (not inclusive) 555 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 556 * @return the ordered range of matching polls questions that the user has permission to view 557 * @throws SystemException if a system exception occurred 558 */ 559 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId( 560 long groupId, int start, int end, 561 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 562 throws com.liferay.portal.kernel.exception.SystemException { 563 return getPersistence() 564 .filterFindByGroupId(groupId, start, end, orderByComparator); 565 } 566 567 /** 568 * Returns the polls questions before and after the current polls question in the ordered set of polls questions that the user has permission to view where groupId = ?. 569 * 570 * @param questionId the primary key of the current polls question 571 * @param groupId the group ID 572 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 573 * @return the previous, current, and next polls question 574 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found 575 * @throws SystemException if a system exception occurred 576 */ 577 public static com.liferay.portlet.polls.model.PollsQuestion[] filterFindByGroupId_PrevAndNext( 578 long questionId, long groupId, 579 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 580 throws com.liferay.portal.kernel.exception.SystemException, 581 com.liferay.portlet.polls.NoSuchQuestionException { 582 return getPersistence() 583 .filterFindByGroupId_PrevAndNext(questionId, groupId, 584 orderByComparator); 585 } 586 587 /** 588 * Returns all the polls questions. 589 * 590 * @return the polls questions 591 * @throws SystemException if a system exception occurred 592 */ 593 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll() 594 throws com.liferay.portal.kernel.exception.SystemException { 595 return getPersistence().findAll(); 596 } 597 598 /** 599 * Returns a range of all the polls questions. 600 * 601 * <p> 602 * 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. 603 * </p> 604 * 605 * @param start the lower bound of the range of polls questions 606 * @param end the upper bound of the range of polls questions (not inclusive) 607 * @return the range of polls questions 608 * @throws SystemException if a system exception occurred 609 */ 610 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll( 611 int start, int end) 612 throws com.liferay.portal.kernel.exception.SystemException { 613 return getPersistence().findAll(start, end); 614 } 615 616 /** 617 * Returns an ordered range of all the polls questions. 618 * 619 * <p> 620 * 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. 621 * </p> 622 * 623 * @param start the lower bound of the range of polls questions 624 * @param end the upper bound of the range of polls questions (not inclusive) 625 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 626 * @return the ordered range of polls questions 627 * @throws SystemException if a system exception occurred 628 */ 629 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll( 630 int start, int end, 631 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 632 throws com.liferay.portal.kernel.exception.SystemException { 633 return getPersistence().findAll(start, end, orderByComparator); 634 } 635 636 /** 637 * Removes all the polls questions where uuid = ? from the database. 638 * 639 * @param uuid the uuid 640 * @throws SystemException if a system exception occurred 641 */ 642 public static void removeByUuid(java.lang.String uuid) 643 throws com.liferay.portal.kernel.exception.SystemException { 644 getPersistence().removeByUuid(uuid); 645 } 646 647 /** 648 * Removes the polls question where uuid = ? and groupId = ? from the database. 649 * 650 * @param uuid the uuid 651 * @param groupId the group ID 652 * @return the polls question that was removed 653 * @throws SystemException if a system exception occurred 654 */ 655 public static com.liferay.portlet.polls.model.PollsQuestion removeByUUID_G( 656 java.lang.String uuid, long groupId) 657 throws com.liferay.portal.kernel.exception.SystemException, 658 com.liferay.portlet.polls.NoSuchQuestionException { 659 return getPersistence().removeByUUID_G(uuid, groupId); 660 } 661 662 /** 663 * Removes all the polls questions where groupId = ? from the database. 664 * 665 * @param groupId the group ID 666 * @throws SystemException if a system exception occurred 667 */ 668 public static void removeByGroupId(long groupId) 669 throws com.liferay.portal.kernel.exception.SystemException { 670 getPersistence().removeByGroupId(groupId); 671 } 672 673 /** 674 * Removes all the polls questions from the database. 675 * 676 * @throws SystemException if a system exception occurred 677 */ 678 public static void removeAll() 679 throws com.liferay.portal.kernel.exception.SystemException { 680 getPersistence().removeAll(); 681 } 682 683 /** 684 * Returns the number of polls questions where uuid = ?. 685 * 686 * @param uuid the uuid 687 * @return the number of matching polls questions 688 * @throws SystemException if a system exception occurred 689 */ 690 public static int countByUuid(java.lang.String uuid) 691 throws com.liferay.portal.kernel.exception.SystemException { 692 return getPersistence().countByUuid(uuid); 693 } 694 695 /** 696 * Returns the number of polls questions where uuid = ? and groupId = ?. 697 * 698 * @param uuid the uuid 699 * @param groupId the group ID 700 * @return the number of matching polls questions 701 * @throws SystemException if a system exception occurred 702 */ 703 public static int countByUUID_G(java.lang.String uuid, long groupId) 704 throws com.liferay.portal.kernel.exception.SystemException { 705 return getPersistence().countByUUID_G(uuid, groupId); 706 } 707 708 /** 709 * Returns the number of polls questions where groupId = ?. 710 * 711 * @param groupId the group ID 712 * @return the number of matching polls questions 713 * @throws SystemException if a system exception occurred 714 */ 715 public static int countByGroupId(long groupId) 716 throws com.liferay.portal.kernel.exception.SystemException { 717 return getPersistence().countByGroupId(groupId); 718 } 719 720 /** 721 * Returns the number of polls questions that the user has permission to view where groupId = ?. 722 * 723 * @param groupId the group ID 724 * @return the number of matching polls questions that the user has permission to view 725 * @throws SystemException if a system exception occurred 726 */ 727 public static int filterCountByGroupId(long groupId) 728 throws com.liferay.portal.kernel.exception.SystemException { 729 return getPersistence().filterCountByGroupId(groupId); 730 } 731 732 /** 733 * Returns the number of polls questions. 734 * 735 * @return the number of polls questions 736 * @throws SystemException if a system exception occurred 737 */ 738 public static int countAll() 739 throws com.liferay.portal.kernel.exception.SystemException { 740 return getPersistence().countAll(); 741 } 742 743 public static PollsQuestionPersistence getPersistence() { 744 if (_persistence == null) { 745 _persistence = (PollsQuestionPersistence)PortalBeanLocatorUtil.locate(PollsQuestionPersistence.class.getName()); 746 747 ReferenceRegistry.registerReference(PollsQuestionUtil.class, 748 "_persistence"); 749 } 750 751 return _persistence; 752 } 753 754 /** 755 * @deprecated 756 */ 757 public void setPersistence(PollsQuestionPersistence persistence) { 758 } 759 760 private static PollsQuestionPersistence _persistence; 761 }