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.documentlibrary.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.documentlibrary.model.DLFileVersion; 021 022 /** 023 * The persistence interface for the document library file 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 DLFileVersionPersistenceImpl 031 * @see DLFileVersionUtil 032 * @generated 033 */ 034 public interface DLFileVersionPersistence extends BasePersistence<DLFileVersion> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link DLFileVersionUtil} to access the document library file version persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Caches the document library file version in the entity cache if it is enabled. 043 * 044 * @param dlFileVersion the document library file version 045 */ 046 public void cacheResult( 047 com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion); 048 049 /** 050 * Caches the document library file versions in the entity cache if it is enabled. 051 * 052 * @param dlFileVersions the document library file versions 053 */ 054 public void cacheResult( 055 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> dlFileVersions); 056 057 /** 058 * Creates a new document library file version with the primary key. Does not add the document library file version to the database. 059 * 060 * @param fileVersionId the primary key for the new document library file version 061 * @return the new document library file version 062 */ 063 public com.liferay.portlet.documentlibrary.model.DLFileVersion create( 064 long fileVersionId); 065 066 /** 067 * Removes the document library file version with the primary key from the database. Also notifies the appropriate model listeners. 068 * 069 * @param fileVersionId the primary key of the document library file version 070 * @return the document library file version that was removed 071 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found 072 * @throws SystemException if a system exception occurred 073 */ 074 public com.liferay.portlet.documentlibrary.model.DLFileVersion remove( 075 long fileVersionId) 076 throws com.liferay.portal.kernel.exception.SystemException, 077 com.liferay.portlet.documentlibrary.NoSuchFileVersionException; 078 079 public com.liferay.portlet.documentlibrary.model.DLFileVersion updateImpl( 080 com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion, 081 boolean merge) 082 throws com.liferay.portal.kernel.exception.SystemException; 083 084 /** 085 * Returns the document library file version with the primary key or throws a {@link com.liferay.portlet.documentlibrary.NoSuchFileVersionException} if it could not be found. 086 * 087 * @param fileVersionId the primary key of the document library file version 088 * @return the document library file version 089 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found 090 * @throws SystemException if a system exception occurred 091 */ 092 public com.liferay.portlet.documentlibrary.model.DLFileVersion findByPrimaryKey( 093 long fileVersionId) 094 throws com.liferay.portal.kernel.exception.SystemException, 095 com.liferay.portlet.documentlibrary.NoSuchFileVersionException; 096 097 /** 098 * Returns the document library file version with the primary key or returns <code>null</code> if it could not be found. 099 * 100 * @param fileVersionId the primary key of the document library file version 101 * @return the document library file version, or <code>null</code> if a document library file version with the primary key could not be found 102 * @throws SystemException if a system exception occurred 103 */ 104 public com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByPrimaryKey( 105 long fileVersionId) 106 throws com.liferay.portal.kernel.exception.SystemException; 107 108 /** 109 * Returns all the document library file versions where fileEntryId = ?. 110 * 111 * @param fileEntryId the file entry ID 112 * @return the matching document library file versions 113 * @throws SystemException if a system exception occurred 114 */ 115 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId( 116 long fileEntryId) 117 throws com.liferay.portal.kernel.exception.SystemException; 118 119 /** 120 * Returns a range of all the document library file versions where fileEntryId = ?. 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 fileEntryId the file entry ID 127 * @param start the lower bound of the range of document library file versions 128 * @param end the upper bound of the range of document library file versions (not inclusive) 129 * @return the range of matching document library file versions 130 * @throws SystemException if a system exception occurred 131 */ 132 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId( 133 long fileEntryId, int start, int end) 134 throws com.liferay.portal.kernel.exception.SystemException; 135 136 /** 137 * Returns an ordered range of all the document library file versions where fileEntryId = ?. 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 fileEntryId the file entry ID 144 * @param start the lower bound of the range of document library file versions 145 * @param end the upper bound of the range of document library file versions (not inclusive) 146 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 147 * @return the ordered range of matching document library file versions 148 * @throws SystemException if a system exception occurred 149 */ 150 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId( 151 long fileEntryId, 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 document library file version in the ordered set where fileEntryId = ?. 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 fileEntryId the file entry ID 163 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 164 * @return the first matching document library file version 165 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 166 * @throws SystemException if a system exception occurred 167 */ 168 public com.liferay.portlet.documentlibrary.model.DLFileVersion findByFileEntryId_First( 169 long fileEntryId, 170 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 171 throws com.liferay.portal.kernel.exception.SystemException, 172 com.liferay.portlet.documentlibrary.NoSuchFileVersionException; 173 174 /** 175 * Returns the last document library file version in the ordered set where fileEntryId = ?. 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 fileEntryId the file entry ID 182 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 183 * @return the last matching document library file version 184 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public com.liferay.portlet.documentlibrary.model.DLFileVersion findByFileEntryId_Last( 188 long fileEntryId, 189 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 190 throws com.liferay.portal.kernel.exception.SystemException, 191 com.liferay.portlet.documentlibrary.NoSuchFileVersionException; 192 193 /** 194 * Returns the document library file versions before and after the current document library file version in the ordered set where fileEntryId = ?. 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 fileVersionId the primary key of the current document library file version 201 * @param fileEntryId the file entry ID 202 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 203 * @return the previous, current, and next document library file version 204 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found 205 * @throws SystemException if a system exception occurred 206 */ 207 public com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByFileEntryId_PrevAndNext( 208 long fileVersionId, long fileEntryId, 209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 210 throws com.liferay.portal.kernel.exception.SystemException, 211 com.liferay.portlet.documentlibrary.NoSuchFileVersionException; 212 213 /** 214 * Returns the document library file version where fileEntryId = ? and version = ? or throws a {@link com.liferay.portlet.documentlibrary.NoSuchFileVersionException} if it could not be found. 215 * 216 * @param fileEntryId the file entry ID 217 * @param version the version 218 * @return the matching document library file version 219 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 220 * @throws SystemException if a system exception occurred 221 */ 222 public com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_V( 223 long fileEntryId, java.lang.String version) 224 throws com.liferay.portal.kernel.exception.SystemException, 225 com.liferay.portlet.documentlibrary.NoSuchFileVersionException; 226 227 /** 228 * Returns the document library file version where fileEntryId = ? and version = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 229 * 230 * @param fileEntryId the file entry ID 231 * @param version the version 232 * @return the matching document library file version, or <code>null</code> if a matching document library file version could not be found 233 * @throws SystemException if a system exception occurred 234 */ 235 public com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByF_V( 236 long fileEntryId, java.lang.String version) 237 throws com.liferay.portal.kernel.exception.SystemException; 238 239 /** 240 * Returns the document library file version where fileEntryId = ? and version = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 241 * 242 * @param fileEntryId the file entry ID 243 * @param version the version 244 * @param retrieveFromCache whether to use the finder cache 245 * @return the matching document library file version, or <code>null</code> if a matching document library file version could not be found 246 * @throws SystemException if a system exception occurred 247 */ 248 public com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByF_V( 249 long fileEntryId, java.lang.String version, boolean retrieveFromCache) 250 throws com.liferay.portal.kernel.exception.SystemException; 251 252 /** 253 * Returns all the document library file versions where fileEntryId = ? and status = ?. 254 * 255 * @param fileEntryId the file entry ID 256 * @param status the status 257 * @return the matching document library file versions 258 * @throws SystemException if a system exception occurred 259 */ 260 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S( 261 long fileEntryId, int status) 262 throws com.liferay.portal.kernel.exception.SystemException; 263 264 /** 265 * Returns a range of all the document library file versions where fileEntryId = ? 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 fileEntryId the file entry ID 272 * @param status the status 273 * @param start the lower bound of the range of document library file versions 274 * @param end the upper bound of the range of document library file versions (not inclusive) 275 * @return the range of matching document library file versions 276 * @throws SystemException if a system exception occurred 277 */ 278 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S( 279 long fileEntryId, int status, int start, int end) 280 throws com.liferay.portal.kernel.exception.SystemException; 281 282 /** 283 * Returns an ordered range of all the document library file versions where fileEntryId = ? 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 fileEntryId the file entry ID 290 * @param status the status 291 * @param start the lower bound of the range of document library file versions 292 * @param end the upper bound of the range of document library file versions (not inclusive) 293 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 294 * @return the ordered range of matching document library file versions 295 * @throws SystemException if a system exception occurred 296 */ 297 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S( 298 long fileEntryId, 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 document library file version in the ordered set where fileEntryId = ? 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 fileEntryId the file entry 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 document library file version 313 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 314 * @throws SystemException if a system exception occurred 315 */ 316 public com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_S_First( 317 long fileEntryId, int status, 318 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 319 throws com.liferay.portal.kernel.exception.SystemException, 320 com.liferay.portlet.documentlibrary.NoSuchFileVersionException; 321 322 /** 323 * Returns the last document library file version in the ordered set where fileEntryId = ? 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 fileEntryId the file entry 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 document library file version 333 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 334 * @throws SystemException if a system exception occurred 335 */ 336 public com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_S_Last( 337 long fileEntryId, int status, 338 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 339 throws com.liferay.portal.kernel.exception.SystemException, 340 com.liferay.portlet.documentlibrary.NoSuchFileVersionException; 341 342 /** 343 * Returns the document library file versions before and after the current document library file version in the ordered set where fileEntryId = ? 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 fileVersionId the primary key of the current document library file version 350 * @param fileEntryId the file entry 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 document library file version 354 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found 355 * @throws SystemException if a system exception occurred 356 */ 357 public com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByF_S_PrevAndNext( 358 long fileVersionId, long fileEntryId, int status, 359 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 360 throws com.liferay.portal.kernel.exception.SystemException, 361 com.liferay.portlet.documentlibrary.NoSuchFileVersionException; 362 363 /** 364 * Returns all the document library file versions. 365 * 366 * @return the document library file versions 367 * @throws SystemException if a system exception occurred 368 */ 369 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll() 370 throws com.liferay.portal.kernel.exception.SystemException; 371 372 /** 373 * Returns a range of all the document library file 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 document library file versions 380 * @param end the upper bound of the range of document library file versions (not inclusive) 381 * @return the range of document library file versions 382 * @throws SystemException if a system exception occurred 383 */ 384 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll( 385 int start, int end) 386 throws com.liferay.portal.kernel.exception.SystemException; 387 388 /** 389 * Returns an ordered range of all the document library file 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 document library file versions 396 * @param end the upper bound of the range of document library file versions (not inclusive) 397 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 398 * @return the ordered range of document library file versions 399 * @throws SystemException if a system exception occurred 400 */ 401 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> 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 document library file versions where fileEntryId = ? from the database. 408 * 409 * @param fileEntryId the file entry ID 410 * @throws SystemException if a system exception occurred 411 */ 412 public void removeByFileEntryId(long fileEntryId) 413 throws com.liferay.portal.kernel.exception.SystemException; 414 415 /** 416 * Removes the document library file version where fileEntryId = ? and version = ? from the database. 417 * 418 * @param fileEntryId the file entry ID 419 * @param version the version 420 * @throws SystemException if a system exception occurred 421 */ 422 public void removeByF_V(long fileEntryId, java.lang.String version) 423 throws com.liferay.portal.kernel.exception.SystemException, 424 com.liferay.portlet.documentlibrary.NoSuchFileVersionException; 425 426 /** 427 * Removes all the document library file versions where fileEntryId = ? and status = ? from the database. 428 * 429 * @param fileEntryId the file entry ID 430 * @param status the status 431 * @throws SystemException if a system exception occurred 432 */ 433 public void removeByF_S(long fileEntryId, int status) 434 throws com.liferay.portal.kernel.exception.SystemException; 435 436 /** 437 * Removes all the document library file 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 document library file versions where fileEntryId = ?. 446 * 447 * @param fileEntryId the file entry ID 448 * @return the number of matching document library file versions 449 * @throws SystemException if a system exception occurred 450 */ 451 public int countByFileEntryId(long fileEntryId) 452 throws com.liferay.portal.kernel.exception.SystemException; 453 454 /** 455 * Returns the number of document library file versions where fileEntryId = ? and version = ?. 456 * 457 * @param fileEntryId the file entry ID 458 * @param version the version 459 * @return the number of matching document library file versions 460 * @throws SystemException if a system exception occurred 461 */ 462 public int countByF_V(long fileEntryId, java.lang.String version) 463 throws com.liferay.portal.kernel.exception.SystemException; 464 465 /** 466 * Returns the number of document library file versions where fileEntryId = ? and status = ?. 467 * 468 * @param fileEntryId the file entry ID 469 * @param status the status 470 * @return the number of matching document library file versions 471 * @throws SystemException if a system exception occurred 472 */ 473 public int countByF_S(long fileEntryId, int status) 474 throws com.liferay.portal.kernel.exception.SystemException; 475 476 /** 477 * Returns the number of document library file versions. 478 * 479 * @return the number of document library file 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 DLFileVersion remove(DLFileVersion dlFileVersion) 486 throws SystemException; 487 }