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