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