Package org.duracloud.snapshot.db.repo
Interface SnapshotRepo
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Snapshot,Long>,org.springframework.data.jpa.repository.JpaRepository<Snapshot,Long>,org.springframework.data.repository.PagingAndSortingRepository<Snapshot,Long>,org.springframework.data.repository.query.QueryByExampleExecutor<Snapshot>,org.springframework.data.repository.Repository<Snapshot,Long>
@Repository("snapshotRepo") public interface SnapshotRepo extends org.springframework.data.jpa.repository.JpaRepository<Snapshot,Long>- Author:
- Daniel Bernstein Date: Jul 21, 2014
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteByName(String snapshotId)List<Snapshot>findAll()SnapshotfindByName(String snapshotId)SnapshotfindBySnapshotAlternateIds(String alternateId)List<Snapshot>findBySourceHost(String host)List<Snapshot>findBySourceHostAndSourceStoreId(String host, String storeId)List<Snapshot>findBySourceHostAndSourceStoreIdAndStatus(String host, String storeId, org.duracloud.snapshot.dto.SnapshotStatus status)List<Snapshot>findBySourceHostAndStatus(String host, org.duracloud.snapshot.dto.SnapshotStatus status)List<Snapshot>findBySourceStoreId(String storeId)List<Snapshot>findBySourceStoreIdAndStatus(String storeId, org.duracloud.snapshot.dto.SnapshotStatus status)List<Snapshot>findByStatusOrderBySnapshotDateAsc(org.duracloud.snapshot.dto.SnapshotStatus status)-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, delete, delete, deleteAll, exists, findOne, save
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlush
-
-
-
-
Method Detail
-
findBySourceHost
List<Snapshot> findBySourceHost(String host)
- Parameters:
host- where snapshot originated- Returns:
- all snapshots with the given host
-
findBySourceStoreId
List<Snapshot> findBySourceStoreId(String storeId)
- Parameters:
storeId- storage provider ID- Returns:
- all snapshots with the given store ID
-
findBySourceHostAndSourceStoreId
List<Snapshot> findBySourceHostAndSourceStoreId(String host, String storeId)
- Parameters:
host- where snapshot originatedstoreId- storage provider ID- Returns:
- all snapshots with the given host and store ID
-
findByStatusOrderBySnapshotDateAsc
List<Snapshot> findByStatusOrderBySnapshotDateAsc(org.duracloud.snapshot.dto.SnapshotStatus status)
- Parameters:
status- current snapshot status- Returns:
- all snapshots with the given status
-
findBySourceHostAndStatus
List<Snapshot> findBySourceHostAndStatus(String host, org.duracloud.snapshot.dto.SnapshotStatus status)
- Parameters:
host- where snapshot originatedstatus- current snapshot status- Returns:
- all snapshots with the given host and status
-
findBySourceStoreIdAndStatus
List<Snapshot> findBySourceStoreIdAndStatus(String storeId, org.duracloud.snapshot.dto.SnapshotStatus status)
- Parameters:
storeId- storage provider IDstatus- current snapshot status- Returns:
- all snapshots with the given store ID and status
-
findBySourceHostAndSourceStoreIdAndStatus
List<Snapshot> findBySourceHostAndSourceStoreIdAndStatus(String host, String storeId, org.duracloud.snapshot.dto.SnapshotStatus status)
- Parameters:
host- where snapshot originatedstoreId- storage provider IDstatus- current snapshot status- Returns:
- all snapshots with the given host, store ID, and status
-
findByName
Snapshot findByName(String snapshotId)
- Parameters:
snapshotId- ID of snapshot- Returns:
- snapshot with the given ID
-
findBySnapshotAlternateIds
Snapshot findBySnapshotAlternateIds(String alternateId)
- Parameters:
alternateId- alternate snapshot ID (i.e. bag ID)- Returns:
- snapshot with the given alternate ID
-
deleteByName
void deleteByName(String snapshotId)
- Parameters:
snapshotId- ID of snapshot
-
-