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.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 document library 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#update(com.liferay.portal.model.BaseModel, boolean) 099 */ 100 public static DLFileVersion update(DLFileVersion dlFileVersion, 101 boolean merge) throws SystemException { 102 return getPersistence().update(dlFileVersion, merge); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 107 */ 108 public static DLFileVersion update(DLFileVersion dlFileVersion, 109 boolean merge, ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(dlFileVersion, merge, serviceContext); 111 } 112 113 /** 114 * Caches the document library file version in the entity cache if it is enabled. 115 * 116 * @param dlFileVersion the document library file version 117 */ 118 public static void cacheResult( 119 com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion) { 120 getPersistence().cacheResult(dlFileVersion); 121 } 122 123 /** 124 * Caches the document library file versions in the entity cache if it is enabled. 125 * 126 * @param dlFileVersions the document library file versions 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> dlFileVersions) { 130 getPersistence().cacheResult(dlFileVersions); 131 } 132 133 /** 134 * Creates a new document library file version with the primary key. Does not add the document library file version to the database. 135 * 136 * @param fileVersionId the primary key for the new document library file version 137 * @return the new document library file version 138 */ 139 public static com.liferay.portlet.documentlibrary.model.DLFileVersion create( 140 long fileVersionId) { 141 return getPersistence().create(fileVersionId); 142 } 143 144 /** 145 * Removes the document library file version with the primary key from the database. Also notifies the appropriate model listeners. 146 * 147 * @param fileVersionId the primary key of the document library file version 148 * @return the document library file version that was removed 149 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 public static com.liferay.portlet.documentlibrary.model.DLFileVersion remove( 153 long fileVersionId) 154 throws com.liferay.portal.kernel.exception.SystemException, 155 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 156 return getPersistence().remove(fileVersionId); 157 } 158 159 public static com.liferay.portlet.documentlibrary.model.DLFileVersion updateImpl( 160 com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion, 161 boolean merge) 162 throws com.liferay.portal.kernel.exception.SystemException { 163 return getPersistence().updateImpl(dlFileVersion, merge); 164 } 165 166 /** 167 * 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. 168 * 169 * @param fileVersionId the primary key of the document library file version 170 * @return the document library file version 171 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found 172 * @throws SystemException if a system exception occurred 173 */ 174 public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByPrimaryKey( 175 long fileVersionId) 176 throws com.liferay.portal.kernel.exception.SystemException, 177 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 178 return getPersistence().findByPrimaryKey(fileVersionId); 179 } 180 181 /** 182 * Returns the document library file version with the primary key or returns <code>null</code> if it could not be found. 183 * 184 * @param fileVersionId the primary key of the document library file version 185 * @return the document library file version, or <code>null</code> if a document library file version with the primary key could not be found 186 * @throws SystemException if a system exception occurred 187 */ 188 public static com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByPrimaryKey( 189 long fileVersionId) 190 throws com.liferay.portal.kernel.exception.SystemException { 191 return getPersistence().fetchByPrimaryKey(fileVersionId); 192 } 193 194 /** 195 * Returns all the document library file versions where fileEntryId = ?. 196 * 197 * @param fileEntryId the file entry ID 198 * @return the matching document library file versions 199 * @throws SystemException if a system exception occurred 200 */ 201 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId( 202 long fileEntryId) 203 throws com.liferay.portal.kernel.exception.SystemException { 204 return getPersistence().findByFileEntryId(fileEntryId); 205 } 206 207 /** 208 * Returns a range of all the document library file versions where fileEntryId = ?. 209 * 210 * <p> 211 * 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. 212 * </p> 213 * 214 * @param fileEntryId the file entry ID 215 * @param start the lower bound of the range of document library file versions 216 * @param end the upper bound of the range of document library file versions (not inclusive) 217 * @return the range of matching document library file versions 218 * @throws SystemException if a system exception occurred 219 */ 220 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId( 221 long fileEntryId, int start, int end) 222 throws com.liferay.portal.kernel.exception.SystemException { 223 return getPersistence().findByFileEntryId(fileEntryId, start, end); 224 } 225 226 /** 227 * Returns an ordered range of all the document library file versions where fileEntryId = ?. 228 * 229 * <p> 230 * 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. 231 * </p> 232 * 233 * @param fileEntryId the file entry ID 234 * @param start the lower bound of the range of document library file versions 235 * @param end the upper bound of the range of document library file versions (not inclusive) 236 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 237 * @return the ordered range of matching document library file versions 238 * @throws SystemException if a system exception occurred 239 */ 240 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId( 241 long fileEntryId, int start, int end, 242 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 243 throws com.liferay.portal.kernel.exception.SystemException { 244 return getPersistence() 245 .findByFileEntryId(fileEntryId, start, end, orderByComparator); 246 } 247 248 /** 249 * Returns the first document library file version in the ordered set where fileEntryId = ?. 250 * 251 * <p> 252 * 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. 253 * </p> 254 * 255 * @param fileEntryId the file entry ID 256 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 257 * @return the first matching document library file version 258 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 259 * @throws SystemException if a system exception occurred 260 */ 261 public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByFileEntryId_First( 262 long fileEntryId, 263 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 264 throws com.liferay.portal.kernel.exception.SystemException, 265 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 266 return getPersistence() 267 .findByFileEntryId_First(fileEntryId, orderByComparator); 268 } 269 270 /** 271 * Returns the last document library file version in the ordered set where fileEntryId = ?. 272 * 273 * <p> 274 * 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. 275 * </p> 276 * 277 * @param fileEntryId the file entry ID 278 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 279 * @return the last matching document library file version 280 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 281 * @throws SystemException if a system exception occurred 282 */ 283 public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByFileEntryId_Last( 284 long fileEntryId, 285 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 286 throws com.liferay.portal.kernel.exception.SystemException, 287 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 288 return getPersistence() 289 .findByFileEntryId_Last(fileEntryId, orderByComparator); 290 } 291 292 /** 293 * Returns the document library file versions before and after the current document library file version in the ordered set where fileEntryId = ?. 294 * 295 * <p> 296 * 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. 297 * </p> 298 * 299 * @param fileVersionId the primary key of the current document library file version 300 * @param fileEntryId the file entry ID 301 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 302 * @return the previous, current, and next document library file version 303 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found 304 * @throws SystemException if a system exception occurred 305 */ 306 public static com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByFileEntryId_PrevAndNext( 307 long fileVersionId, long fileEntryId, 308 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 309 throws com.liferay.portal.kernel.exception.SystemException, 310 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 311 return getPersistence() 312 .findByFileEntryId_PrevAndNext(fileVersionId, fileEntryId, 313 orderByComparator); 314 } 315 316 /** 317 * 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. 318 * 319 * @param fileEntryId the file entry ID 320 * @param version the version 321 * @return the matching document library file version 322 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 323 * @throws SystemException if a system exception occurred 324 */ 325 public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_V( 326 long fileEntryId, java.lang.String version) 327 throws com.liferay.portal.kernel.exception.SystemException, 328 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 329 return getPersistence().findByF_V(fileEntryId, version); 330 } 331 332 /** 333 * 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. 334 * 335 * @param fileEntryId the file entry ID 336 * @param version the version 337 * @return the matching document library file version, or <code>null</code> if a matching document library file version could not be found 338 * @throws SystemException if a system exception occurred 339 */ 340 public static com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByF_V( 341 long fileEntryId, java.lang.String version) 342 throws com.liferay.portal.kernel.exception.SystemException { 343 return getPersistence().fetchByF_V(fileEntryId, version); 344 } 345 346 /** 347 * 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. 348 * 349 * @param fileEntryId the file entry ID 350 * @param version the version 351 * @param retrieveFromCache whether to use the finder cache 352 * @return the matching document library file version, or <code>null</code> if a matching document library file version could not be found 353 * @throws SystemException if a system exception occurred 354 */ 355 public static com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByF_V( 356 long fileEntryId, java.lang.String version, boolean retrieveFromCache) 357 throws com.liferay.portal.kernel.exception.SystemException { 358 return getPersistence() 359 .fetchByF_V(fileEntryId, version, retrieveFromCache); 360 } 361 362 /** 363 * Returns all the document library file versions where fileEntryId = ? and status = ?. 364 * 365 * @param fileEntryId the file entry ID 366 * @param status the status 367 * @return the matching document library file versions 368 * @throws SystemException if a system exception occurred 369 */ 370 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S( 371 long fileEntryId, int status) 372 throws com.liferay.portal.kernel.exception.SystemException { 373 return getPersistence().findByF_S(fileEntryId, status); 374 } 375 376 /** 377 * Returns a range of all the document library file versions where fileEntryId = ? and status = ?. 378 * 379 * <p> 380 * 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. 381 * </p> 382 * 383 * @param fileEntryId the file entry ID 384 * @param status the status 385 * @param start the lower bound of the range of document library file versions 386 * @param end the upper bound of the range of document library file versions (not inclusive) 387 * @return the range of matching document library file versions 388 * @throws SystemException if a system exception occurred 389 */ 390 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S( 391 long fileEntryId, int status, int start, int end) 392 throws com.liferay.portal.kernel.exception.SystemException { 393 return getPersistence().findByF_S(fileEntryId, status, start, end); 394 } 395 396 /** 397 * Returns an ordered range of all the document library file versions where fileEntryId = ? and status = ?. 398 * 399 * <p> 400 * 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. 401 * </p> 402 * 403 * @param fileEntryId the file entry ID 404 * @param status the status 405 * @param start the lower bound of the range of document library file versions 406 * @param end the upper bound of the range of document library file versions (not inclusive) 407 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 408 * @return the ordered range of matching document library file versions 409 * @throws SystemException if a system exception occurred 410 */ 411 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S( 412 long fileEntryId, int status, int start, int end, 413 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 414 throws com.liferay.portal.kernel.exception.SystemException { 415 return getPersistence() 416 .findByF_S(fileEntryId, status, start, end, orderByComparator); 417 } 418 419 /** 420 * Returns the first document library file version in the ordered set where fileEntryId = ? and status = ?. 421 * 422 * <p> 423 * 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. 424 * </p> 425 * 426 * @param fileEntryId the file entry ID 427 * @param status the status 428 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 429 * @return the first matching document library file version 430 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 431 * @throws SystemException if a system exception occurred 432 */ 433 public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_S_First( 434 long fileEntryId, int status, 435 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 436 throws com.liferay.portal.kernel.exception.SystemException, 437 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 438 return getPersistence() 439 .findByF_S_First(fileEntryId, status, orderByComparator); 440 } 441 442 /** 443 * Returns the last document library file version in the ordered set where fileEntryId = ? and status = ?. 444 * 445 * <p> 446 * 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. 447 * </p> 448 * 449 * @param fileEntryId the file entry ID 450 * @param status the status 451 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 452 * @return the last matching document library file version 453 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 454 * @throws SystemException if a system exception occurred 455 */ 456 public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_S_Last( 457 long fileEntryId, int status, 458 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 459 throws com.liferay.portal.kernel.exception.SystemException, 460 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 461 return getPersistence() 462 .findByF_S_Last(fileEntryId, status, orderByComparator); 463 } 464 465 /** 466 * Returns the document library file versions before and after the current document library file version in the ordered set where fileEntryId = ? and status = ?. 467 * 468 * <p> 469 * 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. 470 * </p> 471 * 472 * @param fileVersionId the primary key of the current document library file version 473 * @param fileEntryId the file entry ID 474 * @param status the status 475 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 476 * @return the previous, current, and next document library file version 477 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found 478 * @throws SystemException if a system exception occurred 479 */ 480 public static com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByF_S_PrevAndNext( 481 long fileVersionId, long fileEntryId, int status, 482 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 483 throws com.liferay.portal.kernel.exception.SystemException, 484 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 485 return getPersistence() 486 .findByF_S_PrevAndNext(fileVersionId, fileEntryId, status, 487 orderByComparator); 488 } 489 490 /** 491 * Returns all the document library file versions where groupId = ? and folderId = ? and status = ?. 492 * 493 * @param groupId the group ID 494 * @param folderId the folder ID 495 * @param status the status 496 * @return the matching document library file versions 497 * @throws SystemException if a system exception occurred 498 */ 499 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByG_F_S( 500 long groupId, long folderId, int status) 501 throws com.liferay.portal.kernel.exception.SystemException { 502 return getPersistence().findByG_F_S(groupId, folderId, status); 503 } 504 505 /** 506 * Returns a range of all the document library file versions where groupId = ? and folderId = ? and status = ?. 507 * 508 * <p> 509 * 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. 510 * </p> 511 * 512 * @param groupId the group ID 513 * @param folderId the folder ID 514 * @param status the status 515 * @param start the lower bound of the range of document library file versions 516 * @param end the upper bound of the range of document library file versions (not inclusive) 517 * @return the range of matching document library file versions 518 * @throws SystemException if a system exception occurred 519 */ 520 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByG_F_S( 521 long groupId, long folderId, int status, int start, int end) 522 throws com.liferay.portal.kernel.exception.SystemException { 523 return getPersistence() 524 .findByG_F_S(groupId, folderId, status, start, end); 525 } 526 527 /** 528 * Returns an ordered range of all the document library file versions where groupId = ? and folderId = ? and status = ?. 529 * 530 * <p> 531 * 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. 532 * </p> 533 * 534 * @param groupId the group ID 535 * @param folderId the folder ID 536 * @param status the status 537 * @param start the lower bound of the range of document library file versions 538 * @param end the upper bound of the range of document library file versions (not inclusive) 539 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 540 * @return the ordered range of matching document library file versions 541 * @throws SystemException if a system exception occurred 542 */ 543 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByG_F_S( 544 long groupId, long folderId, int status, int start, int end, 545 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 546 throws com.liferay.portal.kernel.exception.SystemException { 547 return getPersistence() 548 .findByG_F_S(groupId, folderId, status, start, end, 549 orderByComparator); 550 } 551 552 /** 553 * Returns the first document library file version in the ordered set where groupId = ? and folderId = ? and status = ?. 554 * 555 * <p> 556 * 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. 557 * </p> 558 * 559 * @param groupId the group ID 560 * @param folderId the folder ID 561 * @param status the status 562 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 563 * @return the first matching document library file version 564 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 565 * @throws SystemException if a system exception occurred 566 */ 567 public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByG_F_S_First( 568 long groupId, long folderId, int status, 569 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 570 throws com.liferay.portal.kernel.exception.SystemException, 571 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 572 return getPersistence() 573 .findByG_F_S_First(groupId, folderId, status, 574 orderByComparator); 575 } 576 577 /** 578 * Returns the last document library file version in the ordered set where groupId = ? and folderId = ? and status = ?. 579 * 580 * <p> 581 * 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. 582 * </p> 583 * 584 * @param groupId the group ID 585 * @param folderId the folder ID 586 * @param status the status 587 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 588 * @return the last matching document library file version 589 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found 590 * @throws SystemException if a system exception occurred 591 */ 592 public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByG_F_S_Last( 593 long groupId, long folderId, int status, 594 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 595 throws com.liferay.portal.kernel.exception.SystemException, 596 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 597 return getPersistence() 598 .findByG_F_S_Last(groupId, folderId, status, 599 orderByComparator); 600 } 601 602 /** 603 * Returns the document library file versions before and after the current document library file version in the ordered set where groupId = ? and folderId = ? and status = ?. 604 * 605 * <p> 606 * 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. 607 * </p> 608 * 609 * @param fileVersionId the primary key of the current document library file version 610 * @param groupId the group ID 611 * @param folderId the folder ID 612 * @param status the status 613 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 614 * @return the previous, current, and next document library file version 615 * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found 616 * @throws SystemException if a system exception occurred 617 */ 618 public static com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByG_F_S_PrevAndNext( 619 long fileVersionId, long groupId, long folderId, int status, 620 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 621 throws com.liferay.portal.kernel.exception.SystemException, 622 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 623 return getPersistence() 624 .findByG_F_S_PrevAndNext(fileVersionId, groupId, folderId, 625 status, orderByComparator); 626 } 627 628 /** 629 * Returns all the document library file versions. 630 * 631 * @return the document library file versions 632 * @throws SystemException if a system exception occurred 633 */ 634 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll() 635 throws com.liferay.portal.kernel.exception.SystemException { 636 return getPersistence().findAll(); 637 } 638 639 /** 640 * Returns a range of all the document library file versions. 641 * 642 * <p> 643 * 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. 644 * </p> 645 * 646 * @param start the lower bound of the range of document library file versions 647 * @param end the upper bound of the range of document library file versions (not inclusive) 648 * @return the range of document library file versions 649 * @throws SystemException if a system exception occurred 650 */ 651 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll( 652 int start, int end) 653 throws com.liferay.portal.kernel.exception.SystemException { 654 return getPersistence().findAll(start, end); 655 } 656 657 /** 658 * Returns an ordered range of all the document library file versions. 659 * 660 * <p> 661 * 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. 662 * </p> 663 * 664 * @param start the lower bound of the range of document library file versions 665 * @param end the upper bound of the range of document library file versions (not inclusive) 666 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 667 * @return the ordered range of document library file versions 668 * @throws SystemException if a system exception occurred 669 */ 670 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll( 671 int start, int end, 672 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 673 throws com.liferay.portal.kernel.exception.SystemException { 674 return getPersistence().findAll(start, end, orderByComparator); 675 } 676 677 /** 678 * Removes all the document library file versions where fileEntryId = ? from the database. 679 * 680 * @param fileEntryId the file entry ID 681 * @throws SystemException if a system exception occurred 682 */ 683 public static void removeByFileEntryId(long fileEntryId) 684 throws com.liferay.portal.kernel.exception.SystemException { 685 getPersistence().removeByFileEntryId(fileEntryId); 686 } 687 688 /** 689 * Removes the document library file version where fileEntryId = ? and version = ? from the database. 690 * 691 * @param fileEntryId the file entry ID 692 * @param version the version 693 * @throws SystemException if a system exception occurred 694 */ 695 public static void removeByF_V(long fileEntryId, java.lang.String version) 696 throws com.liferay.portal.kernel.exception.SystemException, 697 com.liferay.portlet.documentlibrary.NoSuchFileVersionException { 698 getPersistence().removeByF_V(fileEntryId, version); 699 } 700 701 /** 702 * Removes all the document library file versions where fileEntryId = ? and status = ? from the database. 703 * 704 * @param fileEntryId the file entry ID 705 * @param status the status 706 * @throws SystemException if a system exception occurred 707 */ 708 public static void removeByF_S(long fileEntryId, int status) 709 throws com.liferay.portal.kernel.exception.SystemException { 710 getPersistence().removeByF_S(fileEntryId, status); 711 } 712 713 /** 714 * Removes all the document library file versions where groupId = ? and folderId = ? and status = ? from the database. 715 * 716 * @param groupId the group ID 717 * @param folderId the folder ID 718 * @param status the status 719 * @throws SystemException if a system exception occurred 720 */ 721 public static void removeByG_F_S(long groupId, long folderId, int status) 722 throws com.liferay.portal.kernel.exception.SystemException { 723 getPersistence().removeByG_F_S(groupId, folderId, status); 724 } 725 726 /** 727 * Removes all the document library file versions from the database. 728 * 729 * @throws SystemException if a system exception occurred 730 */ 731 public static void removeAll() 732 throws com.liferay.portal.kernel.exception.SystemException { 733 getPersistence().removeAll(); 734 } 735 736 /** 737 * Returns the number of document library file versions where fileEntryId = ?. 738 * 739 * @param fileEntryId the file entry ID 740 * @return the number of matching document library file versions 741 * @throws SystemException if a system exception occurred 742 */ 743 public static int countByFileEntryId(long fileEntryId) 744 throws com.liferay.portal.kernel.exception.SystemException { 745 return getPersistence().countByFileEntryId(fileEntryId); 746 } 747 748 /** 749 * Returns the number of document library file versions where fileEntryId = ? and version = ?. 750 * 751 * @param fileEntryId the file entry ID 752 * @param version the version 753 * @return the number of matching document library file versions 754 * @throws SystemException if a system exception occurred 755 */ 756 public static int countByF_V(long fileEntryId, java.lang.String version) 757 throws com.liferay.portal.kernel.exception.SystemException { 758 return getPersistence().countByF_V(fileEntryId, version); 759 } 760 761 /** 762 * Returns the number of document library file versions where fileEntryId = ? and status = ?. 763 * 764 * @param fileEntryId the file entry ID 765 * @param status the status 766 * @return the number of matching document library file versions 767 * @throws SystemException if a system exception occurred 768 */ 769 public static int countByF_S(long fileEntryId, int status) 770 throws com.liferay.portal.kernel.exception.SystemException { 771 return getPersistence().countByF_S(fileEntryId, status); 772 } 773 774 /** 775 * Returns the number of document library file versions where groupId = ? and folderId = ? and status = ?. 776 * 777 * @param groupId the group ID 778 * @param folderId the folder ID 779 * @param status the status 780 * @return the number of matching document library file versions 781 * @throws SystemException if a system exception occurred 782 */ 783 public static int countByG_F_S(long groupId, long folderId, int status) 784 throws com.liferay.portal.kernel.exception.SystemException { 785 return getPersistence().countByG_F_S(groupId, folderId, status); 786 } 787 788 /** 789 * Returns the number of document library file versions. 790 * 791 * @return the number of document library file versions 792 * @throws SystemException if a system exception occurred 793 */ 794 public static int countAll() 795 throws com.liferay.portal.kernel.exception.SystemException { 796 return getPersistence().countAll(); 797 } 798 799 public static DLFileVersionPersistence getPersistence() { 800 if (_persistence == null) { 801 _persistence = (DLFileVersionPersistence)PortalBeanLocatorUtil.locate(DLFileVersionPersistence.class.getName()); 802 803 ReferenceRegistry.registerReference(DLFileVersionUtil.class, 804 "_persistence"); 805 } 806 807 return _persistence; 808 } 809 810 public void setPersistence(DLFileVersionPersistence persistence) { 811 _persistence = persistence; 812 813 ReferenceRegistry.registerReference(DLFileVersionUtil.class, 814 "_persistence"); 815 } 816 817 private static DLFileVersionPersistence _persistence; 818 }