Package org.duracloud.snapshot.db.repo
Interface RestoreRepo
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Restoration,,Long> org.springframework.data.jpa.repository.JpaRepository<Restoration,,Long> org.springframework.data.repository.PagingAndSortingRepository<Restoration,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Restoration>,org.springframework.data.repository.Repository<Restoration,Long>
@Repository("restoreRepo")
public interface RestoreRepo
extends org.springframework.data.jpa.repository.JpaRepository<Restoration,Long>
- Author:
- Daniel Bernstein Date: Jul 21, 2014
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteByRestorationId(String restoreId) Deletes the restore entityfindByDestinationHost(String host) Returns a list of restorations for a given destinantion host.findByRestorationId(String restorationId) Returns a list of restorations based on the restoration's snapshot name property.findByStatus(org.duracloud.snapshot.dto.RestoreStatus status) Returns a list of restorations based on the restoration's statusMethods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByDestinationHost
Returns a list of restorations for a given destinantion host.- Parameters:
host-- Returns:
-
findBySnapshotNameOrderByModifiedDesc
Returns a list of restorations based on the restoration's snapshot name property.- Parameters:
name-- Returns:
-
findByRestorationId
- Parameters:
restorationId-- Returns:
-
findByStatus
Returns a list of restorations based on the restoration's status- Parameters:
status-- Returns:
-
findRunning
@Query("select r from Restoration r where r.status not in (\'RETRIEVING_FROM_STORAGE\',\'RESTORATION_COMPLETE\',\'RESTORATION_EXPIRED\',\'ERROR\')") List<Restoration> findRunning() -
deleteByRestorationId
Deletes the restore entity- Parameters:
restoreId-
-