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