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