001 /** 002 * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.util.OrderByComparator; 022 import com.liferay.portal.kernel.util.ReferenceRegistry; 023 import com.liferay.portal.service.ServiceContext; 024 025 import com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the document library file entry metadata service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryMetadataPersistenceImpl} 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. 031 * 032 * <p> 033 * Caching information and settings can be found in <code>portal.properties</code> 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see DLFileEntryMetadataPersistence 038 * @see com.liferay.portlet.documentlibrary.service.persistence.impl.DLFileEntryMetadataPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class DLFileEntryMetadataUtil { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 047 */ 048 049 /** 050 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 051 */ 052 public static void clearCache() { 053 getPersistence().clearCache(); 054 } 055 056 /** 057 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 058 */ 059 public static void clearCache(DLFileEntryMetadata dlFileEntryMetadata) { 060 getPersistence().clearCache(dlFileEntryMetadata); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 067 return getPersistence().countWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 072 */ 073 public static List<DLFileEntryMetadata> findWithDynamicQuery( 074 DynamicQuery dynamicQuery) { 075 return getPersistence().findWithDynamicQuery(dynamicQuery); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 080 */ 081 public static List<DLFileEntryMetadata> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end) { 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<DLFileEntryMetadata> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<DLFileEntryMetadata> orderByComparator) { 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) 099 */ 100 public static DLFileEntryMetadata update( 101 DLFileEntryMetadata dlFileEntryMetadata) { 102 return getPersistence().update(dlFileEntryMetadata); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 107 */ 108 public static DLFileEntryMetadata update( 109 DLFileEntryMetadata dlFileEntryMetadata, ServiceContext serviceContext) { 110 return getPersistence().update(dlFileEntryMetadata, serviceContext); 111 } 112 113 /** 114 * Returns all the document library file entry metadatas where uuid = ?. 115 * 116 * @param uuid the uuid 117 * @return the matching document library file entry metadatas 118 */ 119 public static List<DLFileEntryMetadata> findByUuid(java.lang.String uuid) { 120 return getPersistence().findByUuid(uuid); 121 } 122 123 /** 124 * Returns a range of all the document library file entry metadatas where uuid = ?. 125 * 126 * <p> 127 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 128 * </p> 129 * 130 * @param uuid the uuid 131 * @param start the lower bound of the range of document library file entry metadatas 132 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 133 * @return the range of matching document library file entry metadatas 134 */ 135 public static List<DLFileEntryMetadata> findByUuid(java.lang.String uuid, 136 int start, int end) { 137 return getPersistence().findByUuid(uuid, start, end); 138 } 139 140 /** 141 * Returns an ordered range of all the document library file entry metadatas where uuid = ?. 142 * 143 * <p> 144 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 145 * </p> 146 * 147 * @param uuid the uuid 148 * @param start the lower bound of the range of document library file entry metadatas 149 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 150 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 151 * @return the ordered range of matching document library file entry metadatas 152 */ 153 public static List<DLFileEntryMetadata> findByUuid(java.lang.String uuid, 154 int start, int end, 155 OrderByComparator<DLFileEntryMetadata> orderByComparator) { 156 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 157 } 158 159 /** 160 * Returns an ordered range of all the document library file entry metadatas where uuid = ?. 161 * 162 * <p> 163 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 164 * </p> 165 * 166 * @param uuid the uuid 167 * @param start the lower bound of the range of document library file entry metadatas 168 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 169 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 170 * @param retrieveFromCache whether to retrieve from the finder cache 171 * @return the ordered range of matching document library file entry metadatas 172 */ 173 public static List<DLFileEntryMetadata> findByUuid(java.lang.String uuid, 174 int start, int end, 175 OrderByComparator<DLFileEntryMetadata> orderByComparator, 176 boolean retrieveFromCache) { 177 return getPersistence() 178 .findByUuid(uuid, start, end, orderByComparator, 179 retrieveFromCache); 180 } 181 182 /** 183 * Returns the first document library file entry metadata in the ordered set where uuid = ?. 184 * 185 * @param uuid the uuid 186 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 187 * @return the first matching document library file entry metadata 188 * @throws NoSuchFileEntryMetadataException if a matching document library file entry metadata could not be found 189 */ 190 public static DLFileEntryMetadata findByUuid_First(java.lang.String uuid, 191 OrderByComparator<DLFileEntryMetadata> orderByComparator) 192 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 193 return getPersistence().findByUuid_First(uuid, orderByComparator); 194 } 195 196 /** 197 * Returns the first document library file entry metadata in the ordered set where uuid = ?. 198 * 199 * @param uuid the uuid 200 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 201 * @return the first matching document library file entry metadata, or <code>null</code> if a matching document library file entry metadata could not be found 202 */ 203 public static DLFileEntryMetadata fetchByUuid_First(java.lang.String uuid, 204 OrderByComparator<DLFileEntryMetadata> orderByComparator) { 205 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 206 } 207 208 /** 209 * Returns the last document library file entry metadata in the ordered set where uuid = ?. 210 * 211 * @param uuid the uuid 212 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 213 * @return the last matching document library file entry metadata 214 * @throws NoSuchFileEntryMetadataException if a matching document library file entry metadata could not be found 215 */ 216 public static DLFileEntryMetadata findByUuid_Last(java.lang.String uuid, 217 OrderByComparator<DLFileEntryMetadata> orderByComparator) 218 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 219 return getPersistence().findByUuid_Last(uuid, orderByComparator); 220 } 221 222 /** 223 * Returns the last document library file entry metadata in the ordered set where uuid = ?. 224 * 225 * @param uuid the uuid 226 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 227 * @return the last matching document library file entry metadata, or <code>null</code> if a matching document library file entry metadata could not be found 228 */ 229 public static DLFileEntryMetadata fetchByUuid_Last(java.lang.String uuid, 230 OrderByComparator<DLFileEntryMetadata> orderByComparator) { 231 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 232 } 233 234 /** 235 * Returns the document library file entry metadatas before and after the current document library file entry metadata in the ordered set where uuid = ?. 236 * 237 * @param fileEntryMetadataId the primary key of the current document library file entry metadata 238 * @param uuid the uuid 239 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 240 * @return the previous, current, and next document library file entry metadata 241 * @throws NoSuchFileEntryMetadataException if a document library file entry metadata with the primary key could not be found 242 */ 243 public static DLFileEntryMetadata[] findByUuid_PrevAndNext( 244 long fileEntryMetadataId, java.lang.String uuid, 245 OrderByComparator<DLFileEntryMetadata> orderByComparator) 246 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 247 return getPersistence() 248 .findByUuid_PrevAndNext(fileEntryMetadataId, uuid, 249 orderByComparator); 250 } 251 252 /** 253 * Removes all the document library file entry metadatas where uuid = ? from the database. 254 * 255 * @param uuid the uuid 256 */ 257 public static void removeByUuid(java.lang.String uuid) { 258 getPersistence().removeByUuid(uuid); 259 } 260 261 /** 262 * Returns the number of document library file entry metadatas where uuid = ?. 263 * 264 * @param uuid the uuid 265 * @return the number of matching document library file entry metadatas 266 */ 267 public static int countByUuid(java.lang.String uuid) { 268 return getPersistence().countByUuid(uuid); 269 } 270 271 /** 272 * Returns all the document library file entry metadatas where fileEntryId = ?. 273 * 274 * @param fileEntryId the file entry ID 275 * @return the matching document library file entry metadatas 276 */ 277 public static List<DLFileEntryMetadata> findByFileEntryId(long fileEntryId) { 278 return getPersistence().findByFileEntryId(fileEntryId); 279 } 280 281 /** 282 * Returns a range of all the document library file entry metadatas where fileEntryId = ?. 283 * 284 * <p> 285 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 286 * </p> 287 * 288 * @param fileEntryId the file entry ID 289 * @param start the lower bound of the range of document library file entry metadatas 290 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 291 * @return the range of matching document library file entry metadatas 292 */ 293 public static List<DLFileEntryMetadata> findByFileEntryId( 294 long fileEntryId, int start, int end) { 295 return getPersistence().findByFileEntryId(fileEntryId, start, end); 296 } 297 298 /** 299 * Returns an ordered range of all the document library file entry metadatas where fileEntryId = ?. 300 * 301 * <p> 302 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 303 * </p> 304 * 305 * @param fileEntryId the file entry ID 306 * @param start the lower bound of the range of document library file entry metadatas 307 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 308 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 309 * @return the ordered range of matching document library file entry metadatas 310 */ 311 public static List<DLFileEntryMetadata> findByFileEntryId( 312 long fileEntryId, int start, int end, 313 OrderByComparator<DLFileEntryMetadata> orderByComparator) { 314 return getPersistence() 315 .findByFileEntryId(fileEntryId, start, end, orderByComparator); 316 } 317 318 /** 319 * Returns an ordered range of all the document library file entry metadatas where fileEntryId = ?. 320 * 321 * <p> 322 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 323 * </p> 324 * 325 * @param fileEntryId the file entry ID 326 * @param start the lower bound of the range of document library file entry metadatas 327 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 328 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 329 * @param retrieveFromCache whether to retrieve from the finder cache 330 * @return the ordered range of matching document library file entry metadatas 331 */ 332 public static List<DLFileEntryMetadata> findByFileEntryId( 333 long fileEntryId, int start, int end, 334 OrderByComparator<DLFileEntryMetadata> orderByComparator, 335 boolean retrieveFromCache) { 336 return getPersistence() 337 .findByFileEntryId(fileEntryId, start, end, 338 orderByComparator, retrieveFromCache); 339 } 340 341 /** 342 * Returns the first document library file entry metadata in the ordered set where fileEntryId = ?. 343 * 344 * @param fileEntryId the file entry ID 345 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 346 * @return the first matching document library file entry metadata 347 * @throws NoSuchFileEntryMetadataException if a matching document library file entry metadata could not be found 348 */ 349 public static DLFileEntryMetadata findByFileEntryId_First( 350 long fileEntryId, 351 OrderByComparator<DLFileEntryMetadata> orderByComparator) 352 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 353 return getPersistence() 354 .findByFileEntryId_First(fileEntryId, orderByComparator); 355 } 356 357 /** 358 * Returns the first document library file entry metadata in the ordered set where fileEntryId = ?. 359 * 360 * @param fileEntryId the file entry ID 361 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 362 * @return the first matching document library file entry metadata, or <code>null</code> if a matching document library file entry metadata could not be found 363 */ 364 public static DLFileEntryMetadata fetchByFileEntryId_First( 365 long fileEntryId, 366 OrderByComparator<DLFileEntryMetadata> orderByComparator) { 367 return getPersistence() 368 .fetchByFileEntryId_First(fileEntryId, orderByComparator); 369 } 370 371 /** 372 * Returns the last document library file entry metadata in the ordered set where fileEntryId = ?. 373 * 374 * @param fileEntryId the file entry ID 375 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 376 * @return the last matching document library file entry metadata 377 * @throws NoSuchFileEntryMetadataException if a matching document library file entry metadata could not be found 378 */ 379 public static DLFileEntryMetadata findByFileEntryId_Last(long fileEntryId, 380 OrderByComparator<DLFileEntryMetadata> orderByComparator) 381 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 382 return getPersistence() 383 .findByFileEntryId_Last(fileEntryId, orderByComparator); 384 } 385 386 /** 387 * Returns the last document library file entry metadata in the ordered set where fileEntryId = ?. 388 * 389 * @param fileEntryId the file entry ID 390 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 391 * @return the last matching document library file entry metadata, or <code>null</code> if a matching document library file entry metadata could not be found 392 */ 393 public static DLFileEntryMetadata fetchByFileEntryId_Last( 394 long fileEntryId, 395 OrderByComparator<DLFileEntryMetadata> orderByComparator) { 396 return getPersistence() 397 .fetchByFileEntryId_Last(fileEntryId, orderByComparator); 398 } 399 400 /** 401 * Returns the document library file entry metadatas before and after the current document library file entry metadata in the ordered set where fileEntryId = ?. 402 * 403 * @param fileEntryMetadataId the primary key of the current document library file entry metadata 404 * @param fileEntryId the file entry ID 405 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 406 * @return the previous, current, and next document library file entry metadata 407 * @throws NoSuchFileEntryMetadataException if a document library file entry metadata with the primary key could not be found 408 */ 409 public static DLFileEntryMetadata[] findByFileEntryId_PrevAndNext( 410 long fileEntryMetadataId, long fileEntryId, 411 OrderByComparator<DLFileEntryMetadata> orderByComparator) 412 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 413 return getPersistence() 414 .findByFileEntryId_PrevAndNext(fileEntryMetadataId, 415 fileEntryId, orderByComparator); 416 } 417 418 /** 419 * Removes all the document library file entry metadatas where fileEntryId = ? from the database. 420 * 421 * @param fileEntryId the file entry ID 422 */ 423 public static void removeByFileEntryId(long fileEntryId) { 424 getPersistence().removeByFileEntryId(fileEntryId); 425 } 426 427 /** 428 * Returns the number of document library file entry metadatas where fileEntryId = ?. 429 * 430 * @param fileEntryId the file entry ID 431 * @return the number of matching document library file entry metadatas 432 */ 433 public static int countByFileEntryId(long fileEntryId) { 434 return getPersistence().countByFileEntryId(fileEntryId); 435 } 436 437 /** 438 * Returns all the document library file entry metadatas where fileVersionId = ?. 439 * 440 * @param fileVersionId the file version ID 441 * @return the matching document library file entry metadatas 442 */ 443 public static List<DLFileEntryMetadata> findByFileVersionId( 444 long fileVersionId) { 445 return getPersistence().findByFileVersionId(fileVersionId); 446 } 447 448 /** 449 * Returns a range of all the document library file entry metadatas where fileVersionId = ?. 450 * 451 * <p> 452 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 453 * </p> 454 * 455 * @param fileVersionId the file version ID 456 * @param start the lower bound of the range of document library file entry metadatas 457 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 458 * @return the range of matching document library file entry metadatas 459 */ 460 public static List<DLFileEntryMetadata> findByFileVersionId( 461 long fileVersionId, int start, int end) { 462 return getPersistence().findByFileVersionId(fileVersionId, start, end); 463 } 464 465 /** 466 * Returns an ordered range of all the document library file entry metadatas where fileVersionId = ?. 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 470 * </p> 471 * 472 * @param fileVersionId the file version ID 473 * @param start the lower bound of the range of document library file entry metadatas 474 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 475 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 476 * @return the ordered range of matching document library file entry metadatas 477 */ 478 public static List<DLFileEntryMetadata> findByFileVersionId( 479 long fileVersionId, int start, int end, 480 OrderByComparator<DLFileEntryMetadata> orderByComparator) { 481 return getPersistence() 482 .findByFileVersionId(fileVersionId, start, end, 483 orderByComparator); 484 } 485 486 /** 487 * Returns an ordered range of all the document library file entry metadatas where fileVersionId = ?. 488 * 489 * <p> 490 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 491 * </p> 492 * 493 * @param fileVersionId the file version ID 494 * @param start the lower bound of the range of document library file entry metadatas 495 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 496 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 497 * @param retrieveFromCache whether to retrieve from the finder cache 498 * @return the ordered range of matching document library file entry metadatas 499 */ 500 public static List<DLFileEntryMetadata> findByFileVersionId( 501 long fileVersionId, int start, int end, 502 OrderByComparator<DLFileEntryMetadata> orderByComparator, 503 boolean retrieveFromCache) { 504 return getPersistence() 505 .findByFileVersionId(fileVersionId, start, end, 506 orderByComparator, retrieveFromCache); 507 } 508 509 /** 510 * Returns the first document library file entry metadata in the ordered set where fileVersionId = ?. 511 * 512 * @param fileVersionId the file version ID 513 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 514 * @return the first matching document library file entry metadata 515 * @throws NoSuchFileEntryMetadataException if a matching document library file entry metadata could not be found 516 */ 517 public static DLFileEntryMetadata findByFileVersionId_First( 518 long fileVersionId, 519 OrderByComparator<DLFileEntryMetadata> orderByComparator) 520 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 521 return getPersistence() 522 .findByFileVersionId_First(fileVersionId, orderByComparator); 523 } 524 525 /** 526 * Returns the first document library file entry metadata in the ordered set where fileVersionId = ?. 527 * 528 * @param fileVersionId the file version ID 529 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 530 * @return the first matching document library file entry metadata, or <code>null</code> if a matching document library file entry metadata could not be found 531 */ 532 public static DLFileEntryMetadata fetchByFileVersionId_First( 533 long fileVersionId, 534 OrderByComparator<DLFileEntryMetadata> orderByComparator) { 535 return getPersistence() 536 .fetchByFileVersionId_First(fileVersionId, orderByComparator); 537 } 538 539 /** 540 * Returns the last document library file entry metadata in the ordered set where fileVersionId = ?. 541 * 542 * @param fileVersionId the file version ID 543 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 544 * @return the last matching document library file entry metadata 545 * @throws NoSuchFileEntryMetadataException if a matching document library file entry metadata could not be found 546 */ 547 public static DLFileEntryMetadata findByFileVersionId_Last( 548 long fileVersionId, 549 OrderByComparator<DLFileEntryMetadata> orderByComparator) 550 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 551 return getPersistence() 552 .findByFileVersionId_Last(fileVersionId, orderByComparator); 553 } 554 555 /** 556 * Returns the last document library file entry metadata in the ordered set where fileVersionId = ?. 557 * 558 * @param fileVersionId the file version ID 559 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 560 * @return the last matching document library file entry metadata, or <code>null</code> if a matching document library file entry metadata could not be found 561 */ 562 public static DLFileEntryMetadata fetchByFileVersionId_Last( 563 long fileVersionId, 564 OrderByComparator<DLFileEntryMetadata> orderByComparator) { 565 return getPersistence() 566 .fetchByFileVersionId_Last(fileVersionId, orderByComparator); 567 } 568 569 /** 570 * Returns the document library file entry metadatas before and after the current document library file entry metadata in the ordered set where fileVersionId = ?. 571 * 572 * @param fileEntryMetadataId the primary key of the current document library file entry metadata 573 * @param fileVersionId the file version ID 574 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 575 * @return the previous, current, and next document library file entry metadata 576 * @throws NoSuchFileEntryMetadataException if a document library file entry metadata with the primary key could not be found 577 */ 578 public static DLFileEntryMetadata[] findByFileVersionId_PrevAndNext( 579 long fileEntryMetadataId, long fileVersionId, 580 OrderByComparator<DLFileEntryMetadata> orderByComparator) 581 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 582 return getPersistence() 583 .findByFileVersionId_PrevAndNext(fileEntryMetadataId, 584 fileVersionId, orderByComparator); 585 } 586 587 /** 588 * Removes all the document library file entry metadatas where fileVersionId = ? from the database. 589 * 590 * @param fileVersionId the file version ID 591 */ 592 public static void removeByFileVersionId(long fileVersionId) { 593 getPersistence().removeByFileVersionId(fileVersionId); 594 } 595 596 /** 597 * Returns the number of document library file entry metadatas where fileVersionId = ?. 598 * 599 * @param fileVersionId the file version ID 600 * @return the number of matching document library file entry metadatas 601 */ 602 public static int countByFileVersionId(long fileVersionId) { 603 return getPersistence().countByFileVersionId(fileVersionId); 604 } 605 606 /** 607 * Returns the document library file entry metadata where DDMStructureId = ? and fileVersionId = ? or throws a {@link NoSuchFileEntryMetadataException} if it could not be found. 608 * 609 * @param DDMStructureId the d d m structure ID 610 * @param fileVersionId the file version ID 611 * @return the matching document library file entry metadata 612 * @throws NoSuchFileEntryMetadataException if a matching document library file entry metadata could not be found 613 */ 614 public static DLFileEntryMetadata findByD_F(long DDMStructureId, 615 long fileVersionId) 616 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 617 return getPersistence().findByD_F(DDMStructureId, fileVersionId); 618 } 619 620 /** 621 * Returns the document library file entry metadata where DDMStructureId = ? and fileVersionId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 622 * 623 * @param DDMStructureId the d d m structure ID 624 * @param fileVersionId the file version ID 625 * @return the matching document library file entry metadata, or <code>null</code> if a matching document library file entry metadata could not be found 626 */ 627 public static DLFileEntryMetadata fetchByD_F(long DDMStructureId, 628 long fileVersionId) { 629 return getPersistence().fetchByD_F(DDMStructureId, fileVersionId); 630 } 631 632 /** 633 * Returns the document library file entry metadata where DDMStructureId = ? and fileVersionId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 634 * 635 * @param DDMStructureId the d d m structure ID 636 * @param fileVersionId the file version ID 637 * @param retrieveFromCache whether to retrieve from the finder cache 638 * @return the matching document library file entry metadata, or <code>null</code> if a matching document library file entry metadata could not be found 639 */ 640 public static DLFileEntryMetadata fetchByD_F(long DDMStructureId, 641 long fileVersionId, boolean retrieveFromCache) { 642 return getPersistence() 643 .fetchByD_F(DDMStructureId, fileVersionId, retrieveFromCache); 644 } 645 646 /** 647 * Removes the document library file entry metadata where DDMStructureId = ? and fileVersionId = ? from the database. 648 * 649 * @param DDMStructureId the d d m structure ID 650 * @param fileVersionId the file version ID 651 * @return the document library file entry metadata that was removed 652 */ 653 public static DLFileEntryMetadata removeByD_F(long DDMStructureId, 654 long fileVersionId) 655 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 656 return getPersistence().removeByD_F(DDMStructureId, fileVersionId); 657 } 658 659 /** 660 * Returns the number of document library file entry metadatas where DDMStructureId = ? and fileVersionId = ?. 661 * 662 * @param DDMStructureId the d d m structure ID 663 * @param fileVersionId the file version ID 664 * @return the number of matching document library file entry metadatas 665 */ 666 public static int countByD_F(long DDMStructureId, long fileVersionId) { 667 return getPersistence().countByD_F(DDMStructureId, fileVersionId); 668 } 669 670 /** 671 * Caches the document library file entry metadata in the entity cache if it is enabled. 672 * 673 * @param dlFileEntryMetadata the document library file entry metadata 674 */ 675 public static void cacheResult(DLFileEntryMetadata dlFileEntryMetadata) { 676 getPersistence().cacheResult(dlFileEntryMetadata); 677 } 678 679 /** 680 * Caches the document library file entry metadatas in the entity cache if it is enabled. 681 * 682 * @param dlFileEntryMetadatas the document library file entry metadatas 683 */ 684 public static void cacheResult( 685 List<DLFileEntryMetadata> dlFileEntryMetadatas) { 686 getPersistence().cacheResult(dlFileEntryMetadatas); 687 } 688 689 /** 690 * Creates a new document library file entry metadata with the primary key. Does not add the document library file entry metadata to the database. 691 * 692 * @param fileEntryMetadataId the primary key for the new document library file entry metadata 693 * @return the new document library file entry metadata 694 */ 695 public static DLFileEntryMetadata create(long fileEntryMetadataId) { 696 return getPersistence().create(fileEntryMetadataId); 697 } 698 699 /** 700 * Removes the document library file entry metadata with the primary key from the database. Also notifies the appropriate model listeners. 701 * 702 * @param fileEntryMetadataId the primary key of the document library file entry metadata 703 * @return the document library file entry metadata that was removed 704 * @throws NoSuchFileEntryMetadataException if a document library file entry metadata with the primary key could not be found 705 */ 706 public static DLFileEntryMetadata remove(long fileEntryMetadataId) 707 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 708 return getPersistence().remove(fileEntryMetadataId); 709 } 710 711 public static DLFileEntryMetadata updateImpl( 712 DLFileEntryMetadata dlFileEntryMetadata) { 713 return getPersistence().updateImpl(dlFileEntryMetadata); 714 } 715 716 /** 717 * Returns the document library file entry metadata with the primary key or throws a {@link NoSuchFileEntryMetadataException} if it could not be found. 718 * 719 * @param fileEntryMetadataId the primary key of the document library file entry metadata 720 * @return the document library file entry metadata 721 * @throws NoSuchFileEntryMetadataException if a document library file entry metadata with the primary key could not be found 722 */ 723 public static DLFileEntryMetadata findByPrimaryKey(long fileEntryMetadataId) 724 throws com.liferay.portlet.documentlibrary.NoSuchFileEntryMetadataException { 725 return getPersistence().findByPrimaryKey(fileEntryMetadataId); 726 } 727 728 /** 729 * Returns the document library file entry metadata with the primary key or returns <code>null</code> if it could not be found. 730 * 731 * @param fileEntryMetadataId the primary key of the document library file entry metadata 732 * @return the document library file entry metadata, or <code>null</code> if a document library file entry metadata with the primary key could not be found 733 */ 734 public static DLFileEntryMetadata fetchByPrimaryKey( 735 long fileEntryMetadataId) { 736 return getPersistence().fetchByPrimaryKey(fileEntryMetadataId); 737 } 738 739 public static java.util.Map<java.io.Serializable, DLFileEntryMetadata> fetchByPrimaryKeys( 740 java.util.Set<java.io.Serializable> primaryKeys) { 741 return getPersistence().fetchByPrimaryKeys(primaryKeys); 742 } 743 744 /** 745 * Returns all the document library file entry metadatas. 746 * 747 * @return the document library file entry metadatas 748 */ 749 public static List<DLFileEntryMetadata> findAll() { 750 return getPersistence().findAll(); 751 } 752 753 /** 754 * Returns a range of all the document library file entry metadatas. 755 * 756 * <p> 757 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 758 * </p> 759 * 760 * @param start the lower bound of the range of document library file entry metadatas 761 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 762 * @return the range of document library file entry metadatas 763 */ 764 public static List<DLFileEntryMetadata> findAll(int start, int end) { 765 return getPersistence().findAll(start, end); 766 } 767 768 /** 769 * Returns an ordered range of all the document library file entry metadatas. 770 * 771 * <p> 772 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 773 * </p> 774 * 775 * @param start the lower bound of the range of document library file entry metadatas 776 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 777 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 778 * @return the ordered range of document library file entry metadatas 779 */ 780 public static List<DLFileEntryMetadata> findAll(int start, int end, 781 OrderByComparator<DLFileEntryMetadata> orderByComparator) { 782 return getPersistence().findAll(start, end, orderByComparator); 783 } 784 785 /** 786 * Returns an ordered range of all the document library file entry metadatas. 787 * 788 * <p> 789 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryMetadataModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 790 * </p> 791 * 792 * @param start the lower bound of the range of document library file entry metadatas 793 * @param end the upper bound of the range of document library file entry metadatas (not inclusive) 794 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 795 * @param retrieveFromCache whether to retrieve from the finder cache 796 * @return the ordered range of document library file entry metadatas 797 */ 798 public static List<DLFileEntryMetadata> findAll(int start, int end, 799 OrderByComparator<DLFileEntryMetadata> orderByComparator, 800 boolean retrieveFromCache) { 801 return getPersistence() 802 .findAll(start, end, orderByComparator, retrieveFromCache); 803 } 804 805 /** 806 * Removes all the document library file entry metadatas from the database. 807 */ 808 public static void removeAll() { 809 getPersistence().removeAll(); 810 } 811 812 /** 813 * Returns the number of document library file entry metadatas. 814 * 815 * @return the number of document library file entry metadatas 816 */ 817 public static int countAll() { 818 return getPersistence().countAll(); 819 } 820 821 public static java.util.Set<java.lang.String> getBadColumnNames() { 822 return getPersistence().getBadColumnNames(); 823 } 824 825 public static DLFileEntryMetadataPersistence getPersistence() { 826 if (_persistence == null) { 827 _persistence = (DLFileEntryMetadataPersistence)PortalBeanLocatorUtil.locate(DLFileEntryMetadataPersistence.class.getName()); 828 829 ReferenceRegistry.registerReference(DLFileEntryMetadataUtil.class, 830 "_persistence"); 831 } 832 833 return _persistence; 834 } 835 836 /** 837 * @deprecated As of 6.2.0 838 */ 839 @Deprecated 840 public void setPersistence(DLFileEntryMetadataPersistence persistence) { 841 } 842 843 private static DLFileEntryMetadataPersistence _persistence; 844 }