001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.trash.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.trash.model.TrashEntry; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the trash entry service. This utility wraps {@link TrashEntryPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see TrashEntryPersistence 037 * @see TrashEntryPersistenceImpl 038 * @generated 039 */ 040 public class TrashEntryUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(TrashEntry trashEntry) { 058 getPersistence().clearCache(trashEntry); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<TrashEntry> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<TrashEntry> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<TrashEntry> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static TrashEntry update(TrashEntry trashEntry) 101 throws SystemException { 102 return getPersistence().update(trashEntry); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 107 */ 108 public static TrashEntry update(TrashEntry trashEntry, 109 ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(trashEntry, serviceContext); 111 } 112 113 /** 114 * Caches the trash entry in the entity cache if it is enabled. 115 * 116 * @param trashEntry the trash entry 117 */ 118 public static void cacheResult( 119 com.liferay.portlet.trash.model.TrashEntry trashEntry) { 120 getPersistence().cacheResult(trashEntry); 121 } 122 123 /** 124 * Caches the trash entries in the entity cache if it is enabled. 125 * 126 * @param trashEntries the trash entries 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portlet.trash.model.TrashEntry> trashEntries) { 130 getPersistence().cacheResult(trashEntries); 131 } 132 133 /** 134 * Creates a new trash entry with the primary key. Does not add the trash entry to the database. 135 * 136 * @param entryId the primary key for the new trash entry 137 * @return the new trash entry 138 */ 139 public static com.liferay.portlet.trash.model.TrashEntry create( 140 long entryId) { 141 return getPersistence().create(entryId); 142 } 143 144 /** 145 * Removes the trash entry with the primary key from the database. Also notifies the appropriate model listeners. 146 * 147 * @param entryId the primary key of the trash entry 148 * @return the trash entry that was removed 149 * @throws com.liferay.portlet.trash.NoSuchEntryException if a trash entry with the primary key could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 public static com.liferay.portlet.trash.model.TrashEntry remove( 153 long entryId) 154 throws com.liferay.portal.kernel.exception.SystemException, 155 com.liferay.portlet.trash.NoSuchEntryException { 156 return getPersistence().remove(entryId); 157 } 158 159 public static com.liferay.portlet.trash.model.TrashEntry updateImpl( 160 com.liferay.portlet.trash.model.TrashEntry trashEntry) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence().updateImpl(trashEntry); 163 } 164 165 /** 166 * Returns the trash entry with the primary key or throws a {@link com.liferay.portlet.trash.NoSuchEntryException} if it could not be found. 167 * 168 * @param entryId the primary key of the trash entry 169 * @return the trash entry 170 * @throws com.liferay.portlet.trash.NoSuchEntryException if a trash entry with the primary key could not be found 171 * @throws SystemException if a system exception occurred 172 */ 173 public static com.liferay.portlet.trash.model.TrashEntry findByPrimaryKey( 174 long entryId) 175 throws com.liferay.portal.kernel.exception.SystemException, 176 com.liferay.portlet.trash.NoSuchEntryException { 177 return getPersistence().findByPrimaryKey(entryId); 178 } 179 180 /** 181 * Returns the trash entry with the primary key or returns <code>null</code> if it could not be found. 182 * 183 * @param entryId the primary key of the trash entry 184 * @return the trash entry, or <code>null</code> if a trash entry with the primary key could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public static com.liferay.portlet.trash.model.TrashEntry fetchByPrimaryKey( 188 long entryId) 189 throws com.liferay.portal.kernel.exception.SystemException { 190 return getPersistence().fetchByPrimaryKey(entryId); 191 } 192 193 /** 194 * Returns all the trash entries where groupId = ?. 195 * 196 * @param groupId the group ID 197 * @return the matching trash entries 198 * @throws SystemException if a system exception occurred 199 */ 200 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByGroupId( 201 long groupId) 202 throws com.liferay.portal.kernel.exception.SystemException { 203 return getPersistence().findByGroupId(groupId); 204 } 205 206 /** 207 * Returns a range of all the trash entries where groupId = ?. 208 * 209 * <p> 210 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 211 * </p> 212 * 213 * @param groupId the group ID 214 * @param start the lower bound of the range of trash entries 215 * @param end the upper bound of the range of trash entries (not inclusive) 216 * @return the range of matching trash entries 217 * @throws SystemException if a system exception occurred 218 */ 219 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByGroupId( 220 long groupId, int start, int end) 221 throws com.liferay.portal.kernel.exception.SystemException { 222 return getPersistence().findByGroupId(groupId, start, end); 223 } 224 225 /** 226 * Returns an ordered range of all the trash entries where groupId = ?. 227 * 228 * <p> 229 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 230 * </p> 231 * 232 * @param groupId the group ID 233 * @param start the lower bound of the range of trash entries 234 * @param end the upper bound of the range of trash entries (not inclusive) 235 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 236 * @return the ordered range of matching trash entries 237 * @throws SystemException if a system exception occurred 238 */ 239 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByGroupId( 240 long groupId, int start, int end, 241 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 242 throws com.liferay.portal.kernel.exception.SystemException { 243 return getPersistence() 244 .findByGroupId(groupId, start, end, orderByComparator); 245 } 246 247 /** 248 * Returns the first trash entry in the ordered set where groupId = ?. 249 * 250 * @param groupId the group ID 251 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 252 * @return the first matching trash entry 253 * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found 254 * @throws SystemException if a system exception occurred 255 */ 256 public static com.liferay.portlet.trash.model.TrashEntry findByGroupId_First( 257 long groupId, 258 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 259 throws com.liferay.portal.kernel.exception.SystemException, 260 com.liferay.portlet.trash.NoSuchEntryException { 261 return getPersistence().findByGroupId_First(groupId, orderByComparator); 262 } 263 264 /** 265 * Returns the first trash entry in the ordered set where groupId = ?. 266 * 267 * @param groupId the group ID 268 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 269 * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found 270 * @throws SystemException if a system exception occurred 271 */ 272 public static com.liferay.portlet.trash.model.TrashEntry fetchByGroupId_First( 273 long groupId, 274 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 275 throws com.liferay.portal.kernel.exception.SystemException { 276 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 277 } 278 279 /** 280 * Returns the last trash entry in the ordered set where groupId = ?. 281 * 282 * @param groupId the group ID 283 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 284 * @return the last matching trash entry 285 * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found 286 * @throws SystemException if a system exception occurred 287 */ 288 public static com.liferay.portlet.trash.model.TrashEntry findByGroupId_Last( 289 long groupId, 290 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 291 throws com.liferay.portal.kernel.exception.SystemException, 292 com.liferay.portlet.trash.NoSuchEntryException { 293 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 294 } 295 296 /** 297 * Returns the last trash entry in the ordered set where groupId = ?. 298 * 299 * @param groupId the group ID 300 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 301 * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found 302 * @throws SystemException if a system exception occurred 303 */ 304 public static com.liferay.portlet.trash.model.TrashEntry fetchByGroupId_Last( 305 long groupId, 306 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 307 throws com.liferay.portal.kernel.exception.SystemException { 308 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 309 } 310 311 /** 312 * Returns the trash entries before and after the current trash entry in the ordered set where groupId = ?. 313 * 314 * @param entryId the primary key of the current trash entry 315 * @param groupId the group ID 316 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 317 * @return the previous, current, and next trash entry 318 * @throws com.liferay.portlet.trash.NoSuchEntryException if a trash entry with the primary key could not be found 319 * @throws SystemException if a system exception occurred 320 */ 321 public static com.liferay.portlet.trash.model.TrashEntry[] findByGroupId_PrevAndNext( 322 long entryId, long groupId, 323 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 324 throws com.liferay.portal.kernel.exception.SystemException, 325 com.liferay.portlet.trash.NoSuchEntryException { 326 return getPersistence() 327 .findByGroupId_PrevAndNext(entryId, groupId, 328 orderByComparator); 329 } 330 331 /** 332 * Returns all the trash entries where companyId = ?. 333 * 334 * @param companyId the company ID 335 * @return the matching trash entries 336 * @throws SystemException if a system exception occurred 337 */ 338 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByCompanyId( 339 long companyId) 340 throws com.liferay.portal.kernel.exception.SystemException { 341 return getPersistence().findByCompanyId(companyId); 342 } 343 344 /** 345 * Returns a range of all the trash entries where companyId = ?. 346 * 347 * <p> 348 * 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. 349 * </p> 350 * 351 * @param companyId the company ID 352 * @param start the lower bound of the range of trash entries 353 * @param end the upper bound of the range of trash entries (not inclusive) 354 * @return the range of matching trash entries 355 * @throws SystemException if a system exception occurred 356 */ 357 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByCompanyId( 358 long companyId, int start, int end) 359 throws com.liferay.portal.kernel.exception.SystemException { 360 return getPersistence().findByCompanyId(companyId, start, end); 361 } 362 363 /** 364 * Returns an ordered range of all the trash entries where companyId = ?. 365 * 366 * <p> 367 * 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. 368 * </p> 369 * 370 * @param companyId the company ID 371 * @param start the lower bound of the range of trash entries 372 * @param end the upper bound of the range of trash entries (not inclusive) 373 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 374 * @return the ordered range of matching trash entries 375 * @throws SystemException if a system exception occurred 376 */ 377 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByCompanyId( 378 long companyId, int start, int end, 379 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 380 throws com.liferay.portal.kernel.exception.SystemException { 381 return getPersistence() 382 .findByCompanyId(companyId, start, end, orderByComparator); 383 } 384 385 /** 386 * Returns the first trash entry in the ordered set where companyId = ?. 387 * 388 * @param companyId the company ID 389 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 390 * @return the first matching trash entry 391 * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found 392 * @throws SystemException if a system exception occurred 393 */ 394 public static com.liferay.portlet.trash.model.TrashEntry findByCompanyId_First( 395 long companyId, 396 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 397 throws com.liferay.portal.kernel.exception.SystemException, 398 com.liferay.portlet.trash.NoSuchEntryException { 399 return getPersistence() 400 .findByCompanyId_First(companyId, orderByComparator); 401 } 402 403 /** 404 * Returns the first trash entry in the ordered set where companyId = ?. 405 * 406 * @param companyId the company ID 407 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 408 * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found 409 * @throws SystemException if a system exception occurred 410 */ 411 public static com.liferay.portlet.trash.model.TrashEntry fetchByCompanyId_First( 412 long companyId, 413 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 414 throws com.liferay.portal.kernel.exception.SystemException { 415 return getPersistence() 416 .fetchByCompanyId_First(companyId, orderByComparator); 417 } 418 419 /** 420 * Returns the last trash entry in the ordered set where companyId = ?. 421 * 422 * @param companyId the company ID 423 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 424 * @return the last matching trash entry 425 * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found 426 * @throws SystemException if a system exception occurred 427 */ 428 public static com.liferay.portlet.trash.model.TrashEntry findByCompanyId_Last( 429 long companyId, 430 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 431 throws com.liferay.portal.kernel.exception.SystemException, 432 com.liferay.portlet.trash.NoSuchEntryException { 433 return getPersistence() 434 .findByCompanyId_Last(companyId, orderByComparator); 435 } 436 437 /** 438 * Returns the last trash entry in the ordered set where companyId = ?. 439 * 440 * @param companyId the company ID 441 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 442 * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found 443 * @throws SystemException if a system exception occurred 444 */ 445 public static com.liferay.portlet.trash.model.TrashEntry fetchByCompanyId_Last( 446 long companyId, 447 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 448 throws com.liferay.portal.kernel.exception.SystemException { 449 return getPersistence() 450 .fetchByCompanyId_Last(companyId, orderByComparator); 451 } 452 453 /** 454 * Returns the trash entries before and after the current trash entry in the ordered set where companyId = ?. 455 * 456 * @param entryId the primary key of the current trash entry 457 * @param companyId the company ID 458 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 459 * @return the previous, current, and next trash entry 460 * @throws com.liferay.portlet.trash.NoSuchEntryException if a trash entry with the primary key could not be found 461 * @throws SystemException if a system exception occurred 462 */ 463 public static com.liferay.portlet.trash.model.TrashEntry[] findByCompanyId_PrevAndNext( 464 long entryId, long companyId, 465 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 466 throws com.liferay.portal.kernel.exception.SystemException, 467 com.liferay.portlet.trash.NoSuchEntryException { 468 return getPersistence() 469 .findByCompanyId_PrevAndNext(entryId, companyId, 470 orderByComparator); 471 } 472 473 /** 474 * Returns all the trash entries where groupId = ? and createDate < ?. 475 * 476 * @param groupId the group ID 477 * @param createDate the create date 478 * @return the matching trash entries 479 * @throws SystemException if a system exception occurred 480 */ 481 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByG_LtCD( 482 long groupId, java.util.Date createDate) 483 throws com.liferay.portal.kernel.exception.SystemException { 484 return getPersistence().findByG_LtCD(groupId, createDate); 485 } 486 487 /** 488 * Returns a range of all the trash entries where groupId = ? and createDate < ?. 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. 492 * </p> 493 * 494 * @param groupId the group ID 495 * @param createDate the create date 496 * @param start the lower bound of the range of trash entries 497 * @param end the upper bound of the range of trash entries (not inclusive) 498 * @return the range of matching trash entries 499 * @throws SystemException if a system exception occurred 500 */ 501 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByG_LtCD( 502 long groupId, java.util.Date createDate, int start, int end) 503 throws com.liferay.portal.kernel.exception.SystemException { 504 return getPersistence().findByG_LtCD(groupId, createDate, start, end); 505 } 506 507 /** 508 * Returns an ordered range of all the trash entries where groupId = ? and createDate < ?. 509 * 510 * <p> 511 * 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. 512 * </p> 513 * 514 * @param groupId the group ID 515 * @param createDate the create date 516 * @param start the lower bound of the range of trash entries 517 * @param end the upper bound of the range of trash entries (not inclusive) 518 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 519 * @return the ordered range of matching trash entries 520 * @throws SystemException if a system exception occurred 521 */ 522 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByG_LtCD( 523 long groupId, java.util.Date createDate, int start, int end, 524 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 525 throws com.liferay.portal.kernel.exception.SystemException { 526 return getPersistence() 527 .findByG_LtCD(groupId, createDate, start, end, 528 orderByComparator); 529 } 530 531 /** 532 * Returns the first trash entry in the ordered set where groupId = ? and createDate < ?. 533 * 534 * @param groupId the group ID 535 * @param createDate the create date 536 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 537 * @return the first matching trash entry 538 * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found 539 * @throws SystemException if a system exception occurred 540 */ 541 public static com.liferay.portlet.trash.model.TrashEntry findByG_LtCD_First( 542 long groupId, java.util.Date createDate, 543 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 544 throws com.liferay.portal.kernel.exception.SystemException, 545 com.liferay.portlet.trash.NoSuchEntryException { 546 return getPersistence() 547 .findByG_LtCD_First(groupId, createDate, orderByComparator); 548 } 549 550 /** 551 * Returns the first trash entry in the ordered set where groupId = ? and createDate < ?. 552 * 553 * @param groupId the group ID 554 * @param createDate the create date 555 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 556 * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found 557 * @throws SystemException if a system exception occurred 558 */ 559 public static com.liferay.portlet.trash.model.TrashEntry fetchByG_LtCD_First( 560 long groupId, java.util.Date createDate, 561 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 562 throws com.liferay.portal.kernel.exception.SystemException { 563 return getPersistence() 564 .fetchByG_LtCD_First(groupId, createDate, orderByComparator); 565 } 566 567 /** 568 * Returns the last trash entry in the ordered set where groupId = ? and createDate < ?. 569 * 570 * @param groupId the group ID 571 * @param createDate the create date 572 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 573 * @return the last matching trash entry 574 * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found 575 * @throws SystemException if a system exception occurred 576 */ 577 public static com.liferay.portlet.trash.model.TrashEntry findByG_LtCD_Last( 578 long groupId, java.util.Date createDate, 579 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 580 throws com.liferay.portal.kernel.exception.SystemException, 581 com.liferay.portlet.trash.NoSuchEntryException { 582 return getPersistence() 583 .findByG_LtCD_Last(groupId, createDate, orderByComparator); 584 } 585 586 /** 587 * Returns the last trash entry in the ordered set where groupId = ? and createDate < ?. 588 * 589 * @param groupId the group ID 590 * @param createDate the create date 591 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 592 * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found 593 * @throws SystemException if a system exception occurred 594 */ 595 public static com.liferay.portlet.trash.model.TrashEntry fetchByG_LtCD_Last( 596 long groupId, java.util.Date createDate, 597 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 598 throws com.liferay.portal.kernel.exception.SystemException { 599 return getPersistence() 600 .fetchByG_LtCD_Last(groupId, createDate, orderByComparator); 601 } 602 603 /** 604 * Returns the trash entries before and after the current trash entry in the ordered set where groupId = ? and createDate < ?. 605 * 606 * @param entryId the primary key of the current trash entry 607 * @param groupId the group ID 608 * @param createDate the create date 609 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 610 * @return the previous, current, and next trash entry 611 * @throws com.liferay.portlet.trash.NoSuchEntryException if a trash entry with the primary key could not be found 612 * @throws SystemException if a system exception occurred 613 */ 614 public static com.liferay.portlet.trash.model.TrashEntry[] findByG_LtCD_PrevAndNext( 615 long entryId, long groupId, java.util.Date createDate, 616 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 617 throws com.liferay.portal.kernel.exception.SystemException, 618 com.liferay.portlet.trash.NoSuchEntryException { 619 return getPersistence() 620 .findByG_LtCD_PrevAndNext(entryId, groupId, createDate, 621 orderByComparator); 622 } 623 624 /** 625 * Returns the trash entry where classNameId = ? and classPK = ? or throws a {@link com.liferay.portlet.trash.NoSuchEntryException} if it could not be found. 626 * 627 * @param classNameId the class name ID 628 * @param classPK the class p k 629 * @return the matching trash entry 630 * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found 631 * @throws SystemException if a system exception occurred 632 */ 633 public static com.liferay.portlet.trash.model.TrashEntry findByC_C( 634 long classNameId, long classPK) 635 throws com.liferay.portal.kernel.exception.SystemException, 636 com.liferay.portlet.trash.NoSuchEntryException { 637 return getPersistence().findByC_C(classNameId, classPK); 638 } 639 640 /** 641 * Returns the trash entry where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 642 * 643 * @param classNameId the class name ID 644 * @param classPK the class p k 645 * @return the matching trash entry, or <code>null</code> if a matching trash entry could not be found 646 * @throws SystemException if a system exception occurred 647 */ 648 public static com.liferay.portlet.trash.model.TrashEntry fetchByC_C( 649 long classNameId, long classPK) 650 throws com.liferay.portal.kernel.exception.SystemException { 651 return getPersistence().fetchByC_C(classNameId, classPK); 652 } 653 654 /** 655 * Returns the trash entry where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 656 * 657 * @param classNameId the class name ID 658 * @param classPK the class p k 659 * @param retrieveFromCache whether to use the finder cache 660 * @return the matching trash entry, or <code>null</code> if a matching trash entry could not be found 661 * @throws SystemException if a system exception occurred 662 */ 663 public static com.liferay.portlet.trash.model.TrashEntry fetchByC_C( 664 long classNameId, long classPK, boolean retrieveFromCache) 665 throws com.liferay.portal.kernel.exception.SystemException { 666 return getPersistence() 667 .fetchByC_C(classNameId, classPK, retrieveFromCache); 668 } 669 670 /** 671 * Returns all the trash entries. 672 * 673 * @return the trash entries 674 * @throws SystemException if a system exception occurred 675 */ 676 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findAll() 677 throws com.liferay.portal.kernel.exception.SystemException { 678 return getPersistence().findAll(); 679 } 680 681 /** 682 * Returns a range of all the trash entries. 683 * 684 * <p> 685 * 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. 686 * </p> 687 * 688 * @param start the lower bound of the range of trash entries 689 * @param end the upper bound of the range of trash entries (not inclusive) 690 * @return the range of trash entries 691 * @throws SystemException if a system exception occurred 692 */ 693 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findAll( 694 int start, int end) 695 throws com.liferay.portal.kernel.exception.SystemException { 696 return getPersistence().findAll(start, end); 697 } 698 699 /** 700 * Returns an ordered range of all the trash entries. 701 * 702 * <p> 703 * 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. 704 * </p> 705 * 706 * @param start the lower bound of the range of trash entries 707 * @param end the upper bound of the range of trash entries (not inclusive) 708 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 709 * @return the ordered range of trash entries 710 * @throws SystemException if a system exception occurred 711 */ 712 public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findAll( 713 int start, int end, 714 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 715 throws com.liferay.portal.kernel.exception.SystemException { 716 return getPersistence().findAll(start, end, orderByComparator); 717 } 718 719 /** 720 * Removes all the trash entries where groupId = ? from the database. 721 * 722 * @param groupId the group ID 723 * @throws SystemException if a system exception occurred 724 */ 725 public static void removeByGroupId(long groupId) 726 throws com.liferay.portal.kernel.exception.SystemException { 727 getPersistence().removeByGroupId(groupId); 728 } 729 730 /** 731 * Removes all the trash entries where companyId = ? from the database. 732 * 733 * @param companyId the company ID 734 * @throws SystemException if a system exception occurred 735 */ 736 public static void removeByCompanyId(long companyId) 737 throws com.liferay.portal.kernel.exception.SystemException { 738 getPersistence().removeByCompanyId(companyId); 739 } 740 741 /** 742 * Removes all the trash entries where groupId = ? and createDate < ? from the database. 743 * 744 * @param groupId the group ID 745 * @param createDate the create date 746 * @throws SystemException if a system exception occurred 747 */ 748 public static void removeByG_LtCD(long groupId, java.util.Date createDate) 749 throws com.liferay.portal.kernel.exception.SystemException { 750 getPersistence().removeByG_LtCD(groupId, createDate); 751 } 752 753 /** 754 * Removes the trash entry where classNameId = ? and classPK = ? from the database. 755 * 756 * @param classNameId the class name ID 757 * @param classPK the class p k 758 * @return the trash entry that was removed 759 * @throws SystemException if a system exception occurred 760 */ 761 public static com.liferay.portlet.trash.model.TrashEntry removeByC_C( 762 long classNameId, long classPK) 763 throws com.liferay.portal.kernel.exception.SystemException, 764 com.liferay.portlet.trash.NoSuchEntryException { 765 return getPersistence().removeByC_C(classNameId, classPK); 766 } 767 768 /** 769 * Removes all the trash entries from the database. 770 * 771 * @throws SystemException if a system exception occurred 772 */ 773 public static void removeAll() 774 throws com.liferay.portal.kernel.exception.SystemException { 775 getPersistence().removeAll(); 776 } 777 778 /** 779 * Returns the number of trash entries where groupId = ?. 780 * 781 * @param groupId the group ID 782 * @return the number of matching trash entries 783 * @throws SystemException if a system exception occurred 784 */ 785 public static int countByGroupId(long groupId) 786 throws com.liferay.portal.kernel.exception.SystemException { 787 return getPersistence().countByGroupId(groupId); 788 } 789 790 /** 791 * Returns the number of trash entries where companyId = ?. 792 * 793 * @param companyId the company ID 794 * @return the number of matching trash entries 795 * @throws SystemException if a system exception occurred 796 */ 797 public static int countByCompanyId(long companyId) 798 throws com.liferay.portal.kernel.exception.SystemException { 799 return getPersistence().countByCompanyId(companyId); 800 } 801 802 /** 803 * Returns the number of trash entries where groupId = ? and createDate < ?. 804 * 805 * @param groupId the group ID 806 * @param createDate the create date 807 * @return the number of matching trash entries 808 * @throws SystemException if a system exception occurred 809 */ 810 public static int countByG_LtCD(long groupId, java.util.Date createDate) 811 throws com.liferay.portal.kernel.exception.SystemException { 812 return getPersistence().countByG_LtCD(groupId, createDate); 813 } 814 815 /** 816 * Returns the number of trash entries where classNameId = ? and classPK = ?. 817 * 818 * @param classNameId the class name ID 819 * @param classPK the class p k 820 * @return the number of matching trash entries 821 * @throws SystemException if a system exception occurred 822 */ 823 public static int countByC_C(long classNameId, long classPK) 824 throws com.liferay.portal.kernel.exception.SystemException { 825 return getPersistence().countByC_C(classNameId, classPK); 826 } 827 828 /** 829 * Returns the number of trash entries. 830 * 831 * @return the number of trash entries 832 * @throws SystemException if a system exception occurred 833 */ 834 public static int countAll() 835 throws com.liferay.portal.kernel.exception.SystemException { 836 return getPersistence().countAll(); 837 } 838 839 /** 840 * Returns all the trash versions associated with the trash entry. 841 * 842 * @param pk the primary key of the trash entry 843 * @return the trash versions associated with the trash entry 844 * @throws SystemException if a system exception occurred 845 */ 846 public static java.util.List<com.liferay.portlet.trash.model.TrashVersion> getTrashVersions( 847 long pk) throws com.liferay.portal.kernel.exception.SystemException { 848 return getPersistence().getTrashVersions(pk); 849 } 850 851 /** 852 * Returns a range of all the trash versions associated with the trash entry. 853 * 854 * <p> 855 * 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. 856 * </p> 857 * 858 * @param pk the primary key of the trash entry 859 * @param start the lower bound of the range of trash entries 860 * @param end the upper bound of the range of trash entries (not inclusive) 861 * @return the range of trash versions associated with the trash entry 862 * @throws SystemException if a system exception occurred 863 */ 864 public static java.util.List<com.liferay.portlet.trash.model.TrashVersion> getTrashVersions( 865 long pk, int start, int end) 866 throws com.liferay.portal.kernel.exception.SystemException { 867 return getPersistence().getTrashVersions(pk, start, end); 868 } 869 870 /** 871 * Returns an ordered range of all the trash versions associated with the trash entry. 872 * 873 * <p> 874 * 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. 875 * </p> 876 * 877 * @param pk the primary key of the trash entry 878 * @param start the lower bound of the range of trash entries 879 * @param end the upper bound of the range of trash entries (not inclusive) 880 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 881 * @return the ordered range of trash versions associated with the trash entry 882 * @throws SystemException if a system exception occurred 883 */ 884 public static java.util.List<com.liferay.portlet.trash.model.TrashVersion> getTrashVersions( 885 long pk, int start, int end, 886 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 887 throws com.liferay.portal.kernel.exception.SystemException { 888 return getPersistence() 889 .getTrashVersions(pk, start, end, orderByComparator); 890 } 891 892 /** 893 * Returns the number of trash versions associated with the trash entry. 894 * 895 * @param pk the primary key of the trash entry 896 * @return the number of trash versions associated with the trash entry 897 * @throws SystemException if a system exception occurred 898 */ 899 public static int getTrashVersionsSize(long pk) 900 throws com.liferay.portal.kernel.exception.SystemException { 901 return getPersistence().getTrashVersionsSize(pk); 902 } 903 904 /** 905 * Returns <code>true</code> if the trash version is associated with the trash entry. 906 * 907 * @param pk the primary key of the trash entry 908 * @param trashVersionPK the primary key of the trash version 909 * @return <code>true</code> if the trash version is associated with the trash entry; <code>false</code> otherwise 910 * @throws SystemException if a system exception occurred 911 */ 912 public static boolean containsTrashVersion(long pk, long trashVersionPK) 913 throws com.liferay.portal.kernel.exception.SystemException { 914 return getPersistence().containsTrashVersion(pk, trashVersionPK); 915 } 916 917 /** 918 * Returns <code>true</code> if the trash entry has any trash versions associated with it. 919 * 920 * @param pk the primary key of the trash entry to check for associations with trash versions 921 * @return <code>true</code> if the trash entry has any trash versions associated with it; <code>false</code> otherwise 922 * @throws SystemException if a system exception occurred 923 */ 924 public static boolean containsTrashVersions(long pk) 925 throws com.liferay.portal.kernel.exception.SystemException { 926 return getPersistence().containsTrashVersions(pk); 927 } 928 929 public static TrashEntryPersistence getPersistence() { 930 if (_persistence == null) { 931 _persistence = (TrashEntryPersistence)PortalBeanLocatorUtil.locate(TrashEntryPersistence.class.getName()); 932 933 ReferenceRegistry.registerReference(TrashEntryUtil.class, 934 "_persistence"); 935 } 936 937 return _persistence; 938 } 939 940 /** 941 * @deprecated 942 */ 943 public void setPersistence(TrashEntryPersistence persistence) { 944 } 945 946 private static TrashEntryPersistence _persistence; 947 }