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 an ordered range of all the trash entries where groupId = ?. 160 * 161 * <p> 162 * 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. 163 * </p> 164 * 165 * @param groupId the group ID 166 * @param start the lower bound of the range of trash entries 167 * @param end the upper bound of the range of trash entries (not inclusive) 168 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 169 * @param retrieveFromCache whether to retrieve from the finder cache 170 * @return the ordered range of matching trash entries 171 */ 172 public static List<TrashEntry> findByGroupId(long groupId, int start, 173 int end, OrderByComparator<TrashEntry> orderByComparator, 174 boolean retrieveFromCache) { 175 return getPersistence() 176 .findByGroupId(groupId, start, end, orderByComparator, 177 retrieveFromCache); 178 } 179 180 /** 181 * Returns the first trash entry in the ordered set where groupId = ?. 182 * 183 * @param groupId the group ID 184 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 185 * @return the first matching trash entry 186 * @throws NoSuchEntryException if a matching trash entry could not be found 187 */ 188 public static TrashEntry findByGroupId_First(long groupId, 189 OrderByComparator<TrashEntry> orderByComparator) 190 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 191 return getPersistence().findByGroupId_First(groupId, orderByComparator); 192 } 193 194 /** 195 * Returns the first trash entry in the ordered set where groupId = ?. 196 * 197 * @param groupId the group ID 198 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 199 * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found 200 */ 201 public static TrashEntry fetchByGroupId_First(long groupId, 202 OrderByComparator<TrashEntry> orderByComparator) { 203 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 204 } 205 206 /** 207 * Returns the last trash entry in the ordered set where groupId = ?. 208 * 209 * @param groupId the group ID 210 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 211 * @return the last matching trash entry 212 * @throws NoSuchEntryException if a matching trash entry could not be found 213 */ 214 public static TrashEntry findByGroupId_Last(long groupId, 215 OrderByComparator<TrashEntry> orderByComparator) 216 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 217 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 218 } 219 220 /** 221 * Returns the last trash entry in the ordered set where groupId = ?. 222 * 223 * @param groupId the group ID 224 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 225 * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found 226 */ 227 public static TrashEntry fetchByGroupId_Last(long groupId, 228 OrderByComparator<TrashEntry> orderByComparator) { 229 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 230 } 231 232 /** 233 * Returns the trash entries before and after the current trash entry in the ordered set where groupId = ?. 234 * 235 * @param entryId the primary key of the current trash entry 236 * @param groupId the group ID 237 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 238 * @return the previous, current, and next trash entry 239 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 240 */ 241 public static TrashEntry[] findByGroupId_PrevAndNext(long entryId, 242 long groupId, OrderByComparator<TrashEntry> orderByComparator) 243 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 244 return getPersistence() 245 .findByGroupId_PrevAndNext(entryId, groupId, 246 orderByComparator); 247 } 248 249 /** 250 * Removes all the trash entries where groupId = ? from the database. 251 * 252 * @param groupId the group ID 253 */ 254 public static void removeByGroupId(long groupId) { 255 getPersistence().removeByGroupId(groupId); 256 } 257 258 /** 259 * Returns the number of trash entries where groupId = ?. 260 * 261 * @param groupId the group ID 262 * @return the number of matching trash entries 263 */ 264 public static int countByGroupId(long groupId) { 265 return getPersistence().countByGroupId(groupId); 266 } 267 268 /** 269 * Returns all the trash entries where companyId = ?. 270 * 271 * @param companyId the company ID 272 * @return the matching trash entries 273 */ 274 public static List<TrashEntry> findByCompanyId(long companyId) { 275 return getPersistence().findByCompanyId(companyId); 276 } 277 278 /** 279 * Returns a range of all the trash entries where companyId = ?. 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 companyId the company ID 286 * @param start the lower bound of the range of trash entries 287 * @param end the upper bound of the range of trash entries (not inclusive) 288 * @return the range of matching trash entries 289 */ 290 public static List<TrashEntry> findByCompanyId(long companyId, int start, 291 int end) { 292 return getPersistence().findByCompanyId(companyId, start, end); 293 } 294 295 /** 296 * Returns an ordered range of all the trash entries where companyId = ?. 297 * 298 * <p> 299 * 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. 300 * </p> 301 * 302 * @param companyId the company ID 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 static List<TrashEntry> findByCompanyId(long companyId, int start, 309 int end, OrderByComparator<TrashEntry> orderByComparator) { 310 return getPersistence() 311 .findByCompanyId(companyId, start, end, orderByComparator); 312 } 313 314 /** 315 * Returns an ordered range of all the trash entries where companyId = ?. 316 * 317 * <p> 318 * 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. 319 * </p> 320 * 321 * @param companyId the company ID 322 * @param start the lower bound of the range of trash entries 323 * @param end the upper bound of the range of trash entries (not inclusive) 324 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 325 * @param retrieveFromCache whether to retrieve from the finder cache 326 * @return the ordered range of matching trash entries 327 */ 328 public static List<TrashEntry> findByCompanyId(long companyId, int start, 329 int end, OrderByComparator<TrashEntry> orderByComparator, 330 boolean retrieveFromCache) { 331 return getPersistence() 332 .findByCompanyId(companyId, start, end, orderByComparator, 333 retrieveFromCache); 334 } 335 336 /** 337 * Returns the first trash entry in the ordered set where companyId = ?. 338 * 339 * @param companyId the company ID 340 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 341 * @return the first matching trash entry 342 * @throws NoSuchEntryException if a matching trash entry could not be found 343 */ 344 public static TrashEntry findByCompanyId_First(long companyId, 345 OrderByComparator<TrashEntry> orderByComparator) 346 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 347 return getPersistence() 348 .findByCompanyId_First(companyId, orderByComparator); 349 } 350 351 /** 352 * Returns the first trash entry in the ordered set where companyId = ?. 353 * 354 * @param companyId the company ID 355 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 356 * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found 357 */ 358 public static TrashEntry fetchByCompanyId_First(long companyId, 359 OrderByComparator<TrashEntry> orderByComparator) { 360 return getPersistence() 361 .fetchByCompanyId_First(companyId, orderByComparator); 362 } 363 364 /** 365 * Returns the last trash entry in the ordered set where companyId = ?. 366 * 367 * @param companyId the company ID 368 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 369 * @return the last matching trash entry 370 * @throws NoSuchEntryException if a matching trash entry could not be found 371 */ 372 public static TrashEntry findByCompanyId_Last(long companyId, 373 OrderByComparator<TrashEntry> orderByComparator) 374 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 375 return getPersistence() 376 .findByCompanyId_Last(companyId, orderByComparator); 377 } 378 379 /** 380 * Returns the last trash entry in the ordered set where companyId = ?. 381 * 382 * @param companyId the company ID 383 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 384 * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found 385 */ 386 public static TrashEntry fetchByCompanyId_Last(long companyId, 387 OrderByComparator<TrashEntry> orderByComparator) { 388 return getPersistence() 389 .fetchByCompanyId_Last(companyId, orderByComparator); 390 } 391 392 /** 393 * Returns the trash entries before and after the current trash entry in the ordered set where companyId = ?. 394 * 395 * @param entryId the primary key of the current trash entry 396 * @param companyId the company ID 397 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 398 * @return the previous, current, and next trash entry 399 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 400 */ 401 public static TrashEntry[] findByCompanyId_PrevAndNext(long entryId, 402 long companyId, OrderByComparator<TrashEntry> orderByComparator) 403 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 404 return getPersistence() 405 .findByCompanyId_PrevAndNext(entryId, companyId, 406 orderByComparator); 407 } 408 409 /** 410 * Removes all the trash entries where companyId = ? from the database. 411 * 412 * @param companyId the company ID 413 */ 414 public static void removeByCompanyId(long companyId) { 415 getPersistence().removeByCompanyId(companyId); 416 } 417 418 /** 419 * Returns the number of trash entries where companyId = ?. 420 * 421 * @param companyId the company ID 422 * @return the number of matching trash entries 423 */ 424 public static int countByCompanyId(long companyId) { 425 return getPersistence().countByCompanyId(companyId); 426 } 427 428 /** 429 * Returns all the trash entries where groupId = ? and createDate < ?. 430 * 431 * @param groupId the group ID 432 * @param createDate the create date 433 * @return the matching trash entries 434 */ 435 public static List<TrashEntry> findByG_LtCD(long groupId, 436 java.util.Date createDate) { 437 return getPersistence().findByG_LtCD(groupId, createDate); 438 } 439 440 /** 441 * Returns a range of all the trash entries where groupId = ? and createDate < ?. 442 * 443 * <p> 444 * 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. 445 * </p> 446 * 447 * @param groupId the group ID 448 * @param createDate the create date 449 * @param start the lower bound of the range of trash entries 450 * @param end the upper bound of the range of trash entries (not inclusive) 451 * @return the range of matching trash entries 452 */ 453 public static List<TrashEntry> findByG_LtCD(long groupId, 454 java.util.Date createDate, int start, int end) { 455 return getPersistence().findByG_LtCD(groupId, createDate, start, end); 456 } 457 458 /** 459 * Returns an ordered range of all the trash entries where groupId = ? and createDate < ?. 460 * 461 * <p> 462 * 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. 463 * </p> 464 * 465 * @param groupId the group ID 466 * @param createDate the create date 467 * @param start the lower bound of the range of trash entries 468 * @param end the upper bound of the range of trash entries (not inclusive) 469 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 470 * @return the ordered range of matching trash entries 471 */ 472 public static List<TrashEntry> findByG_LtCD(long groupId, 473 java.util.Date createDate, int start, int end, 474 OrderByComparator<TrashEntry> orderByComparator) { 475 return getPersistence() 476 .findByG_LtCD(groupId, createDate, start, end, 477 orderByComparator); 478 } 479 480 /** 481 * Returns an ordered range of all the trash entries where groupId = ? and createDate < ?. 482 * 483 * <p> 484 * 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. 485 * </p> 486 * 487 * @param groupId the group ID 488 * @param createDate the create date 489 * @param start the lower bound of the range of trash entries 490 * @param end the upper bound of the range of trash entries (not inclusive) 491 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 492 * @param retrieveFromCache whether to retrieve from the finder cache 493 * @return the ordered range of matching trash entries 494 */ 495 public static List<TrashEntry> findByG_LtCD(long groupId, 496 java.util.Date createDate, int start, int end, 497 OrderByComparator<TrashEntry> orderByComparator, 498 boolean retrieveFromCache) { 499 return getPersistence() 500 .findByG_LtCD(groupId, createDate, start, end, 501 orderByComparator, retrieveFromCache); 502 } 503 504 /** 505 * Returns the first trash entry in the ordered set where groupId = ? and createDate < ?. 506 * 507 * @param groupId the group ID 508 * @param createDate the create date 509 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 510 * @return the first matching trash entry 511 * @throws NoSuchEntryException if a matching trash entry could not be found 512 */ 513 public static TrashEntry findByG_LtCD_First(long groupId, 514 java.util.Date createDate, 515 OrderByComparator<TrashEntry> orderByComparator) 516 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 517 return getPersistence() 518 .findByG_LtCD_First(groupId, createDate, orderByComparator); 519 } 520 521 /** 522 * Returns the first trash entry in the ordered set where groupId = ? and createDate < ?. 523 * 524 * @param groupId the group ID 525 * @param createDate the create date 526 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 527 * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found 528 */ 529 public static TrashEntry fetchByG_LtCD_First(long groupId, 530 java.util.Date createDate, 531 OrderByComparator<TrashEntry> orderByComparator) { 532 return getPersistence() 533 .fetchByG_LtCD_First(groupId, createDate, orderByComparator); 534 } 535 536 /** 537 * Returns the last trash entry in the ordered set where groupId = ? and createDate < ?. 538 * 539 * @param groupId the group ID 540 * @param createDate the create date 541 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 542 * @return the last matching trash entry 543 * @throws NoSuchEntryException if a matching trash entry could not be found 544 */ 545 public static TrashEntry findByG_LtCD_Last(long groupId, 546 java.util.Date createDate, 547 OrderByComparator<TrashEntry> orderByComparator) 548 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 549 return getPersistence() 550 .findByG_LtCD_Last(groupId, createDate, orderByComparator); 551 } 552 553 /** 554 * Returns the last trash entry in the ordered set where groupId = ? and createDate < ?. 555 * 556 * @param groupId the group ID 557 * @param createDate the create date 558 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 559 * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found 560 */ 561 public static TrashEntry fetchByG_LtCD_Last(long groupId, 562 java.util.Date createDate, 563 OrderByComparator<TrashEntry> orderByComparator) { 564 return getPersistence() 565 .fetchByG_LtCD_Last(groupId, createDate, orderByComparator); 566 } 567 568 /** 569 * Returns the trash entries before and after the current trash entry in the ordered set where groupId = ? and createDate < ?. 570 * 571 * @param entryId the primary key of the current trash entry 572 * @param groupId the group ID 573 * @param createDate the create date 574 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 575 * @return the previous, current, and next trash entry 576 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 577 */ 578 public static TrashEntry[] findByG_LtCD_PrevAndNext(long entryId, 579 long groupId, java.util.Date createDate, 580 OrderByComparator<TrashEntry> orderByComparator) 581 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 582 return getPersistence() 583 .findByG_LtCD_PrevAndNext(entryId, groupId, createDate, 584 orderByComparator); 585 } 586 587 /** 588 * Removes all the trash entries where groupId = ? and createDate < ? from the database. 589 * 590 * @param groupId the group ID 591 * @param createDate the create date 592 */ 593 public static void removeByG_LtCD(long groupId, java.util.Date createDate) { 594 getPersistence().removeByG_LtCD(groupId, createDate); 595 } 596 597 /** 598 * Returns the number of trash entries where groupId = ? and createDate < ?. 599 * 600 * @param groupId the group ID 601 * @param createDate the create date 602 * @return the number of matching trash entries 603 */ 604 public static int countByG_LtCD(long groupId, java.util.Date createDate) { 605 return getPersistence().countByG_LtCD(groupId, createDate); 606 } 607 608 /** 609 * Returns all the trash entries where groupId = ? and classNameId = ?. 610 * 611 * @param groupId the group ID 612 * @param classNameId the class name ID 613 * @return the matching trash entries 614 */ 615 public static List<TrashEntry> findByG_C(long groupId, long classNameId) { 616 return getPersistence().findByG_C(groupId, classNameId); 617 } 618 619 /** 620 * Returns a range of all the trash entries where groupId = ? and classNameId = ?. 621 * 622 * <p> 623 * 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. 624 * </p> 625 * 626 * @param groupId the group ID 627 * @param classNameId the class name ID 628 * @param start the lower bound of the range of trash entries 629 * @param end the upper bound of the range of trash entries (not inclusive) 630 * @return the range of matching trash entries 631 */ 632 public static List<TrashEntry> findByG_C(long groupId, long classNameId, 633 int start, int end) { 634 return getPersistence().findByG_C(groupId, classNameId, start, end); 635 } 636 637 /** 638 * Returns an ordered range of all the trash entries where groupId = ? and classNameId = ?. 639 * 640 * <p> 641 * 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. 642 * </p> 643 * 644 * @param groupId the group ID 645 * @param classNameId the class name ID 646 * @param start the lower bound of the range of trash entries 647 * @param end the upper bound of the range of trash entries (not inclusive) 648 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 649 * @return the ordered range of matching trash entries 650 */ 651 public static List<TrashEntry> findByG_C(long groupId, long classNameId, 652 int start, int end, OrderByComparator<TrashEntry> orderByComparator) { 653 return getPersistence() 654 .findByG_C(groupId, classNameId, start, end, 655 orderByComparator); 656 } 657 658 /** 659 * Returns an ordered range of all the trash entries where groupId = ? and classNameId = ?. 660 * 661 * <p> 662 * 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. 663 * </p> 664 * 665 * @param groupId the group ID 666 * @param classNameId the class name ID 667 * @param start the lower bound of the range of trash entries 668 * @param end the upper bound of the range of trash entries (not inclusive) 669 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 670 * @param retrieveFromCache whether to retrieve from the finder cache 671 * @return the ordered range of matching trash entries 672 */ 673 public static List<TrashEntry> findByG_C(long groupId, long classNameId, 674 int start, int end, OrderByComparator<TrashEntry> orderByComparator, 675 boolean retrieveFromCache) { 676 return getPersistence() 677 .findByG_C(groupId, classNameId, start, end, 678 orderByComparator, retrieveFromCache); 679 } 680 681 /** 682 * Returns the first trash entry in the ordered set where groupId = ? and classNameId = ?. 683 * 684 * @param groupId the group ID 685 * @param classNameId the class name ID 686 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 687 * @return the first matching trash entry 688 * @throws NoSuchEntryException if a matching trash entry could not be found 689 */ 690 public static TrashEntry findByG_C_First(long groupId, long classNameId, 691 OrderByComparator<TrashEntry> orderByComparator) 692 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 693 return getPersistence() 694 .findByG_C_First(groupId, classNameId, orderByComparator); 695 } 696 697 /** 698 * Returns the first trash entry in the ordered set where groupId = ? and classNameId = ?. 699 * 700 * @param groupId the group ID 701 * @param classNameId the class name ID 702 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 703 * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found 704 */ 705 public static TrashEntry fetchByG_C_First(long groupId, long classNameId, 706 OrderByComparator<TrashEntry> orderByComparator) { 707 return getPersistence() 708 .fetchByG_C_First(groupId, classNameId, orderByComparator); 709 } 710 711 /** 712 * Returns the last trash entry in the ordered set where groupId = ? and classNameId = ?. 713 * 714 * @param groupId the group ID 715 * @param classNameId the class name ID 716 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 717 * @return the last matching trash entry 718 * @throws NoSuchEntryException if a matching trash entry could not be found 719 */ 720 public static TrashEntry findByG_C_Last(long groupId, long classNameId, 721 OrderByComparator<TrashEntry> orderByComparator) 722 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 723 return getPersistence() 724 .findByG_C_Last(groupId, classNameId, orderByComparator); 725 } 726 727 /** 728 * Returns the last trash entry in the ordered set where groupId = ? and classNameId = ?. 729 * 730 * @param groupId the group ID 731 * @param classNameId the class name ID 732 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 733 * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found 734 */ 735 public static TrashEntry fetchByG_C_Last(long groupId, long classNameId, 736 OrderByComparator<TrashEntry> orderByComparator) { 737 return getPersistence() 738 .fetchByG_C_Last(groupId, classNameId, orderByComparator); 739 } 740 741 /** 742 * Returns the trash entries before and after the current trash entry in the ordered set where groupId = ? and classNameId = ?. 743 * 744 * @param entryId the primary key of the current trash entry 745 * @param groupId the group ID 746 * @param classNameId the class name ID 747 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 748 * @return the previous, current, and next trash entry 749 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 750 */ 751 public static TrashEntry[] findByG_C_PrevAndNext(long entryId, 752 long groupId, long classNameId, 753 OrderByComparator<TrashEntry> orderByComparator) 754 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 755 return getPersistence() 756 .findByG_C_PrevAndNext(entryId, groupId, classNameId, 757 orderByComparator); 758 } 759 760 /** 761 * Removes all the trash entries where groupId = ? and classNameId = ? from the database. 762 * 763 * @param groupId the group ID 764 * @param classNameId the class name ID 765 */ 766 public static void removeByG_C(long groupId, long classNameId) { 767 getPersistence().removeByG_C(groupId, classNameId); 768 } 769 770 /** 771 * Returns the number of trash entries where groupId = ? and classNameId = ?. 772 * 773 * @param groupId the group ID 774 * @param classNameId the class name ID 775 * @return the number of matching trash entries 776 */ 777 public static int countByG_C(long groupId, long classNameId) { 778 return getPersistence().countByG_C(groupId, classNameId); 779 } 780 781 /** 782 * Returns the trash entry where classNameId = ? and classPK = ? or throws a {@link NoSuchEntryException} if it could not be found. 783 * 784 * @param classNameId the class name ID 785 * @param classPK the class p k 786 * @return the matching trash entry 787 * @throws NoSuchEntryException if a matching trash entry could not be found 788 */ 789 public static TrashEntry findByC_C(long classNameId, long classPK) 790 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 791 return getPersistence().findByC_C(classNameId, classPK); 792 } 793 794 /** 795 * Returns the trash entry where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 796 * 797 * @param classNameId the class name ID 798 * @param classPK the class p k 799 * @return the matching trash entry, or <code>null</code> if a matching trash entry could not be found 800 */ 801 public static TrashEntry fetchByC_C(long classNameId, long classPK) { 802 return getPersistence().fetchByC_C(classNameId, classPK); 803 } 804 805 /** 806 * Returns the trash entry where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 807 * 808 * @param classNameId the class name ID 809 * @param classPK the class p k 810 * @param retrieveFromCache whether to retrieve from the finder cache 811 * @return the matching trash entry, or <code>null</code> if a matching trash entry could not be found 812 */ 813 public static TrashEntry fetchByC_C(long classNameId, long classPK, 814 boolean retrieveFromCache) { 815 return getPersistence() 816 .fetchByC_C(classNameId, classPK, retrieveFromCache); 817 } 818 819 /** 820 * Removes the trash entry where classNameId = ? and classPK = ? from the database. 821 * 822 * @param classNameId the class name ID 823 * @param classPK the class p k 824 * @return the trash entry that was removed 825 */ 826 public static TrashEntry removeByC_C(long classNameId, long classPK) 827 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 828 return getPersistence().removeByC_C(classNameId, classPK); 829 } 830 831 /** 832 * Returns the number of trash entries where classNameId = ? and classPK = ?. 833 * 834 * @param classNameId the class name ID 835 * @param classPK the class p k 836 * @return the number of matching trash entries 837 */ 838 public static int countByC_C(long classNameId, long classPK) { 839 return getPersistence().countByC_C(classNameId, classPK); 840 } 841 842 /** 843 * Caches the trash entry in the entity cache if it is enabled. 844 * 845 * @param trashEntry the trash entry 846 */ 847 public static void cacheResult(TrashEntry trashEntry) { 848 getPersistence().cacheResult(trashEntry); 849 } 850 851 /** 852 * Caches the trash entries in the entity cache if it is enabled. 853 * 854 * @param trashEntries the trash entries 855 */ 856 public static void cacheResult(List<TrashEntry> trashEntries) { 857 getPersistence().cacheResult(trashEntries); 858 } 859 860 /** 861 * Creates a new trash entry with the primary key. Does not add the trash entry to the database. 862 * 863 * @param entryId the primary key for the new trash entry 864 * @return the new trash entry 865 */ 866 public static TrashEntry create(long entryId) { 867 return getPersistence().create(entryId); 868 } 869 870 /** 871 * Removes the trash entry with the primary key from the database. Also notifies the appropriate model listeners. 872 * 873 * @param entryId the primary key of the trash entry 874 * @return the trash entry that was removed 875 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 876 */ 877 public static TrashEntry remove(long entryId) 878 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 879 return getPersistence().remove(entryId); 880 } 881 882 public static TrashEntry updateImpl(TrashEntry trashEntry) { 883 return getPersistence().updateImpl(trashEntry); 884 } 885 886 /** 887 * Returns the trash entry with the primary key or throws a {@link NoSuchEntryException} if it could not be found. 888 * 889 * @param entryId the primary key of the trash entry 890 * @return the trash entry 891 * @throws NoSuchEntryException if a trash entry with the primary key could not be found 892 */ 893 public static TrashEntry findByPrimaryKey(long entryId) 894 throws com.liferay.portlet.trash.exception.NoSuchEntryException { 895 return getPersistence().findByPrimaryKey(entryId); 896 } 897 898 /** 899 * Returns the trash entry with the primary key or returns <code>null</code> if it could not be found. 900 * 901 * @param entryId the primary key of the trash entry 902 * @return the trash entry, or <code>null</code> if a trash entry with the primary key could not be found 903 */ 904 public static TrashEntry fetchByPrimaryKey(long entryId) { 905 return getPersistence().fetchByPrimaryKey(entryId); 906 } 907 908 public static java.util.Map<java.io.Serializable, TrashEntry> fetchByPrimaryKeys( 909 java.util.Set<java.io.Serializable> primaryKeys) { 910 return getPersistence().fetchByPrimaryKeys(primaryKeys); 911 } 912 913 /** 914 * Returns all the trash entries. 915 * 916 * @return the trash entries 917 */ 918 public static List<TrashEntry> findAll() { 919 return getPersistence().findAll(); 920 } 921 922 /** 923 * Returns a range of all the trash entries. 924 * 925 * <p> 926 * 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. 927 * </p> 928 * 929 * @param start the lower bound of the range of trash entries 930 * @param end the upper bound of the range of trash entries (not inclusive) 931 * @return the range of trash entries 932 */ 933 public static List<TrashEntry> findAll(int start, int end) { 934 return getPersistence().findAll(start, end); 935 } 936 937 /** 938 * Returns an ordered range of all the trash entries. 939 * 940 * <p> 941 * 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. 942 * </p> 943 * 944 * @param start the lower bound of the range of trash entries 945 * @param end the upper bound of the range of trash entries (not inclusive) 946 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 947 * @return the ordered range of trash entries 948 */ 949 public static List<TrashEntry> findAll(int start, int end, 950 OrderByComparator<TrashEntry> orderByComparator) { 951 return getPersistence().findAll(start, end, orderByComparator); 952 } 953 954 /** 955 * Returns an ordered range of all the trash entries. 956 * 957 * <p> 958 * 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. 959 * </p> 960 * 961 * @param start the lower bound of the range of trash entries 962 * @param end the upper bound of the range of trash entries (not inclusive) 963 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 964 * @param retrieveFromCache whether to retrieve from the finder cache 965 * @return the ordered range of trash entries 966 */ 967 public static List<TrashEntry> findAll(int start, int end, 968 OrderByComparator<TrashEntry> orderByComparator, 969 boolean retrieveFromCache) { 970 return getPersistence() 971 .findAll(start, end, orderByComparator, retrieveFromCache); 972 } 973 974 /** 975 * Removes all the trash entries from the database. 976 */ 977 public static void removeAll() { 978 getPersistence().removeAll(); 979 } 980 981 /** 982 * Returns the number of trash entries. 983 * 984 * @return the number of trash entries 985 */ 986 public static int countAll() { 987 return getPersistence().countAll(); 988 } 989 990 public static TrashEntryPersistence getPersistence() { 991 if (_persistence == null) { 992 _persistence = (TrashEntryPersistence)PortalBeanLocatorUtil.locate(TrashEntryPersistence.class.getName()); 993 994 ReferenceRegistry.registerReference(TrashEntryUtil.class, 995 "_persistence"); 996 } 997 998 return _persistence; 999 } 1000 1001 private static TrashEntryPersistence _persistence; 1002 }