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
Modifier and TypeMethodDescriptionlongcount()longcountBySourceHost(String host) longcountBySourceHostAndSourceStoreId(String host, String storeId) longcountBySourceHostAndSourceStoreIdAndStatus(String host, String storeId, org.duracloud.snapshot.dto.SnapshotStatus status) longcountBySourceHostAndStatus(String host, org.duracloud.snapshot.dto.SnapshotStatus status) longcountBySourceStoreId(String storeId) longcountBySourceStoreIdAndStatus(String storeId, org.duracloud.snapshot.dto.SnapshotStatus status) longcountByStatusOrderBySnapshotDateAsc(org.duracloud.snapshot.dto.SnapshotStatus status) voiddeleteByName(String snapshotId) findAll()findByName(String snapshotId) findBySnapshotAlternateIds(String alternateId) findBySourceHost(String host) findBySourceHostAndSourceStoreId(String host, String storeId) findBySourceHostAndSourceStoreIdAndStatus(String host, String storeId, org.duracloud.snapshot.dto.SnapshotStatus status) findBySourceHostAndStatus(String host, org.duracloud.snapshot.dto.SnapshotStatus status) findBySourceStoreId(String storeId) findBySourceStoreIdAndStatus(String storeId, org.duracloud.snapshot.dto.SnapshotStatus status) findByStatusOrderBySnapshotDateAsc(org.duracloud.snapshot.dto.SnapshotStatus status) Methods inherited from interface org.springframework.data.repository.CrudRepository
delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, 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
-
findAll
-
findBySourceHost
- Parameters:
host- where snapshot originated- Returns:
- all snapshots with the given host
-
findBySourceStoreId
- Parameters:
storeId- storage provider ID- Returns:
- all snapshots with the given store ID
-
findBySourceHostAndSourceStoreId
- Parameters:
host- where snapshot originatedstoreId- storage provider ID- Returns:
- all snapshots with the given host and store ID
-
findByStatusOrderBySnapshotDateAsc
- 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
- Parameters:
snapshotId- ID of snapshot- Returns:
- snapshot with the given ID
-
findBySnapshotAlternateIds
- Parameters:
alternateId- alternate snapshot ID (i.e. bag ID)- Returns:
- snapshot with the given alternate ID
-
count
long count() -
countBySourceHost
- Parameters:
host- where snapshot originated- Returns:
- count of snapshots with the given host
-
countBySourceStoreId
- Parameters:
storeId- storage provider ID- Returns:
- count of snapshots with the given store ID
-
countBySourceHostAndSourceStoreId
- Parameters:
host- where snapshot originatedstoreId- storage provider ID- Returns:
- count of snapshots with the given host and store ID
-
countByStatusOrderBySnapshotDateAsc
long countByStatusOrderBySnapshotDateAsc(org.duracloud.snapshot.dto.SnapshotStatus status) - Parameters:
status- current snapshot status- Returns:
- count of snapshots with the given status
-
countBySourceHostAndStatus
- Parameters:
host- where snapshot originatedstatus- current snapshot status- Returns:
- count of snapshots with the given host and status
-
countBySourceStoreIdAndStatus
long countBySourceStoreIdAndStatus(String storeId, org.duracloud.snapshot.dto.SnapshotStatus status) - Parameters:
storeId- storage provider IDstatus- current snapshot status- Returns:
- count of snapshots with the given store ID and status
-
countBySourceHostAndSourceStoreIdAndStatus
long countBySourceHostAndSourceStoreIdAndStatus(String host, String storeId, org.duracloud.snapshot.dto.SnapshotStatus status) - Parameters:
host- where snapshot originatedstoreId- storage provider IDstatus- current snapshot status- Returns:
- count of snapshots with the given host, store ID, and status
-
deleteByName
- Parameters:
snapshotId- ID of snapshot
-