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; 016 017 import com.liferay.portal.service.ServiceWrapper; 018 019 /** 020 * <p> 021 * This class is a wrapper for {@link TrashEntryLocalService}. 022 * </p> 023 * 024 * @author Brian Wing Shun Chan 025 * @see TrashEntryLocalService 026 * @generated 027 */ 028 public class TrashEntryLocalServiceWrapper implements TrashEntryLocalService, 029 ServiceWrapper<TrashEntryLocalService> { 030 public TrashEntryLocalServiceWrapper( 031 TrashEntryLocalService trashEntryLocalService) { 032 _trashEntryLocalService = trashEntryLocalService; 033 } 034 035 /** 036 * Adds the trash entry to the database. Also notifies the appropriate model listeners. 037 * 038 * @param trashEntry the trash entry 039 * @return the trash entry that was added 040 * @throws SystemException if a system exception occurred 041 */ 042 public com.liferay.portlet.trash.model.TrashEntry addTrashEntry( 043 com.liferay.portlet.trash.model.TrashEntry trashEntry) 044 throws com.liferay.portal.kernel.exception.SystemException { 045 return _trashEntryLocalService.addTrashEntry(trashEntry); 046 } 047 048 /** 049 * Creates a new trash entry with the primary key. Does not add the trash entry to the database. 050 * 051 * @param entryId the primary key for the new trash entry 052 * @return the new trash entry 053 */ 054 public com.liferay.portlet.trash.model.TrashEntry createTrashEntry( 055 long entryId) { 056 return _trashEntryLocalService.createTrashEntry(entryId); 057 } 058 059 /** 060 * Deletes the trash entry with the primary key from the database. Also notifies the appropriate model listeners. 061 * 062 * @param entryId the primary key of the trash entry 063 * @return the trash entry that was removed 064 * @throws PortalException if a trash entry with the primary key could not be found 065 * @throws SystemException if a system exception occurred 066 */ 067 public com.liferay.portlet.trash.model.TrashEntry deleteTrashEntry( 068 long entryId) 069 throws com.liferay.portal.kernel.exception.PortalException, 070 com.liferay.portal.kernel.exception.SystemException { 071 return _trashEntryLocalService.deleteTrashEntry(entryId); 072 } 073 074 /** 075 * Deletes the trash entry from the database. Also notifies the appropriate model listeners. 076 * 077 * @param trashEntry the trash entry 078 * @return the trash entry that was removed 079 * @throws SystemException if a system exception occurred 080 */ 081 public com.liferay.portlet.trash.model.TrashEntry deleteTrashEntry( 082 com.liferay.portlet.trash.model.TrashEntry trashEntry) 083 throws com.liferay.portal.kernel.exception.SystemException { 084 return _trashEntryLocalService.deleteTrashEntry(trashEntry); 085 } 086 087 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 088 return _trashEntryLocalService.dynamicQuery(); 089 } 090 091 /** 092 * Performs a dynamic query on the database and returns the matching rows. 093 * 094 * @param dynamicQuery the dynamic query 095 * @return the matching rows 096 * @throws SystemException if a system exception occurred 097 */ 098 @SuppressWarnings("rawtypes") 099 public java.util.List dynamicQuery( 100 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 101 throws com.liferay.portal.kernel.exception.SystemException { 102 return _trashEntryLocalService.dynamicQuery(dynamicQuery); 103 } 104 105 /** 106 * Performs a dynamic query on the database and returns a range of the matching rows. 107 * 108 * <p> 109 * 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. 110 * </p> 111 * 112 * @param dynamicQuery the dynamic query 113 * @param start the lower bound of the range of model instances 114 * @param end the upper bound of the range of model instances (not inclusive) 115 * @return the range of matching rows 116 * @throws SystemException if a system exception occurred 117 */ 118 @SuppressWarnings("rawtypes") 119 public java.util.List dynamicQuery( 120 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 121 int end) throws com.liferay.portal.kernel.exception.SystemException { 122 return _trashEntryLocalService.dynamicQuery(dynamicQuery, start, end); 123 } 124 125 /** 126 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 127 * 128 * <p> 129 * 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. 130 * </p> 131 * 132 * @param dynamicQuery the dynamic query 133 * @param start the lower bound of the range of model instances 134 * @param end the upper bound of the range of model instances (not inclusive) 135 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 136 * @return the ordered range of matching rows 137 * @throws SystemException if a system exception occurred 138 */ 139 @SuppressWarnings("rawtypes") 140 public java.util.List dynamicQuery( 141 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 142 int end, 143 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 144 throws com.liferay.portal.kernel.exception.SystemException { 145 return _trashEntryLocalService.dynamicQuery(dynamicQuery, start, end, 146 orderByComparator); 147 } 148 149 /** 150 * Returns the number of rows that match the dynamic query. 151 * 152 * @param dynamicQuery the dynamic query 153 * @return the number of rows that match the dynamic query 154 * @throws SystemException if a system exception occurred 155 */ 156 public long dynamicQueryCount( 157 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 158 throws com.liferay.portal.kernel.exception.SystemException { 159 return _trashEntryLocalService.dynamicQueryCount(dynamicQuery); 160 } 161 162 public com.liferay.portlet.trash.model.TrashEntry fetchTrashEntry( 163 long entryId) 164 throws com.liferay.portal.kernel.exception.SystemException { 165 return _trashEntryLocalService.fetchTrashEntry(entryId); 166 } 167 168 /** 169 * Returns the trash entry with the primary key. 170 * 171 * @param entryId the primary key of the trash entry 172 * @return the trash entry 173 * @throws PortalException if a trash entry with the primary key could not be found 174 * @throws SystemException if a system exception occurred 175 */ 176 public com.liferay.portlet.trash.model.TrashEntry getTrashEntry( 177 long entryId) 178 throws com.liferay.portal.kernel.exception.PortalException, 179 com.liferay.portal.kernel.exception.SystemException { 180 return _trashEntryLocalService.getTrashEntry(entryId); 181 } 182 183 public com.liferay.portal.model.PersistedModel getPersistedModel( 184 java.io.Serializable primaryKeyObj) 185 throws com.liferay.portal.kernel.exception.PortalException, 186 com.liferay.portal.kernel.exception.SystemException { 187 return _trashEntryLocalService.getPersistedModel(primaryKeyObj); 188 } 189 190 /** 191 * Returns a range of all the trash entries. 192 * 193 * <p> 194 * 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. 195 * </p> 196 * 197 * @param start the lower bound of the range of trash entries 198 * @param end the upper bound of the range of trash entries (not inclusive) 199 * @return the range of trash entries 200 * @throws SystemException if a system exception occurred 201 */ 202 public java.util.List<com.liferay.portlet.trash.model.TrashEntry> getTrashEntries( 203 int start, int end) 204 throws com.liferay.portal.kernel.exception.SystemException { 205 return _trashEntryLocalService.getTrashEntries(start, end); 206 } 207 208 /** 209 * Returns the number of trash entries. 210 * 211 * @return the number of trash entries 212 * @throws SystemException if a system exception occurred 213 */ 214 public int getTrashEntriesCount() 215 throws com.liferay.portal.kernel.exception.SystemException { 216 return _trashEntryLocalService.getTrashEntriesCount(); 217 } 218 219 /** 220 * Updates the trash entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 221 * 222 * @param trashEntry the trash entry 223 * @return the trash entry that was updated 224 * @throws SystemException if a system exception occurred 225 */ 226 public com.liferay.portlet.trash.model.TrashEntry updateTrashEntry( 227 com.liferay.portlet.trash.model.TrashEntry trashEntry) 228 throws com.liferay.portal.kernel.exception.SystemException { 229 return _trashEntryLocalService.updateTrashEntry(trashEntry); 230 } 231 232 /** 233 * Returns the Spring bean ID for this bean. 234 * 235 * @return the Spring bean ID for this bean 236 */ 237 public java.lang.String getBeanIdentifier() { 238 return _trashEntryLocalService.getBeanIdentifier(); 239 } 240 241 /** 242 * Sets the Spring bean ID for this bean. 243 * 244 * @param beanIdentifier the Spring bean ID for this bean 245 */ 246 public void setBeanIdentifier(java.lang.String beanIdentifier) { 247 _trashEntryLocalService.setBeanIdentifier(beanIdentifier); 248 } 249 250 /** 251 * Moves an entry to trash. 252 * 253 * @param userId the primary key of the user removing the entity 254 * @param groupId the primary key of the entry's group 255 * @param className the class name of the entity 256 * @param classPK the primary key of the entity 257 * @param status the status of the entity prior to being moved to trash 258 * @param statusOVPs the primary keys and statuses of any of the entry's 259 versions (e.g., {@link 260 com.liferay.portlet.documentlibrary.model.DLFileVersion}) 261 * @param typeSettingsProperties the type settings properties 262 * @return the trashEntry 263 * @throws PortalException if a user with the primary key could not be found 264 * @throws SystemException if a system exception occurred 265 */ 266 public com.liferay.portlet.trash.model.TrashEntry addTrashEntry( 267 long userId, long groupId, java.lang.String className, long classPK, 268 int status, 269 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.Long, java.lang.Integer>> statusOVPs, 270 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) 271 throws com.liferay.portal.kernel.exception.PortalException, 272 com.liferay.portal.kernel.exception.SystemException { 273 return _trashEntryLocalService.addTrashEntry(userId, groupId, 274 className, classPK, status, statusOVPs, typeSettingsProperties); 275 } 276 277 public void checkEntries() 278 throws com.liferay.portal.kernel.exception.PortalException, 279 com.liferay.portal.kernel.exception.SystemException { 280 _trashEntryLocalService.checkEntries(); 281 } 282 283 public void checkEntriesAttachments() 284 throws com.liferay.portal.kernel.exception.PortalException, 285 com.liferay.portal.kernel.exception.SystemException { 286 _trashEntryLocalService.checkEntriesAttachments(); 287 } 288 289 /** 290 * Deletes the trash entry with the primary key. 291 * 292 * @param entryId the primary key of the trash entry 293 * @throws PortalException if a trash entry with the primary key could not 294 be found 295 * @throws SystemException if a system exception occurred 296 */ 297 public com.liferay.portlet.trash.model.TrashEntry deleteEntry(long entryId) 298 throws com.liferay.portal.kernel.exception.PortalException, 299 com.liferay.portal.kernel.exception.SystemException { 300 return _trashEntryLocalService.deleteEntry(entryId); 301 } 302 303 /** 304 * Deletes the trash entry with the entity class name and primary key. 305 * 306 * @param className the class name of entity 307 * @param classPK the primary key of the entry 308 * @throws PortalException if a trash entry with the primary key could not 309 be found 310 * @throws SystemException if a system exception occurred 311 */ 312 public com.liferay.portlet.trash.model.TrashEntry deleteEntry( 313 java.lang.String className, long classPK) 314 throws com.liferay.portal.kernel.exception.PortalException, 315 com.liferay.portal.kernel.exception.SystemException { 316 return _trashEntryLocalService.deleteEntry(className, classPK); 317 } 318 319 public com.liferay.portlet.trash.model.TrashEntry deleteEntry( 320 com.liferay.portlet.trash.model.TrashEntry trashEntry) 321 throws com.liferay.portal.kernel.exception.SystemException { 322 return _trashEntryLocalService.deleteEntry(trashEntry); 323 } 324 325 /** 326 * Returns the trash entry with the primary key. 327 * 328 * @param entryId the primary key of the entry 329 * @return the trash entry with the primary key 330 * @throws SystemException if a system exception occurred 331 */ 332 public com.liferay.portlet.trash.model.TrashEntry fetchEntry(long entryId) 333 throws com.liferay.portal.kernel.exception.SystemException { 334 return _trashEntryLocalService.fetchEntry(entryId); 335 } 336 337 /** 338 * Returns the trash entry with the entity class name and primary key. 339 * 340 * @param className the class name of the entity 341 * @param classPK the primary key of the entity 342 * @return the trash entry with the entity class name and primary key 343 * @throws SystemException if a system exception occurred 344 */ 345 public com.liferay.portlet.trash.model.TrashEntry fetchEntry( 346 java.lang.String className, long classPK) 347 throws com.liferay.portal.kernel.exception.SystemException { 348 return _trashEntryLocalService.fetchEntry(className, classPK); 349 } 350 351 /** 352 * Returns the trash entries with the matching group ID. 353 * 354 * @param groupId the primary key of the group 355 * @return the trash entries with the group ID 356 * @throws SystemException if a system exception occurred 357 */ 358 public java.util.List<com.liferay.portlet.trash.model.TrashEntry> getEntries( 359 long groupId) 360 throws com.liferay.portal.kernel.exception.SystemException { 361 return _trashEntryLocalService.getEntries(groupId); 362 } 363 364 /** 365 * Returns a range of all the trash entries matching the group ID. 366 * 367 * @param groupId the primary key of the group 368 * @param start the lower bound of the range of trash entries to return 369 * @param end the upper bound of the range of trash entries to return (not 370 inclusive) 371 * @return the range of matching trash entries 372 * @throws SystemException if a system exception occurred 373 */ 374 public java.util.List<com.liferay.portlet.trash.model.TrashEntry> getEntries( 375 long groupId, int start, int end) 376 throws com.liferay.portal.kernel.exception.SystemException { 377 return _trashEntryLocalService.getEntries(groupId, start, end); 378 } 379 380 /** 381 * Returns a range of all the trash entries matching the group ID. 382 * 383 * @param groupId the primary key of the group 384 * @param start the lower bound of the range of trash entries to return 385 * @param end the upper bound of the range of trash entries to return (not 386 inclusive) 387 * @param obc the comparator to order the trash entries (optionally 388 <code>null</code>) 389 * @return the range of matching trash entries ordered by comparator 390 <code>obc</code> 391 * @throws SystemException if a system exception occurred 392 */ 393 public java.util.List<com.liferay.portlet.trash.model.TrashEntry> getEntries( 394 long groupId, int start, int end, 395 com.liferay.portal.kernel.util.OrderByComparator obc) 396 throws com.liferay.portal.kernel.exception.SystemException { 397 return _trashEntryLocalService.getEntries(groupId, start, end, obc); 398 } 399 400 /** 401 * Returns the number of trash entries with the group ID. 402 * 403 * @param groupId the primary key of the group 404 * @return the number of matching trash entries 405 * @throws SystemException if a system exception occurred 406 */ 407 public int getEntriesCount(long groupId) 408 throws com.liferay.portal.kernel.exception.SystemException { 409 return _trashEntryLocalService.getEntriesCount(groupId); 410 } 411 412 /** 413 * Returns the trash entry with the primary key. 414 * 415 * @param entryId the primary key of the trash entry 416 * @return the trash entry with the primary key 417 * @throws PortalException if a trash entry with the primary key could not 418 be found 419 * @throws SystemException if a system exception occurred 420 */ 421 public com.liferay.portlet.trash.model.TrashEntry getEntry(long entryId) 422 throws com.liferay.portal.kernel.exception.PortalException, 423 com.liferay.portal.kernel.exception.SystemException { 424 return _trashEntryLocalService.getEntry(entryId); 425 } 426 427 /** 428 * Returns the entry with the entity class name and primary key. 429 * 430 * @param className the class name of the entity 431 * @param classPK the primary key of the entity 432 * @return the trash entry with the entity class name and primary key 433 * @throws PortalException if a trash entry with the primary key could not 434 be found 435 * @throws SystemException if a system exception occurred 436 */ 437 public com.liferay.portlet.trash.model.TrashEntry getEntry( 438 java.lang.String className, long classPK) 439 throws com.liferay.portal.kernel.exception.PortalException, 440 com.liferay.portal.kernel.exception.SystemException { 441 return _trashEntryLocalService.getEntry(className, classPK); 442 } 443 444 /** 445 * Returns all the trash versions associated with the trash entry. 446 * 447 * @param entryId the primary key of the trash entry 448 * @return all the trash versions associated with the trash entry 449 * @throws SystemException if a system exception occurred 450 */ 451 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> getVersions( 452 long entryId) 453 throws com.liferay.portal.kernel.exception.SystemException { 454 return _trashEntryLocalService.getVersions(entryId); 455 } 456 457 /** 458 * Returns all the trash versions associated with the trash entry. 459 * 460 * @param className the class name of the trash entity 461 * @param classPK the primary key of the trash entity 462 * @return all the trash versions associated with the trash entry 463 * @throws SystemException if a system exception occurred 464 */ 465 public java.util.List<com.liferay.portlet.trash.model.TrashVersion> getVersions( 466 java.lang.String className, long classPK) 467 throws com.liferay.portal.kernel.exception.SystemException { 468 return _trashEntryLocalService.getVersions(className, classPK); 469 } 470 471 public com.liferay.portal.kernel.search.Hits search(long companyId, 472 long groupId, long userId, java.lang.String keywords, int start, 473 int end, com.liferay.portal.kernel.search.Sort sort) 474 throws com.liferay.portal.kernel.exception.SystemException { 475 return _trashEntryLocalService.search(companyId, groupId, userId, 476 keywords, start, end, sort); 477 } 478 479 /** 480 * @deprecated Renamed to {@link #getWrappedService} 481 */ 482 public TrashEntryLocalService getWrappedTrashEntryLocalService() { 483 return _trashEntryLocalService; 484 } 485 486 /** 487 * @deprecated Renamed to {@link #setWrappedService} 488 */ 489 public void setWrappedTrashEntryLocalService( 490 TrashEntryLocalService trashEntryLocalService) { 491 _trashEntryLocalService = trashEntryLocalService; 492 } 493 494 public TrashEntryLocalService getWrappedService() { 495 return _trashEntryLocalService; 496 } 497 498 public void setWrappedService(TrashEntryLocalService trashEntryLocalService) { 499 _trashEntryLocalService = trashEntryLocalService; 500 } 501 502 private TrashEntryLocalService _trashEntryLocalService; 503 }