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.trash.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.trash.model.TrashVersion; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the trash version service. This utility wraps {@link com.liferay.portlet.trash.service.persistence.impl.TrashVersionPersistenceImpl} 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 TrashVersionPersistence 038 * @see com.liferay.portlet.trash.service.persistence.impl.TrashVersionPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class TrashVersionUtil { 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(TrashVersion trashVersion) { 060 getPersistence().clearCache(trashVersion); 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<TrashVersion> 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<TrashVersion> 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<TrashVersion> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<TrashVersion> 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 TrashVersion update(TrashVersion trashVersion) { 101 return getPersistence().update(trashVersion); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static TrashVersion update(TrashVersion trashVersion, 108 ServiceContext serviceContext) { 109 return getPersistence().update(trashVersion, serviceContext); 110 } 111 112 /** 113 * Returns all the trash versions where entryId = ?. 114 * 115 * @param entryId the entry ID 116 * @return the matching trash versions 117 */ 118 public static List<TrashVersion> findByEntryId(long entryId) { 119 return getPersistence().findByEntryId(entryId); 120 } 121 122 /** 123 * Returns a range of all the trash versions where entryId = ?. 124 * 125 * <p> 126 * 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 TrashVersionModelImpl}. 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. 127 * </p> 128 * 129 * @param entryId the entry ID 130 * @param start the lower bound of the range of trash versions 131 * @param end the upper bound of the range of trash versions (not inclusive) 132 * @return the range of matching trash versions 133 */ 134 public static List<TrashVersion> findByEntryId(long entryId, int start, 135 int end) { 136 return getPersistence().findByEntryId(entryId, start, end); 137 } 138 139 /** 140 * Returns an ordered range of all the trash versions where entryId = ?. 141 * 142 * <p> 143 * 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 TrashVersionModelImpl}. 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. 144 * </p> 145 * 146 * @param entryId the entry ID 147 * @param start the lower bound of the range of trash versions 148 * @param end the upper bound of the range of trash versions (not inclusive) 149 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 150 * @return the ordered range of matching trash versions 151 */ 152 public static List<TrashVersion> findByEntryId(long entryId, int start, 153 int end, OrderByComparator<TrashVersion> orderByComparator) { 154 return getPersistence() 155 .findByEntryId(entryId, start, end, orderByComparator); 156 } 157 158 /** 159 * Returns the first trash version in the ordered set where entryId = ?. 160 * 161 * @param entryId the entry ID 162 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 163 * @return the first matching trash version 164 * @throws NoSuchVersionException if a matching trash version could not be found 165 */ 166 public static TrashVersion findByEntryId_First(long entryId, 167 OrderByComparator<TrashVersion> orderByComparator) 168 throws com.liferay.portlet.trash.NoSuchVersionException { 169 return getPersistence().findByEntryId_First(entryId, orderByComparator); 170 } 171 172 /** 173 * Returns the first trash version in the ordered set where entryId = ?. 174 * 175 * @param entryId the entry ID 176 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 177 * @return the first matching trash version, or <code>null</code> if a matching trash version could not be found 178 */ 179 public static TrashVersion fetchByEntryId_First(long entryId, 180 OrderByComparator<TrashVersion> orderByComparator) { 181 return getPersistence().fetchByEntryId_First(entryId, orderByComparator); 182 } 183 184 /** 185 * Returns the last trash version in the ordered set where entryId = ?. 186 * 187 * @param entryId the entry ID 188 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 189 * @return the last matching trash version 190 * @throws NoSuchVersionException if a matching trash version could not be found 191 */ 192 public static TrashVersion findByEntryId_Last(long entryId, 193 OrderByComparator<TrashVersion> orderByComparator) 194 throws com.liferay.portlet.trash.NoSuchVersionException { 195 return getPersistence().findByEntryId_Last(entryId, orderByComparator); 196 } 197 198 /** 199 * Returns the last trash version in the ordered set where entryId = ?. 200 * 201 * @param entryId the entry ID 202 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 203 * @return the last matching trash version, or <code>null</code> if a matching trash version could not be found 204 */ 205 public static TrashVersion fetchByEntryId_Last(long entryId, 206 OrderByComparator<TrashVersion> orderByComparator) { 207 return getPersistence().fetchByEntryId_Last(entryId, orderByComparator); 208 } 209 210 /** 211 * Returns the trash versions before and after the current trash version in the ordered set where entryId = ?. 212 * 213 * @param versionId the primary key of the current trash version 214 * @param entryId the entry ID 215 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 216 * @return the previous, current, and next trash version 217 * @throws NoSuchVersionException if a trash version with the primary key could not be found 218 */ 219 public static TrashVersion[] findByEntryId_PrevAndNext(long versionId, 220 long entryId, OrderByComparator<TrashVersion> orderByComparator) 221 throws com.liferay.portlet.trash.NoSuchVersionException { 222 return getPersistence() 223 .findByEntryId_PrevAndNext(versionId, entryId, 224 orderByComparator); 225 } 226 227 /** 228 * Removes all the trash versions where entryId = ? from the database. 229 * 230 * @param entryId the entry ID 231 */ 232 public static void removeByEntryId(long entryId) { 233 getPersistence().removeByEntryId(entryId); 234 } 235 236 /** 237 * Returns the number of trash versions where entryId = ?. 238 * 239 * @param entryId the entry ID 240 * @return the number of matching trash versions 241 */ 242 public static int countByEntryId(long entryId) { 243 return getPersistence().countByEntryId(entryId); 244 } 245 246 /** 247 * Returns all the trash versions where entryId = ? and classNameId = ?. 248 * 249 * @param entryId the entry ID 250 * @param classNameId the class name ID 251 * @return the matching trash versions 252 */ 253 public static List<TrashVersion> findByE_C(long entryId, long classNameId) { 254 return getPersistence().findByE_C(entryId, classNameId); 255 } 256 257 /** 258 * Returns a range of all the trash versions where entryId = ? and classNameId = ?. 259 * 260 * <p> 261 * 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 TrashVersionModelImpl}. 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. 262 * </p> 263 * 264 * @param entryId the entry ID 265 * @param classNameId the class name ID 266 * @param start the lower bound of the range of trash versions 267 * @param end the upper bound of the range of trash versions (not inclusive) 268 * @return the range of matching trash versions 269 */ 270 public static List<TrashVersion> findByE_C(long entryId, long classNameId, 271 int start, int end) { 272 return getPersistence().findByE_C(entryId, classNameId, start, end); 273 } 274 275 /** 276 * Returns an ordered range of all the trash versions where entryId = ? and classNameId = ?. 277 * 278 * <p> 279 * 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 TrashVersionModelImpl}. 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. 280 * </p> 281 * 282 * @param entryId the entry ID 283 * @param classNameId the class name ID 284 * @param start the lower bound of the range of trash versions 285 * @param end the upper bound of the range of trash versions (not inclusive) 286 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 287 * @return the ordered range of matching trash versions 288 */ 289 public static List<TrashVersion> findByE_C(long entryId, long classNameId, 290 int start, int end, OrderByComparator<TrashVersion> orderByComparator) { 291 return getPersistence() 292 .findByE_C(entryId, classNameId, start, end, 293 orderByComparator); 294 } 295 296 /** 297 * Returns the first trash version in the ordered set where entryId = ? and classNameId = ?. 298 * 299 * @param entryId the entry ID 300 * @param classNameId the class name ID 301 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 302 * @return the first matching trash version 303 * @throws NoSuchVersionException if a matching trash version could not be found 304 */ 305 public static TrashVersion findByE_C_First(long entryId, long classNameId, 306 OrderByComparator<TrashVersion> orderByComparator) 307 throws com.liferay.portlet.trash.NoSuchVersionException { 308 return getPersistence() 309 .findByE_C_First(entryId, classNameId, orderByComparator); 310 } 311 312 /** 313 * Returns the first trash version in the ordered set where entryId = ? and classNameId = ?. 314 * 315 * @param entryId the entry ID 316 * @param classNameId the class name ID 317 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 318 * @return the first matching trash version, or <code>null</code> if a matching trash version could not be found 319 */ 320 public static TrashVersion fetchByE_C_First(long entryId, long classNameId, 321 OrderByComparator<TrashVersion> orderByComparator) { 322 return getPersistence() 323 .fetchByE_C_First(entryId, classNameId, orderByComparator); 324 } 325 326 /** 327 * Returns the last trash version in the ordered set where entryId = ? and classNameId = ?. 328 * 329 * @param entryId the entry ID 330 * @param classNameId the class name ID 331 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 332 * @return the last matching trash version 333 * @throws NoSuchVersionException if a matching trash version could not be found 334 */ 335 public static TrashVersion findByE_C_Last(long entryId, long classNameId, 336 OrderByComparator<TrashVersion> orderByComparator) 337 throws com.liferay.portlet.trash.NoSuchVersionException { 338 return getPersistence() 339 .findByE_C_Last(entryId, classNameId, orderByComparator); 340 } 341 342 /** 343 * Returns the last trash version in the ordered set where entryId = ? and classNameId = ?. 344 * 345 * @param entryId the entry ID 346 * @param classNameId the class name ID 347 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 348 * @return the last matching trash version, or <code>null</code> if a matching trash version could not be found 349 */ 350 public static TrashVersion fetchByE_C_Last(long entryId, long classNameId, 351 OrderByComparator<TrashVersion> orderByComparator) { 352 return getPersistence() 353 .fetchByE_C_Last(entryId, classNameId, orderByComparator); 354 } 355 356 /** 357 * Returns the trash versions before and after the current trash version in the ordered set where entryId = ? and classNameId = ?. 358 * 359 * @param versionId the primary key of the current trash version 360 * @param entryId the entry ID 361 * @param classNameId the class name ID 362 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 363 * @return the previous, current, and next trash version 364 * @throws NoSuchVersionException if a trash version with the primary key could not be found 365 */ 366 public static TrashVersion[] findByE_C_PrevAndNext(long versionId, 367 long entryId, long classNameId, 368 OrderByComparator<TrashVersion> orderByComparator) 369 throws com.liferay.portlet.trash.NoSuchVersionException { 370 return getPersistence() 371 .findByE_C_PrevAndNext(versionId, entryId, classNameId, 372 orderByComparator); 373 } 374 375 /** 376 * Removes all the trash versions where entryId = ? and classNameId = ? from the database. 377 * 378 * @param entryId the entry ID 379 * @param classNameId the class name ID 380 */ 381 public static void removeByE_C(long entryId, long classNameId) { 382 getPersistence().removeByE_C(entryId, classNameId); 383 } 384 385 /** 386 * Returns the number of trash versions where entryId = ? and classNameId = ?. 387 * 388 * @param entryId the entry ID 389 * @param classNameId the class name ID 390 * @return the number of matching trash versions 391 */ 392 public static int countByE_C(long entryId, long classNameId) { 393 return getPersistence().countByE_C(entryId, classNameId); 394 } 395 396 /** 397 * Returns the trash version where classNameId = ? and classPK = ? or throws a {@link NoSuchVersionException} if it could not be found. 398 * 399 * @param classNameId the class name ID 400 * @param classPK the class p k 401 * @return the matching trash version 402 * @throws NoSuchVersionException if a matching trash version could not be found 403 */ 404 public static TrashVersion findByC_C(long classNameId, long classPK) 405 throws com.liferay.portlet.trash.NoSuchVersionException { 406 return getPersistence().findByC_C(classNameId, classPK); 407 } 408 409 /** 410 * Returns the trash version where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 411 * 412 * @param classNameId the class name ID 413 * @param classPK the class p k 414 * @return the matching trash version, or <code>null</code> if a matching trash version could not be found 415 */ 416 public static TrashVersion fetchByC_C(long classNameId, long classPK) { 417 return getPersistence().fetchByC_C(classNameId, classPK); 418 } 419 420 /** 421 * Returns the trash version where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 422 * 423 * @param classNameId the class name ID 424 * @param classPK the class p k 425 * @param retrieveFromCache whether to use the finder cache 426 * @return the matching trash version, or <code>null</code> if a matching trash version could not be found 427 */ 428 public static TrashVersion fetchByC_C(long classNameId, long classPK, 429 boolean retrieveFromCache) { 430 return getPersistence() 431 .fetchByC_C(classNameId, classPK, retrieveFromCache); 432 } 433 434 /** 435 * Removes the trash version where classNameId = ? and classPK = ? from the database. 436 * 437 * @param classNameId the class name ID 438 * @param classPK the class p k 439 * @return the trash version that was removed 440 */ 441 public static TrashVersion removeByC_C(long classNameId, long classPK) 442 throws com.liferay.portlet.trash.NoSuchVersionException { 443 return getPersistence().removeByC_C(classNameId, classPK); 444 } 445 446 /** 447 * Returns the number of trash versions where classNameId = ? and classPK = ?. 448 * 449 * @param classNameId the class name ID 450 * @param classPK the class p k 451 * @return the number of matching trash versions 452 */ 453 public static int countByC_C(long classNameId, long classPK) { 454 return getPersistence().countByC_C(classNameId, classPK); 455 } 456 457 /** 458 * Caches the trash version in the entity cache if it is enabled. 459 * 460 * @param trashVersion the trash version 461 */ 462 public static void cacheResult(TrashVersion trashVersion) { 463 getPersistence().cacheResult(trashVersion); 464 } 465 466 /** 467 * Caches the trash versions in the entity cache if it is enabled. 468 * 469 * @param trashVersions the trash versions 470 */ 471 public static void cacheResult(List<TrashVersion> trashVersions) { 472 getPersistence().cacheResult(trashVersions); 473 } 474 475 /** 476 * Creates a new trash version with the primary key. Does not add the trash version to the database. 477 * 478 * @param versionId the primary key for the new trash version 479 * @return the new trash version 480 */ 481 public static TrashVersion create(long versionId) { 482 return getPersistence().create(versionId); 483 } 484 485 /** 486 * Removes the trash version with the primary key from the database. Also notifies the appropriate model listeners. 487 * 488 * @param versionId the primary key of the trash version 489 * @return the trash version that was removed 490 * @throws NoSuchVersionException if a trash version with the primary key could not be found 491 */ 492 public static TrashVersion remove(long versionId) 493 throws com.liferay.portlet.trash.NoSuchVersionException { 494 return getPersistence().remove(versionId); 495 } 496 497 public static TrashVersion updateImpl(TrashVersion trashVersion) { 498 return getPersistence().updateImpl(trashVersion); 499 } 500 501 /** 502 * Returns the trash version with the primary key or throws a {@link NoSuchVersionException} if it could not be found. 503 * 504 * @param versionId the primary key of the trash version 505 * @return the trash version 506 * @throws NoSuchVersionException if a trash version with the primary key could not be found 507 */ 508 public static TrashVersion findByPrimaryKey(long versionId) 509 throws com.liferay.portlet.trash.NoSuchVersionException { 510 return getPersistence().findByPrimaryKey(versionId); 511 } 512 513 /** 514 * Returns the trash version with the primary key or returns <code>null</code> if it could not be found. 515 * 516 * @param versionId the primary key of the trash version 517 * @return the trash version, or <code>null</code> if a trash version with the primary key could not be found 518 */ 519 public static TrashVersion fetchByPrimaryKey(long versionId) { 520 return getPersistence().fetchByPrimaryKey(versionId); 521 } 522 523 public static java.util.Map<java.io.Serializable, TrashVersion> fetchByPrimaryKeys( 524 java.util.Set<java.io.Serializable> primaryKeys) { 525 return getPersistence().fetchByPrimaryKeys(primaryKeys); 526 } 527 528 /** 529 * Returns all the trash versions. 530 * 531 * @return the trash versions 532 */ 533 public static List<TrashVersion> findAll() { 534 return getPersistence().findAll(); 535 } 536 537 /** 538 * Returns a range of all the trash versions. 539 * 540 * <p> 541 * 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 TrashVersionModelImpl}. 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. 542 * </p> 543 * 544 * @param start the lower bound of the range of trash versions 545 * @param end the upper bound of the range of trash versions (not inclusive) 546 * @return the range of trash versions 547 */ 548 public static List<TrashVersion> findAll(int start, int end) { 549 return getPersistence().findAll(start, end); 550 } 551 552 /** 553 * Returns an ordered range of all the trash versions. 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 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 TrashVersionModelImpl}. 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. 557 * </p> 558 * 559 * @param start the lower bound of the range of trash versions 560 * @param end the upper bound of the range of trash versions (not inclusive) 561 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 562 * @return the ordered range of trash versions 563 */ 564 public static List<TrashVersion> findAll(int start, int end, 565 OrderByComparator<TrashVersion> orderByComparator) { 566 return getPersistence().findAll(start, end, orderByComparator); 567 } 568 569 /** 570 * Removes all the trash versions from the database. 571 */ 572 public static void removeAll() { 573 getPersistence().removeAll(); 574 } 575 576 /** 577 * Returns the number of trash versions. 578 * 579 * @return the number of trash versions 580 */ 581 public static int countAll() { 582 return getPersistence().countAll(); 583 } 584 585 public static TrashVersionPersistence getPersistence() { 586 if (_persistence == null) { 587 _persistence = (TrashVersionPersistence)PortalBeanLocatorUtil.locate(TrashVersionPersistence.class.getName()); 588 589 ReferenceRegistry.registerReference(TrashVersionUtil.class, 590 "_persistence"); 591 } 592 593 return _persistence; 594 } 595 596 /** 597 * @deprecated As of 6.2.0 598 */ 599 @Deprecated 600 public void setPersistence(TrashVersionPersistence persistence) { 601 } 602 603 private static TrashVersionPersistence _persistence; 604 }