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.service.persistence.BasePersistence; 020 021 import com.liferay.portlet.trash.model.TrashVersion; 022 023 /** 024 * The persistence interface for the trash version service. 025 * 026 * <p> 027 * Caching information and settings can be found in <code>portal.properties</code> 028 * </p> 029 * 030 * @author Brian Wing Shun Chan 031 * @see TrashVersionPersistenceImpl 032 * @see TrashVersionUtil 033 * @generated 034 */ 035 @ProviderType 036 public interface TrashVersionPersistence extends BasePersistence<TrashVersion> { 037 /* 038 * NOTE FOR DEVELOPERS: 039 * 040 * Never modify or reference this interface directly. Always use {@link TrashVersionUtil} to access the trash version persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 041 */ 042 043 /** 044 * Returns all the trash versions where entryId = ?. 045 * 046 * @param entryId the entry ID 047 * @return the matching trash versions 048 * @throws SystemException if a system exception occurred 049 */ 050 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByEntryId( 051 long entryId) 052 throws com.liferay.portal.kernel.exception.SystemException; 053 054 /** 055 * Returns a range of all the trash versions where entryId = ?. 056 * 057 * <p> 058 * 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. 059 * </p> 060 * 061 * @param entryId the entry ID 062 * @param start the lower bound of the range of trash versions 063 * @param end the upper bound of the range of trash versions (not inclusive) 064 * @return the range of matching trash versions 065 * @throws SystemException if a system exception occurred 066 */ 067 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByEntryId( 068 long entryId, int start, int end) 069 throws com.liferay.portal.kernel.exception.SystemException; 070 071 /** 072 * Returns an ordered range of all the trash versions where entryId = ?. 073 * 074 * <p> 075 * 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. 076 * </p> 077 * 078 * @param entryId the entry ID 079 * @param start the lower bound of the range of trash versions 080 * @param end the upper bound of the range of trash versions (not inclusive) 081 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 082 * @return the ordered range of matching trash versions 083 * @throws SystemException if a system exception occurred 084 */ 085 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByEntryId( 086 long entryId, int start, int end, 087 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 088 throws com.liferay.portal.kernel.exception.SystemException; 089 090 /** 091 * Returns the first trash version in the ordered set where entryId = ?. 092 * 093 * @param entryId the entry ID 094 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 095 * @return the first matching trash version 096 * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found 097 * @throws SystemException if a system exception occurred 098 */ 099 public com.liferay.portlet.trash.model.TrashVersion findByEntryId_First( 100 long entryId, 101 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 102 throws com.liferay.portal.kernel.exception.SystemException, 103 com.liferay.portlet.trash.NoSuchVersionException; 104 105 /** 106 * Returns the first trash version in the ordered set where entryId = ?. 107 * 108 * @param entryId the entry ID 109 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 110 * @return the first matching trash version, or <code>null</code> if a matching trash version could not be found 111 * @throws SystemException if a system exception occurred 112 */ 113 public com.liferay.portlet.trash.model.TrashVersion fetchByEntryId_First( 114 long entryId, 115 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 116 throws com.liferay.portal.kernel.exception.SystemException; 117 118 /** 119 * Returns the last trash version in the ordered set where entryId = ?. 120 * 121 * @param entryId the entry ID 122 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 123 * @return the last matching trash version 124 * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found 125 * @throws SystemException if a system exception occurred 126 */ 127 public com.liferay.portlet.trash.model.TrashVersion findByEntryId_Last( 128 long entryId, 129 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 130 throws com.liferay.portal.kernel.exception.SystemException, 131 com.liferay.portlet.trash.NoSuchVersionException; 132 133 /** 134 * Returns the last trash version in the ordered set where entryId = ?. 135 * 136 * @param entryId the entry ID 137 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 138 * @return the last matching trash version, or <code>null</code> if a matching trash version could not be found 139 * @throws SystemException if a system exception occurred 140 */ 141 public com.liferay.portlet.trash.model.TrashVersion fetchByEntryId_Last( 142 long entryId, 143 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 144 throws com.liferay.portal.kernel.exception.SystemException; 145 146 /** 147 * Returns the trash versions before and after the current trash version in the ordered set where entryId = ?. 148 * 149 * @param versionId the primary key of the current trash version 150 * @param entryId the entry ID 151 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 152 * @return the previous, current, and next trash version 153 * @throws com.liferay.portlet.trash.NoSuchVersionException if a trash version with the primary key could not be found 154 * @throws SystemException if a system exception occurred 155 */ 156 public com.liferay.portlet.trash.model.TrashVersion[] findByEntryId_PrevAndNext( 157 long versionId, long entryId, 158 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 159 throws com.liferay.portal.kernel.exception.SystemException, 160 com.liferay.portlet.trash.NoSuchVersionException; 161 162 /** 163 * Removes all the trash versions where entryId = ? from the database. 164 * 165 * @param entryId the entry ID 166 * @throws SystemException if a system exception occurred 167 */ 168 public void removeByEntryId(long entryId) 169 throws com.liferay.portal.kernel.exception.SystemException; 170 171 /** 172 * Returns the number of trash versions where entryId = ?. 173 * 174 * @param entryId the entry ID 175 * @return the number of matching trash versions 176 * @throws SystemException if a system exception occurred 177 */ 178 public int countByEntryId(long entryId) 179 throws com.liferay.portal.kernel.exception.SystemException; 180 181 /** 182 * Returns all the trash versions where entryId = ? and classNameId = ?. 183 * 184 * @param entryId the entry ID 185 * @param classNameId the class name ID 186 * @return the matching trash versions 187 * @throws SystemException if a system exception occurred 188 */ 189 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByE_C( 190 long entryId, long classNameId) 191 throws com.liferay.portal.kernel.exception.SystemException; 192 193 /** 194 * Returns a range of all the trash versions where entryId = ? and classNameId = ?. 195 * 196 * <p> 197 * 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. 198 * </p> 199 * 200 * @param entryId the entry ID 201 * @param classNameId the class name ID 202 * @param start the lower bound of the range of trash versions 203 * @param end the upper bound of the range of trash versions (not inclusive) 204 * @return the range of matching trash versions 205 * @throws SystemException if a system exception occurred 206 */ 207 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByE_C( 208 long entryId, long classNameId, int start, int end) 209 throws com.liferay.portal.kernel.exception.SystemException; 210 211 /** 212 * Returns an ordered range of all the trash versions where entryId = ? and classNameId = ?. 213 * 214 * <p> 215 * 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. 216 * </p> 217 * 218 * @param entryId the entry ID 219 * @param classNameId the class name ID 220 * @param start the lower bound of the range of trash versions 221 * @param end the upper bound of the range of trash versions (not inclusive) 222 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 223 * @return the ordered range of matching trash versions 224 * @throws SystemException if a system exception occurred 225 */ 226 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByE_C( 227 long entryId, long classNameId, int start, int end, 228 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 229 throws com.liferay.portal.kernel.exception.SystemException; 230 231 /** 232 * Returns the first trash version in the ordered set where entryId = ? and classNameId = ?. 233 * 234 * @param entryId the entry ID 235 * @param classNameId the class name ID 236 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 237 * @return the first matching trash version 238 * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found 239 * @throws SystemException if a system exception occurred 240 */ 241 public com.liferay.portlet.trash.model.TrashVersion findByE_C_First( 242 long entryId, long classNameId, 243 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 244 throws com.liferay.portal.kernel.exception.SystemException, 245 com.liferay.portlet.trash.NoSuchVersionException; 246 247 /** 248 * Returns the first trash version in the ordered set where entryId = ? and classNameId = ?. 249 * 250 * @param entryId the entry ID 251 * @param classNameId the class name ID 252 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 253 * @return the first matching trash version, or <code>null</code> if a matching trash version could not be found 254 * @throws SystemException if a system exception occurred 255 */ 256 public com.liferay.portlet.trash.model.TrashVersion fetchByE_C_First( 257 long entryId, long classNameId, 258 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 259 throws com.liferay.portal.kernel.exception.SystemException; 260 261 /** 262 * Returns the last trash version in the ordered set where entryId = ? and classNameId = ?. 263 * 264 * @param entryId the entry ID 265 * @param classNameId the class name ID 266 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 267 * @return the last matching trash version 268 * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found 269 * @throws SystemException if a system exception occurred 270 */ 271 public com.liferay.portlet.trash.model.TrashVersion findByE_C_Last( 272 long entryId, long classNameId, 273 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 274 throws com.liferay.portal.kernel.exception.SystemException, 275 com.liferay.portlet.trash.NoSuchVersionException; 276 277 /** 278 * Returns the last trash version in the ordered set where entryId = ? and classNameId = ?. 279 * 280 * @param entryId the entry ID 281 * @param classNameId the class name ID 282 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 283 * @return the last matching trash version, or <code>null</code> if a matching trash version could not be found 284 * @throws SystemException if a system exception occurred 285 */ 286 public com.liferay.portlet.trash.model.TrashVersion fetchByE_C_Last( 287 long entryId, long classNameId, 288 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 289 throws com.liferay.portal.kernel.exception.SystemException; 290 291 /** 292 * Returns the trash versions before and after the current trash version in the ordered set where entryId = ? and classNameId = ?. 293 * 294 * @param versionId the primary key of the current trash version 295 * @param entryId the entry ID 296 * @param classNameId the class name ID 297 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 298 * @return the previous, current, and next trash version 299 * @throws com.liferay.portlet.trash.NoSuchVersionException if a trash version with the primary key could not be found 300 * @throws SystemException if a system exception occurred 301 */ 302 public com.liferay.portlet.trash.model.TrashVersion[] findByE_C_PrevAndNext( 303 long versionId, long entryId, long classNameId, 304 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 305 throws com.liferay.portal.kernel.exception.SystemException, 306 com.liferay.portlet.trash.NoSuchVersionException; 307 308 /** 309 * Removes all the trash versions where entryId = ? and classNameId = ? from the database. 310 * 311 * @param entryId the entry ID 312 * @param classNameId the class name ID 313 * @throws SystemException if a system exception occurred 314 */ 315 public void removeByE_C(long entryId, long classNameId) 316 throws com.liferay.portal.kernel.exception.SystemException; 317 318 /** 319 * Returns the number of trash versions where entryId = ? and classNameId = ?. 320 * 321 * @param entryId the entry ID 322 * @param classNameId the class name ID 323 * @return the number of matching trash versions 324 * @throws SystemException if a system exception occurred 325 */ 326 public int countByE_C(long entryId, long classNameId) 327 throws com.liferay.portal.kernel.exception.SystemException; 328 329 /** 330 * Returns all the trash versions where classNameId = ? and classPK = ?. 331 * 332 * @param classNameId the class name ID 333 * @param classPK the class p k 334 * @return the matching trash versions 335 * @throws SystemException if a system exception occurred 336 */ 337 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByC_C( 338 long classNameId, long classPK) 339 throws com.liferay.portal.kernel.exception.SystemException; 340 341 /** 342 * Returns a range of all the trash versions where classNameId = ? and classPK = ?. 343 * 344 * <p> 345 * 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. 346 * </p> 347 * 348 * @param classNameId the class name ID 349 * @param classPK the class p k 350 * @param start the lower bound of the range of trash versions 351 * @param end the upper bound of the range of trash versions (not inclusive) 352 * @return the range of matching trash versions 353 * @throws SystemException if a system exception occurred 354 */ 355 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByC_C( 356 long classNameId, long classPK, int start, int end) 357 throws com.liferay.portal.kernel.exception.SystemException; 358 359 /** 360 * Returns an ordered range of all the trash versions where classNameId = ? and classPK = ?. 361 * 362 * <p> 363 * 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. 364 * </p> 365 * 366 * @param classNameId the class name ID 367 * @param classPK the class p k 368 * @param start the lower bound of the range of trash versions 369 * @param end the upper bound of the range of trash versions (not inclusive) 370 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 371 * @return the ordered range of matching trash versions 372 * @throws SystemException if a system exception occurred 373 */ 374 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByC_C( 375 long classNameId, long classPK, int start, int end, 376 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 377 throws com.liferay.portal.kernel.exception.SystemException; 378 379 /** 380 * Returns the first trash version in the ordered set where classNameId = ? and classPK = ?. 381 * 382 * @param classNameId the class name ID 383 * @param classPK the class p k 384 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 385 * @return the first matching trash version 386 * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found 387 * @throws SystemException if a system exception occurred 388 */ 389 public com.liferay.portlet.trash.model.TrashVersion findByC_C_First( 390 long classNameId, long classPK, 391 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 392 throws com.liferay.portal.kernel.exception.SystemException, 393 com.liferay.portlet.trash.NoSuchVersionException; 394 395 /** 396 * Returns the first trash version in the ordered set where classNameId = ? and classPK = ?. 397 * 398 * @param classNameId the class name ID 399 * @param classPK the class p k 400 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 401 * @return the first matching trash version, or <code>null</code> if a matching trash version could not be found 402 * @throws SystemException if a system exception occurred 403 */ 404 public com.liferay.portlet.trash.model.TrashVersion fetchByC_C_First( 405 long classNameId, long classPK, 406 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 407 throws com.liferay.portal.kernel.exception.SystemException; 408 409 /** 410 * Returns the last trash version in the ordered set where classNameId = ? and classPK = ?. 411 * 412 * @param classNameId the class name ID 413 * @param classPK the class p k 414 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 415 * @return the last matching trash version 416 * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found 417 * @throws SystemException if a system exception occurred 418 */ 419 public com.liferay.portlet.trash.model.TrashVersion findByC_C_Last( 420 long classNameId, long classPK, 421 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 422 throws com.liferay.portal.kernel.exception.SystemException, 423 com.liferay.portlet.trash.NoSuchVersionException; 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, or <code>null</code> if a matching trash version could not be found 432 * @throws SystemException if a system exception occurred 433 */ 434 public com.liferay.portlet.trash.model.TrashVersion fetchByC_C_Last( 435 long classNameId, long classPK, 436 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 437 throws com.liferay.portal.kernel.exception.SystemException; 438 439 /** 440 * Returns the trash versions before and after the current trash version in the ordered set where classNameId = ? and classPK = ?. 441 * 442 * @param versionId the primary key of the current trash version 443 * @param classNameId the class name ID 444 * @param classPK the class p k 445 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 446 * @return the previous, current, and next trash version 447 * @throws com.liferay.portlet.trash.NoSuchVersionException if a trash version with the primary key could not be found 448 * @throws SystemException if a system exception occurred 449 */ 450 public com.liferay.portlet.trash.model.TrashVersion[] findByC_C_PrevAndNext( 451 long versionId, long classNameId, long classPK, 452 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 453 throws com.liferay.portal.kernel.exception.SystemException, 454 com.liferay.portlet.trash.NoSuchVersionException; 455 456 /** 457 * Removes all the trash versions where classNameId = ? and classPK = ? from the database. 458 * 459 * @param classNameId the class name ID 460 * @param classPK the class p k 461 * @throws SystemException if a system exception occurred 462 */ 463 public void removeByC_C(long classNameId, long classPK) 464 throws com.liferay.portal.kernel.exception.SystemException; 465 466 /** 467 * Returns the number of trash versions where classNameId = ? and classPK = ?. 468 * 469 * @param classNameId the class name ID 470 * @param classPK the class p k 471 * @return the number of matching trash versions 472 * @throws SystemException if a system exception occurred 473 */ 474 public int countByC_C(long classNameId, long classPK) 475 throws com.liferay.portal.kernel.exception.SystemException; 476 477 /** 478 * 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. 479 * 480 * @param entryId the entry ID 481 * @param classNameId the class name ID 482 * @param classPK the class p k 483 * @return the matching trash version 484 * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found 485 * @throws SystemException if a system exception occurred 486 */ 487 public com.liferay.portlet.trash.model.TrashVersion findByE_C_C( 488 long entryId, long classNameId, long classPK) 489 throws com.liferay.portal.kernel.exception.SystemException, 490 com.liferay.portlet.trash.NoSuchVersionException; 491 492 /** 493 * 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. 494 * 495 * @param entryId the entry ID 496 * @param classNameId the class name ID 497 * @param classPK the class p k 498 * @return the matching trash version, or <code>null</code> if a matching trash version could not be found 499 * @throws SystemException if a system exception occurred 500 */ 501 public com.liferay.portlet.trash.model.TrashVersion fetchByE_C_C( 502 long entryId, long classNameId, long classPK) 503 throws com.liferay.portal.kernel.exception.SystemException; 504 505 /** 506 * 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. 507 * 508 * @param entryId the entry ID 509 * @param classNameId the class name ID 510 * @param classPK the class p k 511 * @param retrieveFromCache whether to use the finder cache 512 * @return the matching trash version, or <code>null</code> if a matching trash version could not be found 513 * @throws SystemException if a system exception occurred 514 */ 515 public com.liferay.portlet.trash.model.TrashVersion fetchByE_C_C( 516 long entryId, long classNameId, long classPK, boolean retrieveFromCache) 517 throws com.liferay.portal.kernel.exception.SystemException; 518 519 /** 520 * Removes the trash version where entryId = ? and classNameId = ? and classPK = ? from the database. 521 * 522 * @param entryId the entry ID 523 * @param classNameId the class name ID 524 * @param classPK the class p k 525 * @return the trash version that was removed 526 * @throws SystemException if a system exception occurred 527 */ 528 public com.liferay.portlet.trash.model.TrashVersion removeByE_C_C( 529 long entryId, long classNameId, long classPK) 530 throws com.liferay.portal.kernel.exception.SystemException, 531 com.liferay.portlet.trash.NoSuchVersionException; 532 533 /** 534 * Returns the number of trash versions where entryId = ? and classNameId = ? and classPK = ?. 535 * 536 * @param entryId the entry ID 537 * @param classNameId the class name ID 538 * @param classPK the class p k 539 * @return the number of matching trash versions 540 * @throws SystemException if a system exception occurred 541 */ 542 public int countByE_C_C(long entryId, long classNameId, long classPK) 543 throws com.liferay.portal.kernel.exception.SystemException; 544 545 /** 546 * Caches the trash version in the entity cache if it is enabled. 547 * 548 * @param trashVersion the trash version 549 */ 550 public void cacheResult( 551 com.liferay.portlet.trash.model.TrashVersion trashVersion); 552 553 /** 554 * Caches the trash versions in the entity cache if it is enabled. 555 * 556 * @param trashVersions the trash versions 557 */ 558 public void cacheResult( 559 java.util.List<com.liferay.portlet.trash.model.TrashVersion> trashVersions); 560 561 /** 562 * Creates a new trash version with the primary key. Does not add the trash version to the database. 563 * 564 * @param versionId the primary key for the new trash version 565 * @return the new trash version 566 */ 567 public com.liferay.portlet.trash.model.TrashVersion create(long versionId); 568 569 /** 570 * Removes the trash version with the primary key from the database. Also notifies the appropriate model listeners. 571 * 572 * @param versionId the primary key of the trash version 573 * @return the trash version that was removed 574 * @throws com.liferay.portlet.trash.NoSuchVersionException if a trash version with the primary key could not be found 575 * @throws SystemException if a system exception occurred 576 */ 577 public com.liferay.portlet.trash.model.TrashVersion remove(long versionId) 578 throws com.liferay.portal.kernel.exception.SystemException, 579 com.liferay.portlet.trash.NoSuchVersionException; 580 581 public com.liferay.portlet.trash.model.TrashVersion updateImpl( 582 com.liferay.portlet.trash.model.TrashVersion trashVersion) 583 throws com.liferay.portal.kernel.exception.SystemException; 584 585 /** 586 * Returns the trash version with the primary key or throws a {@link com.liferay.portlet.trash.NoSuchVersionException} if it could not be found. 587 * 588 * @param versionId the primary key of the trash version 589 * @return the trash version 590 * @throws com.liferay.portlet.trash.NoSuchVersionException if a trash version with the primary key could not be found 591 * @throws SystemException if a system exception occurred 592 */ 593 public com.liferay.portlet.trash.model.TrashVersion findByPrimaryKey( 594 long versionId) 595 throws com.liferay.portal.kernel.exception.SystemException, 596 com.liferay.portlet.trash.NoSuchVersionException; 597 598 /** 599 * Returns the trash version with the primary key or returns <code>null</code> if it could not be found. 600 * 601 * @param versionId the primary key of the trash version 602 * @return the trash version, or <code>null</code> if a trash version with the primary key could not be found 603 * @throws SystemException if a system exception occurred 604 */ 605 public com.liferay.portlet.trash.model.TrashVersion fetchByPrimaryKey( 606 long versionId) 607 throws com.liferay.portal.kernel.exception.SystemException; 608 609 /** 610 * Returns all the trash versions. 611 * 612 * @return the trash versions 613 * @throws SystemException if a system exception occurred 614 */ 615 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findAll() 616 throws com.liferay.portal.kernel.exception.SystemException; 617 618 /** 619 * Returns a range of all the trash versions. 620 * 621 * <p> 622 * 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. 623 * </p> 624 * 625 * @param start the lower bound of the range of trash versions 626 * @param end the upper bound of the range of trash versions (not inclusive) 627 * @return the range of trash versions 628 * @throws SystemException if a system exception occurred 629 */ 630 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findAll( 631 int start, int end) 632 throws com.liferay.portal.kernel.exception.SystemException; 633 634 /** 635 * Returns an ordered range of all the trash versions. 636 * 637 * <p> 638 * 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. 639 * </p> 640 * 641 * @param start the lower bound of the range of trash versions 642 * @param end the upper bound of the range of trash versions (not inclusive) 643 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 644 * @return the ordered range of trash versions 645 * @throws SystemException if a system exception occurred 646 */ 647 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findAll( 648 int start, int end, 649 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 650 throws com.liferay.portal.kernel.exception.SystemException; 651 652 /** 653 * Removes all the trash versions from the database. 654 * 655 * @throws SystemException if a system exception occurred 656 */ 657 public void removeAll() 658 throws com.liferay.portal.kernel.exception.SystemException; 659 660 /** 661 * Returns the number of trash versions. 662 * 663 * @return the number of trash versions 664 * @throws SystemException if a system exception occurred 665 */ 666 public int countAll() 667 throws com.liferay.portal.kernel.exception.SystemException; 668 }