001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.trash.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.service.persistence.BasePersistence; 020 021 import com.liferay.portlet.trash.model.TrashEntry; 022 023 /** 024 * The persistence interface for the trash entry 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 com.liferay.portlet.trash.service.persistence.impl.TrashEntryPersistenceImpl 032 * @see TrashEntryUtil 033 * @generated 034 */ 035 @ProviderType 036 public interface TrashEntryPersistence extends BasePersistence<TrashEntry> { 037 /* 038 * NOTE FOR DEVELOPERS: 039 * 040 * Never modify or reference this interface directly. Always use {@link TrashEntryUtil} to access the trash entry persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 041 */ 042 043 /** 044 * Returns all the trash entries where groupId = ?. 045 * 046 * @param groupId the group ID 047 * @return the matching trash entries 048 */ 049 public java.util.List<TrashEntry> findByGroupId(long groupId); 050 051 /** 052 * Returns a range of all the trash entries where groupId = ?. 053 * 054 * <p> 055 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TrashEntryModelImpl}. 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. 056 * </p> 057 * 058 * @param groupId the group ID 059 * @param start the lower bound of the range of trash entries 060 * @param end the upper bound of the range of trash entries (not inclusive) 061 * @return the range of matching trash entries 062 */ 063 public java.util.List<TrashEntry> findByGroupId(long groupId, int start, 064 int end); 065 066 /** 067 * Returns an ordered range of all the trash entries where groupId = ?. 068 * 069 * <p> 070 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TrashEntryModelImpl}. 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. 071 * </p> 072 * 073 * @param groupId the group ID 074 * @param start the lower bound of the range of trash entries 075 * @param end the upper bound of the range of trash entries (not inclusive) 076 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 077 * @return the ordered range of matching trash entries 078 */ 079 public java.util.List<TrashEntry> findByGroupId(long groupId, int start, 080 int end, 081 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 082 083 /** 084 * Returns the first trash entry in the ordered set where groupId = ?. 085 * 086 * @param groupId the group ID 087 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 088 * @return the first matching trash entry 089 * @throws NoSuchEntryException if a matching trash entry could not be found 090 */ 091 public TrashEntry findByGroupId_First(long groupId, 092 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 093 throws com.liferay.portlet.trash.NoSuchEntryException; 094 095 /** 096 * Returns the first trash entry in the ordered set where groupId = ?. 097 * 098 * @param groupId the group ID 099 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 100 * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found 101 */ 102 public TrashEntry fetchByGroupId_First(long groupId, 103 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 104 105 /** 106 * Returns the last trash entry in the ordered set where groupId = ?. 107 * 108 * @param groupId the group ID 109 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 110 * @return the last matching trash entry 111 * @throws NoSuchEntryException if a matching trash entry could not be found 112 */ 113 public TrashEntry findByGroupId_Last(long groupId, 114 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 115 throws com.liferay.portlet.trash.NoSuchEntryException; 116 117 /** 118 * Returns the last trash entry in the ordered set where groupId = ?. 119 * 120 * @param groupId the group ID 121 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 122 * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found 123 */ 124 public TrashEntry fetchByGroupId_Last(long groupId, 125 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 126 127 /** 128 * Returns the trash entries before and after the current trash entry in the ordered set where groupId = ?. 129 * 130 * @param entryId the primary key of the current trash entry 131 * @param groupId the group ID 132 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 133 * @return the previous, current, and next trash entry 134 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 135 */ 136 public TrashEntry[] findByGroupId_PrevAndNext(long entryId, long groupId, 137 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 138 throws com.liferay.portlet.trash.NoSuchEntryException; 139 140 /** 141 * Removes all the trash entries where groupId = ? from the database. 142 * 143 * @param groupId the group ID 144 */ 145 public void removeByGroupId(long groupId); 146 147 /** 148 * Returns the number of trash entries where groupId = ?. 149 * 150 * @param groupId the group ID 151 * @return the number of matching trash entries 152 */ 153 public int countByGroupId(long groupId); 154 155 /** 156 * Returns all the trash entries where companyId = ?. 157 * 158 * @param companyId the company ID 159 * @return the matching trash entries 160 */ 161 public java.util.List<TrashEntry> findByCompanyId(long companyId); 162 163 /** 164 * Returns a range of all the trash entries where companyId = ?. 165 * 166 * <p> 167 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TrashEntryModelImpl}. 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. 168 * </p> 169 * 170 * @param companyId the company ID 171 * @param start the lower bound of the range of trash entries 172 * @param end the upper bound of the range of trash entries (not inclusive) 173 * @return the range of matching trash entries 174 */ 175 public java.util.List<TrashEntry> findByCompanyId(long companyId, 176 int start, int end); 177 178 /** 179 * Returns an ordered range of all the trash entries where companyId = ?. 180 * 181 * <p> 182 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TrashEntryModelImpl}. 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. 183 * </p> 184 * 185 * @param companyId the company ID 186 * @param start the lower bound of the range of trash entries 187 * @param end the upper bound of the range of trash entries (not inclusive) 188 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 189 * @return the ordered range of matching trash entries 190 */ 191 public java.util.List<TrashEntry> findByCompanyId(long companyId, 192 int start, int end, 193 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 194 195 /** 196 * Returns the first trash entry in the ordered set where companyId = ?. 197 * 198 * @param companyId the company ID 199 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 200 * @return the first matching trash entry 201 * @throws NoSuchEntryException if a matching trash entry could not be found 202 */ 203 public TrashEntry findByCompanyId_First(long companyId, 204 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 205 throws com.liferay.portlet.trash.NoSuchEntryException; 206 207 /** 208 * Returns the first trash entry in the ordered set where companyId = ?. 209 * 210 * @param companyId the company ID 211 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 212 * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found 213 */ 214 public TrashEntry fetchByCompanyId_First(long companyId, 215 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 216 217 /** 218 * Returns the last trash entry in the ordered set where companyId = ?. 219 * 220 * @param companyId the company ID 221 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 222 * @return the last matching trash entry 223 * @throws NoSuchEntryException if a matching trash entry could not be found 224 */ 225 public TrashEntry findByCompanyId_Last(long companyId, 226 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 227 throws com.liferay.portlet.trash.NoSuchEntryException; 228 229 /** 230 * Returns the last trash entry in the ordered set where companyId = ?. 231 * 232 * @param companyId the company ID 233 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 234 * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found 235 */ 236 public TrashEntry fetchByCompanyId_Last(long companyId, 237 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 238 239 /** 240 * Returns the trash entries before and after the current trash entry in the ordered set where companyId = ?. 241 * 242 * @param entryId the primary key of the current trash entry 243 * @param companyId the company ID 244 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 245 * @return the previous, current, and next trash entry 246 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 247 */ 248 public TrashEntry[] findByCompanyId_PrevAndNext(long entryId, 249 long companyId, 250 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 251 throws com.liferay.portlet.trash.NoSuchEntryException; 252 253 /** 254 * Removes all the trash entries where companyId = ? from the database. 255 * 256 * @param companyId the company ID 257 */ 258 public void removeByCompanyId(long companyId); 259 260 /** 261 * Returns the number of trash entries where companyId = ?. 262 * 263 * @param companyId the company ID 264 * @return the number of matching trash entries 265 */ 266 public int countByCompanyId(long companyId); 267 268 /** 269 * Returns all the trash entries where groupId = ? and createDate < ?. 270 * 271 * @param groupId the group ID 272 * @param createDate the create date 273 * @return the matching trash entries 274 */ 275 public java.util.List<TrashEntry> findByG_LtCD(long groupId, 276 java.util.Date createDate); 277 278 /** 279 * Returns a range of all the trash entries where groupId = ? and createDate < ?. 280 * 281 * <p> 282 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TrashEntryModelImpl}. 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. 283 * </p> 284 * 285 * @param groupId the group ID 286 * @param createDate the create date 287 * @param start the lower bound of the range of trash entries 288 * @param end the upper bound of the range of trash entries (not inclusive) 289 * @return the range of matching trash entries 290 */ 291 public java.util.List<TrashEntry> findByG_LtCD(long groupId, 292 java.util.Date createDate, int start, int end); 293 294 /** 295 * Returns an ordered range of all the trash entries where groupId = ? and createDate < ?. 296 * 297 * <p> 298 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TrashEntryModelImpl}. 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. 299 * </p> 300 * 301 * @param groupId the group ID 302 * @param createDate the create date 303 * @param start the lower bound of the range of trash entries 304 * @param end the upper bound of the range of trash entries (not inclusive) 305 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 306 * @return the ordered range of matching trash entries 307 */ 308 public java.util.List<TrashEntry> findByG_LtCD(long groupId, 309 java.util.Date createDate, int start, int end, 310 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 311 312 /** 313 * Returns the first trash entry in the ordered set where groupId = ? and createDate < ?. 314 * 315 * @param groupId the group ID 316 * @param createDate the create date 317 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 318 * @return the first matching trash entry 319 * @throws NoSuchEntryException if a matching trash entry could not be found 320 */ 321 public TrashEntry findByG_LtCD_First(long groupId, 322 java.util.Date createDate, 323 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 324 throws com.liferay.portlet.trash.NoSuchEntryException; 325 326 /** 327 * Returns the first trash entry in the ordered set where groupId = ? and createDate < ?. 328 * 329 * @param groupId the group ID 330 * @param createDate the create date 331 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 332 * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found 333 */ 334 public TrashEntry fetchByG_LtCD_First(long groupId, 335 java.util.Date createDate, 336 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 337 338 /** 339 * Returns the last trash entry in the ordered set where groupId = ? and createDate < ?. 340 * 341 * @param groupId the group ID 342 * @param createDate the create date 343 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 344 * @return the last matching trash entry 345 * @throws NoSuchEntryException if a matching trash entry could not be found 346 */ 347 public TrashEntry findByG_LtCD_Last(long groupId, 348 java.util.Date createDate, 349 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 350 throws com.liferay.portlet.trash.NoSuchEntryException; 351 352 /** 353 * Returns the last trash entry in the ordered set where groupId = ? and createDate < ?. 354 * 355 * @param groupId the group ID 356 * @param createDate the create date 357 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 358 * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found 359 */ 360 public TrashEntry fetchByG_LtCD_Last(long groupId, 361 java.util.Date createDate, 362 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 363 364 /** 365 * Returns the trash entries before and after the current trash entry in the ordered set where groupId = ? and createDate < ?. 366 * 367 * @param entryId the primary key of the current trash entry 368 * @param groupId the group ID 369 * @param createDate the create date 370 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 371 * @return the previous, current, and next trash entry 372 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 373 */ 374 public TrashEntry[] findByG_LtCD_PrevAndNext(long entryId, long groupId, 375 java.util.Date createDate, 376 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 377 throws com.liferay.portlet.trash.NoSuchEntryException; 378 379 /** 380 * Removes all the trash entries where groupId = ? and createDate < ? from the database. 381 * 382 * @param groupId the group ID 383 * @param createDate the create date 384 */ 385 public void removeByG_LtCD(long groupId, java.util.Date createDate); 386 387 /** 388 * Returns the number of trash entries where groupId = ? and createDate < ?. 389 * 390 * @param groupId the group ID 391 * @param createDate the create date 392 * @return the number of matching trash entries 393 */ 394 public int countByG_LtCD(long groupId, java.util.Date createDate); 395 396 /** 397 * Returns all the trash entries where groupId = ? and classNameId = ?. 398 * 399 * @param groupId the group ID 400 * @param classNameId the class name ID 401 * @return the matching trash entries 402 */ 403 public java.util.List<TrashEntry> findByG_C(long groupId, long classNameId); 404 405 /** 406 * Returns a range of all the trash entries where groupId = ? and classNameId = ?. 407 * 408 * <p> 409 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TrashEntryModelImpl}. 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. 410 * </p> 411 * 412 * @param groupId the group ID 413 * @param classNameId the class name ID 414 * @param start the lower bound of the range of trash entries 415 * @param end the upper bound of the range of trash entries (not inclusive) 416 * @return the range of matching trash entries 417 */ 418 public java.util.List<TrashEntry> findByG_C(long groupId, long classNameId, 419 int start, int end); 420 421 /** 422 * Returns an ordered range of all the trash entries where groupId = ? and classNameId = ?. 423 * 424 * <p> 425 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TrashEntryModelImpl}. 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. 426 * </p> 427 * 428 * @param groupId the group ID 429 * @param classNameId the class name ID 430 * @param start the lower bound of the range of trash entries 431 * @param end the upper bound of the range of trash entries (not inclusive) 432 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 433 * @return the ordered range of matching trash entries 434 */ 435 public java.util.List<TrashEntry> findByG_C(long groupId, long classNameId, 436 int start, int end, 437 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 438 439 /** 440 * Returns the first trash entry in the ordered set where groupId = ? and classNameId = ?. 441 * 442 * @param groupId the group ID 443 * @param classNameId the class name ID 444 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 445 * @return the first matching trash entry 446 * @throws NoSuchEntryException if a matching trash entry could not be found 447 */ 448 public TrashEntry findByG_C_First(long groupId, long classNameId, 449 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 450 throws com.liferay.portlet.trash.NoSuchEntryException; 451 452 /** 453 * Returns the first trash entry in the ordered set where groupId = ? and classNameId = ?. 454 * 455 * @param groupId the group ID 456 * @param classNameId the class name ID 457 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 458 * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found 459 */ 460 public TrashEntry fetchByG_C_First(long groupId, long classNameId, 461 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 462 463 /** 464 * Returns the last trash entry in the ordered set where groupId = ? and classNameId = ?. 465 * 466 * @param groupId the group ID 467 * @param classNameId the class name ID 468 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 469 * @return the last matching trash entry 470 * @throws NoSuchEntryException if a matching trash entry could not be found 471 */ 472 public TrashEntry findByG_C_Last(long groupId, long classNameId, 473 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 474 throws com.liferay.portlet.trash.NoSuchEntryException; 475 476 /** 477 * Returns the last trash entry in the ordered set where groupId = ? and classNameId = ?. 478 * 479 * @param groupId the group ID 480 * @param classNameId the class name ID 481 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 482 * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found 483 */ 484 public TrashEntry fetchByG_C_Last(long groupId, long classNameId, 485 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 486 487 /** 488 * Returns the trash entries before and after the current trash entry in the ordered set where groupId = ? and classNameId = ?. 489 * 490 * @param entryId the primary key of the current trash entry 491 * @param groupId the group ID 492 * @param classNameId the class name ID 493 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 494 * @return the previous, current, and next trash entry 495 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 496 */ 497 public TrashEntry[] findByG_C_PrevAndNext(long entryId, long groupId, 498 long classNameId, 499 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator) 500 throws com.liferay.portlet.trash.NoSuchEntryException; 501 502 /** 503 * Removes all the trash entries where groupId = ? and classNameId = ? from the database. 504 * 505 * @param groupId the group ID 506 * @param classNameId the class name ID 507 */ 508 public void removeByG_C(long groupId, long classNameId); 509 510 /** 511 * Returns the number of trash entries where groupId = ? and classNameId = ?. 512 * 513 * @param groupId the group ID 514 * @param classNameId the class name ID 515 * @return the number of matching trash entries 516 */ 517 public int countByG_C(long groupId, long classNameId); 518 519 /** 520 * Returns the trash entry where classNameId = ? and classPK = ? or throws a {@link NoSuchEntryException} if it could not be found. 521 * 522 * @param classNameId the class name ID 523 * @param classPK the class p k 524 * @return the matching trash entry 525 * @throws NoSuchEntryException if a matching trash entry could not be found 526 */ 527 public TrashEntry findByC_C(long classNameId, long classPK) 528 throws com.liferay.portlet.trash.NoSuchEntryException; 529 530 /** 531 * Returns the trash entry where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 532 * 533 * @param classNameId the class name ID 534 * @param classPK the class p k 535 * @return the matching trash entry, or <code>null</code> if a matching trash entry could not be found 536 */ 537 public TrashEntry fetchByC_C(long classNameId, long classPK); 538 539 /** 540 * Returns the trash entry where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 541 * 542 * @param classNameId the class name ID 543 * @param classPK the class p k 544 * @param retrieveFromCache whether to use the finder cache 545 * @return the matching trash entry, or <code>null</code> if a matching trash entry could not be found 546 */ 547 public TrashEntry fetchByC_C(long classNameId, long classPK, 548 boolean retrieveFromCache); 549 550 /** 551 * Removes the trash entry where classNameId = ? and classPK = ? from the database. 552 * 553 * @param classNameId the class name ID 554 * @param classPK the class p k 555 * @return the trash entry that was removed 556 */ 557 public TrashEntry removeByC_C(long classNameId, long classPK) 558 throws com.liferay.portlet.trash.NoSuchEntryException; 559 560 /** 561 * Returns the number of trash entries where classNameId = ? and classPK = ?. 562 * 563 * @param classNameId the class name ID 564 * @param classPK the class p k 565 * @return the number of matching trash entries 566 */ 567 public int countByC_C(long classNameId, long classPK); 568 569 /** 570 * Caches the trash entry in the entity cache if it is enabled. 571 * 572 * @param trashEntry the trash entry 573 */ 574 public void cacheResult(TrashEntry trashEntry); 575 576 /** 577 * Caches the trash entries in the entity cache if it is enabled. 578 * 579 * @param trashEntries the trash entries 580 */ 581 public void cacheResult(java.util.List<TrashEntry> trashEntries); 582 583 /** 584 * Creates a new trash entry with the primary key. Does not add the trash entry to the database. 585 * 586 * @param entryId the primary key for the new trash entry 587 * @return the new trash entry 588 */ 589 public TrashEntry create(long entryId); 590 591 /** 592 * Removes the trash entry with the primary key from the database. Also notifies the appropriate model listeners. 593 * 594 * @param entryId the primary key of the trash entry 595 * @return the trash entry that was removed 596 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 597 */ 598 public TrashEntry remove(long entryId) 599 throws com.liferay.portlet.trash.NoSuchEntryException; 600 601 public TrashEntry updateImpl(TrashEntry trashEntry); 602 603 /** 604 * Returns the trash entry with the primary key or throws a {@link NoSuchEntryException} if it could not be found. 605 * 606 * @param entryId the primary key of the trash entry 607 * @return the trash entry 608 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 609 */ 610 public TrashEntry findByPrimaryKey(long entryId) 611 throws com.liferay.portlet.trash.NoSuchEntryException; 612 613 /** 614 * Returns the trash entry with the primary key or returns <code>null</code> if it could not be found. 615 * 616 * @param entryId the primary key of the trash entry 617 * @return the trash entry, or <code>null</code> if a trash entry with the primary key could not be found 618 */ 619 public TrashEntry fetchByPrimaryKey(long entryId); 620 621 @Override 622 public java.util.Map<java.io.Serializable, TrashEntry> fetchByPrimaryKeys( 623 java.util.Set<java.io.Serializable> primaryKeys); 624 625 /** 626 * Returns all the trash entries. 627 * 628 * @return the trash entries 629 */ 630 public java.util.List<TrashEntry> findAll(); 631 632 /** 633 * Returns a range of all the trash entries. 634 * 635 * <p> 636 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TrashEntryModelImpl}. 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. 637 * </p> 638 * 639 * @param start the lower bound of the range of trash entries 640 * @param end the upper bound of the range of trash entries (not inclusive) 641 * @return the range of trash entries 642 */ 643 public java.util.List<TrashEntry> findAll(int start, int end); 644 645 /** 646 * Returns an ordered range of all the trash entries. 647 * 648 * <p> 649 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TrashEntryModelImpl}. 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. 650 * </p> 651 * 652 * @param start the lower bound of the range of trash entries 653 * @param end the upper bound of the range of trash entries (not inclusive) 654 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 655 * @return the ordered range of trash entries 656 */ 657 public java.util.List<TrashEntry> findAll(int start, int end, 658 com.liferay.portal.kernel.util.OrderByComparator<TrashEntry> orderByComparator); 659 660 /** 661 * Removes all the trash entries from the database. 662 */ 663 public void removeAll(); 664 665 /** 666 * Returns the number of trash entries. 667 * 668 * @return the number of trash entries 669 */ 670 public int countAll(); 671 }