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