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