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