001 /** 002 * Copyright (c) 2000-2010 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.service.ServiceContext; 022 023 import com.liferay.portlet.polls.model.PollsQuestion; 024 025 import java.util.List; 026 027 /** 028 * 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. 029 * 030 * <p> 031 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 032 * </p> 033 * 034 * <p> 035 * Caching information and settings can be found in <code>portal.properties</code> 036 * </p> 037 * 038 * @author Brian Wing Shun Chan 039 * @see PollsQuestionPersistence 040 * @see PollsQuestionPersistenceImpl 041 * @generated 042 */ 043 public class PollsQuestionUtil { 044 /** 045 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 046 */ 047 public static void clearCache() { 048 getPersistence().clearCache(); 049 } 050 051 /** 052 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 053 */ 054 public static void clearCache(PollsQuestion pollsQuestion) { 055 getPersistence().clearCache(pollsQuestion); 056 } 057 058 /** 059 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 060 */ 061 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 062 throws SystemException { 063 return getPersistence().countWithDynamicQuery(dynamicQuery); 064 } 065 066 /** 067 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 068 */ 069 public static List<PollsQuestion> findWithDynamicQuery( 070 DynamicQuery dynamicQuery) throws SystemException { 071 return getPersistence().findWithDynamicQuery(dynamicQuery); 072 } 073 074 /** 075 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 076 */ 077 public static List<PollsQuestion> findWithDynamicQuery( 078 DynamicQuery dynamicQuery, int start, int end) 079 throws SystemException { 080 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 081 } 082 083 /** 084 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 085 */ 086 public static List<PollsQuestion> findWithDynamicQuery( 087 DynamicQuery dynamicQuery, int start, int end, 088 OrderByComparator orderByComparator) throws SystemException { 089 return getPersistence() 090 .findWithDynamicQuery(dynamicQuery, start, end, 091 orderByComparator); 092 } 093 094 /** 095 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 096 */ 097 public static PollsQuestion remove(PollsQuestion pollsQuestion) 098 throws SystemException { 099 return getPersistence().remove(pollsQuestion); 100 } 101 102 /** 103 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 104 */ 105 public static PollsQuestion update(PollsQuestion pollsQuestion, 106 boolean merge) throws SystemException { 107 return getPersistence().update(pollsQuestion, merge); 108 } 109 110 /** 111 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 112 */ 113 public static PollsQuestion update(PollsQuestion pollsQuestion, 114 boolean merge, ServiceContext serviceContext) throws SystemException { 115 return getPersistence().update(pollsQuestion, merge, serviceContext); 116 } 117 118 /** 119 * Caches the polls question in the entity cache if it is enabled. 120 * 121 * @param pollsQuestion the polls question to cache 122 */ 123 public static void cacheResult( 124 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion) { 125 getPersistence().cacheResult(pollsQuestion); 126 } 127 128 /** 129 * Caches the polls questions in the entity cache if it is enabled. 130 * 131 * @param pollsQuestions the polls questions to cache 132 */ 133 public static void cacheResult( 134 java.util.List<com.liferay.portlet.polls.model.PollsQuestion> pollsQuestions) { 135 getPersistence().cacheResult(pollsQuestions); 136 } 137 138 /** 139 * Creates a new polls question with the primary key. Does not add the polls question to the database. 140 * 141 * @param questionId the primary key for the new polls question 142 * @return the new polls question 143 */ 144 public static com.liferay.portlet.polls.model.PollsQuestion create( 145 long questionId) { 146 return getPersistence().create(questionId); 147 } 148 149 /** 150 * Removes the polls question with the primary key from the database. Also notifies the appropriate model listeners. 151 * 152 * @param questionId the primary key of the polls question to remove 153 * @return the polls question that was removed 154 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found 155 * @throws SystemException if a system exception occurred 156 */ 157 public static com.liferay.portlet.polls.model.PollsQuestion remove( 158 long questionId) 159 throws com.liferay.portal.kernel.exception.SystemException, 160 com.liferay.portlet.polls.NoSuchQuestionException { 161 return getPersistence().remove(questionId); 162 } 163 164 public static com.liferay.portlet.polls.model.PollsQuestion updateImpl( 165 com.liferay.portlet.polls.model.PollsQuestion pollsQuestion, 166 boolean merge) 167 throws com.liferay.portal.kernel.exception.SystemException { 168 return getPersistence().updateImpl(pollsQuestion, merge); 169 } 170 171 /** 172 * Finds the polls question with the primary key or throws a {@link com.liferay.portlet.polls.NoSuchQuestionException} if it could not be found. 173 * 174 * @param questionId the primary key of the polls question to find 175 * @return the polls question 176 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found 177 * @throws SystemException if a system exception occurred 178 */ 179 public static com.liferay.portlet.polls.model.PollsQuestion findByPrimaryKey( 180 long questionId) 181 throws com.liferay.portal.kernel.exception.SystemException, 182 com.liferay.portlet.polls.NoSuchQuestionException { 183 return getPersistence().findByPrimaryKey(questionId); 184 } 185 186 /** 187 * Finds the polls question with the primary key or returns <code>null</code> if it could not be found. 188 * 189 * @param questionId the primary key of the polls question to find 190 * @return the polls question, or <code>null</code> if a polls question with the primary key could not be found 191 * @throws SystemException if a system exception occurred 192 */ 193 public static com.liferay.portlet.polls.model.PollsQuestion fetchByPrimaryKey( 194 long questionId) 195 throws com.liferay.portal.kernel.exception.SystemException { 196 return getPersistence().fetchByPrimaryKey(questionId); 197 } 198 199 /** 200 * Finds all the polls questions where uuid = ?. 201 * 202 * @param uuid the uuid to search with 203 * @return the matching polls questions 204 * @throws SystemException if a system exception occurred 205 */ 206 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid( 207 java.lang.String uuid) 208 throws com.liferay.portal.kernel.exception.SystemException { 209 return getPersistence().findByUuid(uuid); 210 } 211 212 /** 213 * Finds a range of all the polls questions where uuid = ?. 214 * 215 * <p> 216 * 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. 217 * </p> 218 * 219 * @param uuid the uuid to search with 220 * @param start the lower bound of the range of polls questions to return 221 * @param end the upper bound of the range of polls questions to return (not inclusive) 222 * @return the range of matching polls questions 223 * @throws SystemException if a system exception occurred 224 */ 225 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid( 226 java.lang.String uuid, int start, int end) 227 throws com.liferay.portal.kernel.exception.SystemException { 228 return getPersistence().findByUuid(uuid, start, end); 229 } 230 231 /** 232 * Finds an ordered range of all the polls questions where uuid = ?. 233 * 234 * <p> 235 * 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. 236 * </p> 237 * 238 * @param uuid the uuid to search with 239 * @param start the lower bound of the range of polls questions to return 240 * @param end the upper bound of the range of polls questions to return (not inclusive) 241 * @param orderByComparator the comparator to order the results by 242 * @return the ordered range of matching polls questions 243 * @throws SystemException if a system exception occurred 244 */ 245 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid( 246 java.lang.String uuid, int start, int end, 247 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 248 throws com.liferay.portal.kernel.exception.SystemException { 249 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 250 } 251 252 /** 253 * Finds the first polls question in the ordered set where uuid = ?. 254 * 255 * <p> 256 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 257 * </p> 258 * 259 * @param uuid the uuid to search with 260 * @param orderByComparator the comparator to order the set by 261 * @return the first matching polls question 262 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found 263 * @throws SystemException if a system exception occurred 264 */ 265 public static com.liferay.portlet.polls.model.PollsQuestion findByUuid_First( 266 java.lang.String uuid, 267 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 268 throws com.liferay.portal.kernel.exception.SystemException, 269 com.liferay.portlet.polls.NoSuchQuestionException { 270 return getPersistence().findByUuid_First(uuid, orderByComparator); 271 } 272 273 /** 274 * Finds the last polls question in the ordered set where uuid = ?. 275 * 276 * <p> 277 * 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. 278 * </p> 279 * 280 * @param uuid the uuid to search with 281 * @param orderByComparator the comparator to order the set by 282 * @return the last matching polls question 283 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portlet.polls.model.PollsQuestion findByUuid_Last( 287 java.lang.String uuid, 288 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 289 throws com.liferay.portal.kernel.exception.SystemException, 290 com.liferay.portlet.polls.NoSuchQuestionException { 291 return getPersistence().findByUuid_Last(uuid, orderByComparator); 292 } 293 294 /** 295 * Finds the polls questions before and after the current polls question in the ordered set where uuid = ?. 296 * 297 * <p> 298 * 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. 299 * </p> 300 * 301 * @param questionId the primary key of the current polls question 302 * @param uuid the uuid to search with 303 * @param orderByComparator the comparator to order the set by 304 * @return the previous, current, and next polls question 305 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found 306 * @throws SystemException if a system exception occurred 307 */ 308 public static com.liferay.portlet.polls.model.PollsQuestion[] findByUuid_PrevAndNext( 309 long questionId, java.lang.String uuid, 310 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 311 throws com.liferay.portal.kernel.exception.SystemException, 312 com.liferay.portlet.polls.NoSuchQuestionException { 313 return getPersistence() 314 .findByUuid_PrevAndNext(questionId, uuid, orderByComparator); 315 } 316 317 /** 318 * Finds the polls question where uuid = ? and groupId = ? or throws a {@link com.liferay.portlet.polls.NoSuchQuestionException} if it could not be found. 319 * 320 * @param uuid the uuid to search with 321 * @param groupId the group id to search with 322 * @return the matching polls question 323 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found 324 * @throws SystemException if a system exception occurred 325 */ 326 public static com.liferay.portlet.polls.model.PollsQuestion findByUUID_G( 327 java.lang.String uuid, long groupId) 328 throws com.liferay.portal.kernel.exception.SystemException, 329 com.liferay.portlet.polls.NoSuchQuestionException { 330 return getPersistence().findByUUID_G(uuid, groupId); 331 } 332 333 /** 334 * Finds the polls question where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 335 * 336 * @param uuid the uuid to search with 337 * @param groupId the group id to search with 338 * @return the matching polls question, or <code>null</code> if a matching polls question could not be found 339 * @throws SystemException if a system exception occurred 340 */ 341 public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G( 342 java.lang.String uuid, long groupId) 343 throws com.liferay.portal.kernel.exception.SystemException { 344 return getPersistence().fetchByUUID_G(uuid, groupId); 345 } 346 347 /** 348 * Finds the polls question where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 349 * 350 * @param uuid the uuid to search with 351 * @param groupId the group id to search with 352 * @return the matching polls question, or <code>null</code> if a matching polls question could not be found 353 * @throws SystemException if a system exception occurred 354 */ 355 public static com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G( 356 java.lang.String uuid, long groupId, boolean retrieveFromCache) 357 throws com.liferay.portal.kernel.exception.SystemException { 358 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 359 } 360 361 /** 362 * Finds all the polls questions where groupId = ?. 363 * 364 * @param groupId the group id to search with 365 * @return the matching polls questions 366 * @throws SystemException if a system exception occurred 367 */ 368 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId( 369 long groupId) 370 throws com.liferay.portal.kernel.exception.SystemException { 371 return getPersistence().findByGroupId(groupId); 372 } 373 374 /** 375 * Finds a range of all the polls questions where groupId = ?. 376 * 377 * <p> 378 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 379 * </p> 380 * 381 * @param groupId the group id to search with 382 * @param start the lower bound of the range of polls questions to return 383 * @param end the upper bound of the range of polls questions to return (not inclusive) 384 * @return the range of matching polls questions 385 * @throws SystemException if a system exception occurred 386 */ 387 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId( 388 long groupId, int start, int end) 389 throws com.liferay.portal.kernel.exception.SystemException { 390 return getPersistence().findByGroupId(groupId, start, end); 391 } 392 393 /** 394 * Finds an ordered range of all the polls questions where groupId = ?. 395 * 396 * <p> 397 * 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. 398 * </p> 399 * 400 * @param groupId the group id to search with 401 * @param start the lower bound of the range of polls questions to return 402 * @param end the upper bound of the range of polls questions to return (not inclusive) 403 * @param orderByComparator the comparator to order the results by 404 * @return the ordered range of matching polls questions 405 * @throws SystemException if a system exception occurred 406 */ 407 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId( 408 long groupId, int start, int end, 409 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 410 throws com.liferay.portal.kernel.exception.SystemException { 411 return getPersistence() 412 .findByGroupId(groupId, start, end, orderByComparator); 413 } 414 415 /** 416 * Finds the first polls question in the ordered set where groupId = ?. 417 * 418 * <p> 419 * 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. 420 * </p> 421 * 422 * @param groupId the group id to search with 423 * @param orderByComparator the comparator to order the set by 424 * @return the first matching polls question 425 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found 426 * @throws SystemException if a system exception occurred 427 */ 428 public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_First( 429 long groupId, 430 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 431 throws com.liferay.portal.kernel.exception.SystemException, 432 com.liferay.portlet.polls.NoSuchQuestionException { 433 return getPersistence().findByGroupId_First(groupId, orderByComparator); 434 } 435 436 /** 437 * Finds the last polls question in the ordered set where groupId = ?. 438 * 439 * <p> 440 * 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. 441 * </p> 442 * 443 * @param groupId the group id to search with 444 * @param orderByComparator the comparator to order the set by 445 * @return the last matching polls question 446 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a matching polls question could not be found 447 * @throws SystemException if a system exception occurred 448 */ 449 public static com.liferay.portlet.polls.model.PollsQuestion findByGroupId_Last( 450 long groupId, 451 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 452 throws com.liferay.portal.kernel.exception.SystemException, 453 com.liferay.portlet.polls.NoSuchQuestionException { 454 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 455 } 456 457 /** 458 * Finds the polls questions before and after the current polls question in the ordered set where groupId = ?. 459 * 460 * <p> 461 * 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. 462 * </p> 463 * 464 * @param questionId the primary key of the current polls question 465 * @param groupId the group id to search with 466 * @param orderByComparator the comparator to order the set by 467 * @return the previous, current, and next polls question 468 * @throws com.liferay.portlet.polls.NoSuchQuestionException if a polls question with the primary key could not be found 469 * @throws SystemException if a system exception occurred 470 */ 471 public static com.liferay.portlet.polls.model.PollsQuestion[] findByGroupId_PrevAndNext( 472 long questionId, long groupId, 473 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 474 throws com.liferay.portal.kernel.exception.SystemException, 475 com.liferay.portlet.polls.NoSuchQuestionException { 476 return getPersistence() 477 .findByGroupId_PrevAndNext(questionId, groupId, 478 orderByComparator); 479 } 480 481 /** 482 * Filters by the user's permissions and finds all the polls questions where groupId = ?. 483 * 484 * @param groupId the group id to search with 485 * @return the matching polls questions that the user has permission to view 486 * @throws SystemException if a system exception occurred 487 */ 488 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId( 489 long groupId) 490 throws com.liferay.portal.kernel.exception.SystemException { 491 return getPersistence().filterFindByGroupId(groupId); 492 } 493 494 /** 495 * Filters by the user's permissions and finds a range of all the polls questions where groupId = ?. 496 * 497 * <p> 498 * 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. 499 * </p> 500 * 501 * @param groupId the group id to search with 502 * @param start the lower bound of the range of polls questions to return 503 * @param end the upper bound of the range of polls questions to return (not inclusive) 504 * @return the range of matching polls questions that the user has permission to view 505 * @throws SystemException if a system exception occurred 506 */ 507 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId( 508 long groupId, int start, int end) 509 throws com.liferay.portal.kernel.exception.SystemException { 510 return getPersistence().filterFindByGroupId(groupId, start, end); 511 } 512 513 /** 514 * Filters by the user's permissions and finds an ordered range of all the polls questions where groupId = ?. 515 * 516 * <p> 517 * 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. 518 * </p> 519 * 520 * @param groupId the group id to search with 521 * @param start the lower bound of the range of polls questions to return 522 * @param end the upper bound of the range of polls questions to return (not inclusive) 523 * @param orderByComparator the comparator to order the results by 524 * @return the ordered range of matching polls questions that the user has permission to view 525 * @throws SystemException if a system exception occurred 526 */ 527 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> filterFindByGroupId( 528 long groupId, int start, int end, 529 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 530 throws com.liferay.portal.kernel.exception.SystemException { 531 return getPersistence() 532 .filterFindByGroupId(groupId, start, end, orderByComparator); 533 } 534 535 /** 536 * Finds all the polls questions. 537 * 538 * @return the polls questions 539 * @throws SystemException if a system exception occurred 540 */ 541 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll() 542 throws com.liferay.portal.kernel.exception.SystemException { 543 return getPersistence().findAll(); 544 } 545 546 /** 547 * Finds a range of all the polls questions. 548 * 549 * <p> 550 * 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. 551 * </p> 552 * 553 * @param start the lower bound of the range of polls questions to return 554 * @param end the upper bound of the range of polls questions to return (not inclusive) 555 * @return the range of polls questions 556 * @throws SystemException if a system exception occurred 557 */ 558 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll( 559 int start, int end) 560 throws com.liferay.portal.kernel.exception.SystemException { 561 return getPersistence().findAll(start, end); 562 } 563 564 /** 565 * Finds an ordered range of all the polls questions. 566 * 567 * <p> 568 * 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. 569 * </p> 570 * 571 * @param start the lower bound of the range of polls questions to return 572 * @param end the upper bound of the range of polls questions to return (not inclusive) 573 * @param orderByComparator the comparator to order the results by 574 * @return the ordered range of polls questions 575 * @throws SystemException if a system exception occurred 576 */ 577 public static java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll( 578 int start, int end, 579 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 580 throws com.liferay.portal.kernel.exception.SystemException { 581 return getPersistence().findAll(start, end, orderByComparator); 582 } 583 584 /** 585 * Removes all the polls questions where uuid = ? from the database. 586 * 587 * @param uuid the uuid to search with 588 * @throws SystemException if a system exception occurred 589 */ 590 public static void removeByUuid(java.lang.String uuid) 591 throws com.liferay.portal.kernel.exception.SystemException { 592 getPersistence().removeByUuid(uuid); 593 } 594 595 /** 596 * Removes the polls question where uuid = ? and groupId = ? from the database. 597 * 598 * @param uuid the uuid to search with 599 * @param groupId the group id to search with 600 * @throws SystemException if a system exception occurred 601 */ 602 public static void removeByUUID_G(java.lang.String uuid, long groupId) 603 throws com.liferay.portal.kernel.exception.SystemException, 604 com.liferay.portlet.polls.NoSuchQuestionException { 605 getPersistence().removeByUUID_G(uuid, groupId); 606 } 607 608 /** 609 * Removes all the polls questions where groupId = ? from the database. 610 * 611 * @param groupId the group id to search with 612 * @throws SystemException if a system exception occurred 613 */ 614 public static void removeByGroupId(long groupId) 615 throws com.liferay.portal.kernel.exception.SystemException { 616 getPersistence().removeByGroupId(groupId); 617 } 618 619 /** 620 * Removes all the polls questions from the database. 621 * 622 * @throws SystemException if a system exception occurred 623 */ 624 public static void removeAll() 625 throws com.liferay.portal.kernel.exception.SystemException { 626 getPersistence().removeAll(); 627 } 628 629 /** 630 * Counts all the polls questions where uuid = ?. 631 * 632 * @param uuid the uuid to search with 633 * @return the number of matching polls questions 634 * @throws SystemException if a system exception occurred 635 */ 636 public static int countByUuid(java.lang.String uuid) 637 throws com.liferay.portal.kernel.exception.SystemException { 638 return getPersistence().countByUuid(uuid); 639 } 640 641 /** 642 * Counts all the polls questions where uuid = ? and groupId = ?. 643 * 644 * @param uuid the uuid to search with 645 * @param groupId the group id to search with 646 * @return the number of matching polls questions 647 * @throws SystemException if a system exception occurred 648 */ 649 public static int countByUUID_G(java.lang.String uuid, long groupId) 650 throws com.liferay.portal.kernel.exception.SystemException { 651 return getPersistence().countByUUID_G(uuid, groupId); 652 } 653 654 /** 655 * Counts all the polls questions where groupId = ?. 656 * 657 * @param groupId the group id to search with 658 * @return the number of matching polls questions 659 * @throws SystemException if a system exception occurred 660 */ 661 public static int countByGroupId(long groupId) 662 throws com.liferay.portal.kernel.exception.SystemException { 663 return getPersistence().countByGroupId(groupId); 664 } 665 666 /** 667 * Filters by the user's permissions and counts all the polls questions where groupId = ?. 668 * 669 * @param groupId the group id to search with 670 * @return the number of matching polls questions that the user has permission to view 671 * @throws SystemException if a system exception occurred 672 */ 673 public static int filterCountByGroupId(long groupId) 674 throws com.liferay.portal.kernel.exception.SystemException { 675 return getPersistence().filterCountByGroupId(groupId); 676 } 677 678 /** 679 * Counts all the polls questions. 680 * 681 * @return the number of polls questions 682 * @throws SystemException if a system exception occurred 683 */ 684 public static int countAll() 685 throws com.liferay.portal.kernel.exception.SystemException { 686 return getPersistence().countAll(); 687 } 688 689 public static PollsQuestionPersistence getPersistence() { 690 if (_persistence == null) { 691 _persistence = (PollsQuestionPersistence)PortalBeanLocatorUtil.locate(PollsQuestionPersistence.class.getName()); 692 } 693 694 return _persistence; 695 } 696 697 public void setPersistence(PollsQuestionPersistence persistence) { 698 _persistence = persistence; 699 } 700 701 private static PollsQuestionPersistence _persistence; 702 }