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.exception.SystemException; 018 import com.liferay.portal.service.persistence.BasePersistence; 019 020 import com.liferay.portlet.polls.model.PollsChoice; 021 022 /** 023 * The persistence interface for the polls choice service. 024 * 025 * <p> 026 * Caching information and settings can be found in <code>portal.properties</code> 027 * </p> 028 * 029 * @author Brian Wing Shun Chan 030 * @see PollsChoicePersistenceImpl 031 * @see PollsChoiceUtil 032 * @generated 033 */ 034 public interface PollsChoicePersistence extends BasePersistence<PollsChoice> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link PollsChoiceUtil} to access the polls choice persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Caches the polls choice in the entity cache if it is enabled. 043 * 044 * @param pollsChoice the polls choice to cache 045 */ 046 public void cacheResult( 047 com.liferay.portlet.polls.model.PollsChoice pollsChoice); 048 049 /** 050 * Caches the polls choices in the entity cache if it is enabled. 051 * 052 * @param pollsChoices the polls choices to cache 053 */ 054 public void cacheResult( 055 java.util.List<com.liferay.portlet.polls.model.PollsChoice> pollsChoices); 056 057 /** 058 * Creates a new polls choice with the primary key. Does not add the polls choice to the database. 059 * 060 * @param choiceId the primary key for the new polls choice 061 * @return the new polls choice 062 */ 063 public com.liferay.portlet.polls.model.PollsChoice create(long choiceId); 064 065 /** 066 * Removes the polls choice with the primary key from the database. Also notifies the appropriate model listeners. 067 * 068 * @param choiceId the primary key of the polls choice to remove 069 * @return the polls choice that was removed 070 * @throws com.liferay.portlet.polls.NoSuchChoiceException if a polls choice with the primary key could not be found 071 * @throws SystemException if a system exception occurred 072 */ 073 public com.liferay.portlet.polls.model.PollsChoice remove(long choiceId) 074 throws com.liferay.portal.kernel.exception.SystemException, 075 com.liferay.portlet.polls.NoSuchChoiceException; 076 077 public com.liferay.portlet.polls.model.PollsChoice updateImpl( 078 com.liferay.portlet.polls.model.PollsChoice pollsChoice, boolean merge) 079 throws com.liferay.portal.kernel.exception.SystemException; 080 081 /** 082 * Finds the polls choice with the primary key or throws a {@link com.liferay.portlet.polls.NoSuchChoiceException} if it could not be found. 083 * 084 * @param choiceId the primary key of the polls choice to find 085 * @return the polls choice 086 * @throws com.liferay.portlet.polls.NoSuchChoiceException if a polls choice with the primary key could not be found 087 * @throws SystemException if a system exception occurred 088 */ 089 public com.liferay.portlet.polls.model.PollsChoice findByPrimaryKey( 090 long choiceId) 091 throws com.liferay.portal.kernel.exception.SystemException, 092 com.liferay.portlet.polls.NoSuchChoiceException; 093 094 /** 095 * Finds the polls choice with the primary key or returns <code>null</code> if it could not be found. 096 * 097 * @param choiceId the primary key of the polls choice to find 098 * @return the polls choice, or <code>null</code> if a polls choice with the primary key could not be found 099 * @throws SystemException if a system exception occurred 100 */ 101 public com.liferay.portlet.polls.model.PollsChoice fetchByPrimaryKey( 102 long choiceId) 103 throws com.liferay.portal.kernel.exception.SystemException; 104 105 /** 106 * Finds all the polls choices where uuid = ?. 107 * 108 * @param uuid the uuid to search with 109 * @return the matching polls choices 110 * @throws SystemException if a system exception occurred 111 */ 112 public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid( 113 java.lang.String uuid) 114 throws com.liferay.portal.kernel.exception.SystemException; 115 116 /** 117 * Finds a range of all the polls choices where uuid = ?. 118 * 119 * <p> 120 * 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. 121 * </p> 122 * 123 * @param uuid the uuid to search with 124 * @param start the lower bound of the range of polls choices to return 125 * @param end the upper bound of the range of polls choices to return (not inclusive) 126 * @return the range of matching polls choices 127 * @throws SystemException if a system exception occurred 128 */ 129 public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid( 130 java.lang.String uuid, int start, int end) 131 throws com.liferay.portal.kernel.exception.SystemException; 132 133 /** 134 * Finds an ordered range of all the polls choices where uuid = ?. 135 * 136 * <p> 137 * 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. 138 * </p> 139 * 140 * @param uuid the uuid to search with 141 * @param start the lower bound of the range of polls choices to return 142 * @param end the upper bound of the range of polls choices to return (not inclusive) 143 * @param orderByComparator the comparator to order the results by 144 * @return the ordered range of matching polls choices 145 * @throws SystemException if a system exception occurred 146 */ 147 public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid( 148 java.lang.String uuid, int start, int end, 149 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 150 throws com.liferay.portal.kernel.exception.SystemException; 151 152 /** 153 * Finds the first polls choice in the ordered set where uuid = ?. 154 * 155 * <p> 156 * 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. 157 * </p> 158 * 159 * @param uuid the uuid to search with 160 * @param orderByComparator the comparator to order the set by 161 * @return the first matching polls choice 162 * @throws com.liferay.portlet.polls.NoSuchChoiceException if a matching polls choice could not be found 163 * @throws SystemException if a system exception occurred 164 */ 165 public com.liferay.portlet.polls.model.PollsChoice findByUuid_First( 166 java.lang.String uuid, 167 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 168 throws com.liferay.portal.kernel.exception.SystemException, 169 com.liferay.portlet.polls.NoSuchChoiceException; 170 171 /** 172 * Finds the last polls choice in the ordered set where uuid = ?. 173 * 174 * <p> 175 * 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. 176 * </p> 177 * 178 * @param uuid the uuid to search with 179 * @param orderByComparator the comparator to order the set by 180 * @return the last matching polls choice 181 * @throws com.liferay.portlet.polls.NoSuchChoiceException if a matching polls choice could not be found 182 * @throws SystemException if a system exception occurred 183 */ 184 public com.liferay.portlet.polls.model.PollsChoice findByUuid_Last( 185 java.lang.String uuid, 186 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 187 throws com.liferay.portal.kernel.exception.SystemException, 188 com.liferay.portlet.polls.NoSuchChoiceException; 189 190 /** 191 * Finds the polls choices before and after the current polls choice in the ordered set where uuid = ?. 192 * 193 * <p> 194 * 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. 195 * </p> 196 * 197 * @param choiceId the primary key of the current polls choice 198 * @param uuid the uuid to search with 199 * @param orderByComparator the comparator to order the set by 200 * @return the previous, current, and next polls choice 201 * @throws com.liferay.portlet.polls.NoSuchChoiceException if a polls choice with the primary key could not be found 202 * @throws SystemException if a system exception occurred 203 */ 204 public com.liferay.portlet.polls.model.PollsChoice[] findByUuid_PrevAndNext( 205 long choiceId, java.lang.String uuid, 206 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 207 throws com.liferay.portal.kernel.exception.SystemException, 208 com.liferay.portlet.polls.NoSuchChoiceException; 209 210 /** 211 * Finds all the polls choices where questionId = ?. 212 * 213 * @param questionId the question ID to search with 214 * @return the matching polls choices 215 * @throws SystemException if a system exception occurred 216 */ 217 public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId( 218 long questionId) 219 throws com.liferay.portal.kernel.exception.SystemException; 220 221 /** 222 * Finds a range of all the polls choices where questionId = ?. 223 * 224 * <p> 225 * 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. 226 * </p> 227 * 228 * @param questionId the question ID to search with 229 * @param start the lower bound of the range of polls choices to return 230 * @param end the upper bound of the range of polls choices to return (not inclusive) 231 * @return the range of matching polls choices 232 * @throws SystemException if a system exception occurred 233 */ 234 public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId( 235 long questionId, int start, int end) 236 throws com.liferay.portal.kernel.exception.SystemException; 237 238 /** 239 * Finds an ordered range of all the polls choices where questionId = ?. 240 * 241 * <p> 242 * 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. 243 * </p> 244 * 245 * @param questionId the question ID to search with 246 * @param start the lower bound of the range of polls choices to return 247 * @param end the upper bound of the range of polls choices to return (not inclusive) 248 * @param orderByComparator the comparator to order the results by 249 * @return the ordered range of matching polls choices 250 * @throws SystemException if a system exception occurred 251 */ 252 public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId( 253 long questionId, int start, int end, 254 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 255 throws com.liferay.portal.kernel.exception.SystemException; 256 257 /** 258 * Finds the first polls choice in the ordered set where questionId = ?. 259 * 260 * <p> 261 * 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. 262 * </p> 263 * 264 * @param questionId the question ID to search with 265 * @param orderByComparator the comparator to order the set by 266 * @return the first matching polls choice 267 * @throws com.liferay.portlet.polls.NoSuchChoiceException if a matching polls choice could not be found 268 * @throws SystemException if a system exception occurred 269 */ 270 public com.liferay.portlet.polls.model.PollsChoice findByQuestionId_First( 271 long questionId, 272 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 273 throws com.liferay.portal.kernel.exception.SystemException, 274 com.liferay.portlet.polls.NoSuchChoiceException; 275 276 /** 277 * Finds the last polls choice in the ordered set where questionId = ?. 278 * 279 * <p> 280 * 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. 281 * </p> 282 * 283 * @param questionId the question ID to search with 284 * @param orderByComparator the comparator to order the set by 285 * @return the last matching polls choice 286 * @throws com.liferay.portlet.polls.NoSuchChoiceException if a matching polls choice could not be found 287 * @throws SystemException if a system exception occurred 288 */ 289 public com.liferay.portlet.polls.model.PollsChoice findByQuestionId_Last( 290 long questionId, 291 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 292 throws com.liferay.portal.kernel.exception.SystemException, 293 com.liferay.portlet.polls.NoSuchChoiceException; 294 295 /** 296 * Finds the polls choices before and after the current polls choice in the ordered set where questionId = ?. 297 * 298 * <p> 299 * 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. 300 * </p> 301 * 302 * @param choiceId the primary key of the current polls choice 303 * @param questionId the question ID to search with 304 * @param orderByComparator the comparator to order the set by 305 * @return the previous, current, and next polls choice 306 * @throws com.liferay.portlet.polls.NoSuchChoiceException if a polls choice with the primary key could not be found 307 * @throws SystemException if a system exception occurred 308 */ 309 public com.liferay.portlet.polls.model.PollsChoice[] findByQuestionId_PrevAndNext( 310 long choiceId, long questionId, 311 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 312 throws com.liferay.portal.kernel.exception.SystemException, 313 com.liferay.portlet.polls.NoSuchChoiceException; 314 315 /** 316 * Finds the polls choice where questionId = ? and name = ? or throws a {@link com.liferay.portlet.polls.NoSuchChoiceException} if it could not be found. 317 * 318 * @param questionId the question ID to search with 319 * @param name the name to search with 320 * @return the matching polls choice 321 * @throws com.liferay.portlet.polls.NoSuchChoiceException if a matching polls choice could not be found 322 * @throws SystemException if a system exception occurred 323 */ 324 public com.liferay.portlet.polls.model.PollsChoice findByQ_N( 325 long questionId, java.lang.String name) 326 throws com.liferay.portal.kernel.exception.SystemException, 327 com.liferay.portlet.polls.NoSuchChoiceException; 328 329 /** 330 * Finds the polls choice where questionId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 331 * 332 * @param questionId the question ID to search with 333 * @param name the name to search with 334 * @return the matching polls choice, or <code>null</code> if a matching polls choice could not be found 335 * @throws SystemException if a system exception occurred 336 */ 337 public com.liferay.portlet.polls.model.PollsChoice fetchByQ_N( 338 long questionId, java.lang.String name) 339 throws com.liferay.portal.kernel.exception.SystemException; 340 341 /** 342 * Finds the polls choice where questionId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 343 * 344 * @param questionId the question ID to search with 345 * @param name the name to search with 346 * @return the matching polls choice, or <code>null</code> if a matching polls choice could not be found 347 * @throws SystemException if a system exception occurred 348 */ 349 public com.liferay.portlet.polls.model.PollsChoice fetchByQ_N( 350 long questionId, java.lang.String name, boolean retrieveFromCache) 351 throws com.liferay.portal.kernel.exception.SystemException; 352 353 /** 354 * Finds all the polls choices. 355 * 356 * @return the polls choices 357 * @throws SystemException if a system exception occurred 358 */ 359 public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll() 360 throws com.liferay.portal.kernel.exception.SystemException; 361 362 /** 363 * Finds a range of all the polls choices. 364 * 365 * <p> 366 * 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. 367 * </p> 368 * 369 * @param start the lower bound of the range of polls choices to return 370 * @param end the upper bound of the range of polls choices to return (not inclusive) 371 * @return the range of polls choices 372 * @throws SystemException if a system exception occurred 373 */ 374 public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll( 375 int start, int end) 376 throws com.liferay.portal.kernel.exception.SystemException; 377 378 /** 379 * Finds an ordered range of all the polls choices. 380 * 381 * <p> 382 * 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. 383 * </p> 384 * 385 * @param start the lower bound of the range of polls choices to return 386 * @param end the upper bound of the range of polls choices to return (not inclusive) 387 * @param orderByComparator the comparator to order the results by 388 * @return the ordered range of polls choices 389 * @throws SystemException if a system exception occurred 390 */ 391 public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll( 392 int start, int end, 393 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 394 throws com.liferay.portal.kernel.exception.SystemException; 395 396 /** 397 * Removes all the polls choices where uuid = ? from the database. 398 * 399 * @param uuid the uuid to search with 400 * @throws SystemException if a system exception occurred 401 */ 402 public void removeByUuid(java.lang.String uuid) 403 throws com.liferay.portal.kernel.exception.SystemException; 404 405 /** 406 * Removes all the polls choices where questionId = ? from the database. 407 * 408 * @param questionId the question ID to search with 409 * @throws SystemException if a system exception occurred 410 */ 411 public void removeByQuestionId(long questionId) 412 throws com.liferay.portal.kernel.exception.SystemException; 413 414 /** 415 * Removes the polls choice where questionId = ? and name = ? from the database. 416 * 417 * @param questionId the question ID to search with 418 * @param name the name to search with 419 * @throws SystemException if a system exception occurred 420 */ 421 public void removeByQ_N(long questionId, java.lang.String name) 422 throws com.liferay.portal.kernel.exception.SystemException, 423 com.liferay.portlet.polls.NoSuchChoiceException; 424 425 /** 426 * Removes all the polls choices from the database. 427 * 428 * @throws SystemException if a system exception occurred 429 */ 430 public void removeAll() 431 throws com.liferay.portal.kernel.exception.SystemException; 432 433 /** 434 * Counts all the polls choices where uuid = ?. 435 * 436 * @param uuid the uuid to search with 437 * @return the number of matching polls choices 438 * @throws SystemException if a system exception occurred 439 */ 440 public int countByUuid(java.lang.String uuid) 441 throws com.liferay.portal.kernel.exception.SystemException; 442 443 /** 444 * Counts all the polls choices where questionId = ?. 445 * 446 * @param questionId the question ID to search with 447 * @return the number of matching polls choices 448 * @throws SystemException if a system exception occurred 449 */ 450 public int countByQuestionId(long questionId) 451 throws com.liferay.portal.kernel.exception.SystemException; 452 453 /** 454 * Counts all the polls choices where questionId = ? and name = ?. 455 * 456 * @param questionId the question ID to search with 457 * @param name the name to search with 458 * @return the number of matching polls choices 459 * @throws SystemException if a system exception occurred 460 */ 461 public int countByQ_N(long questionId, java.lang.String name) 462 throws com.liferay.portal.kernel.exception.SystemException; 463 464 /** 465 * Counts all the polls choices. 466 * 467 * @return the number of polls choices 468 * @throws SystemException if a system exception occurred 469 */ 470 public int countAll() 471 throws com.liferay.portal.kernel.exception.SystemException; 472 473 public PollsChoice remove(PollsChoice pollsChoice) 474 throws SystemException; 475 }