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