Package org.duracloud.snapshot.db.repo
Interface SnapshotRepo
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Snapshot,java.lang.Long>,org.springframework.data.jpa.repository.JpaRepository<Snapshot,java.lang.Long>,org.springframework.data.repository.PagingAndSortingRepository<Snapshot,java.lang.Long>,org.springframework.data.repository.query.QueryByExampleExecutor<Snapshot>,org.springframework.data.repository.Repository<Snapshot,java.lang.Long>
@Repository("snapshotRepo") public interface SnapshotRepo extends org.springframework.data.jpa.repository.JpaRepository<Snapshot,java.lang.Long>- Author:
- Daniel Bernstein Date: Jul 21, 2014
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longcount()longcountBySourceHost(java.lang.String host)longcountBySourceHostAndSourceStoreId(java.lang.String host, java.lang.String storeId)longcountBySourceHostAndSourceStoreIdAndStatus(java.lang.String host, java.lang.String storeId, org.duracloud.snapshot.dto.SnapshotStatus status)longcountBySourceHostAndStatus(java.lang.String host, org.duracloud.snapshot.dto.SnapshotStatus status)longcountBySourceStoreId(java.lang.String storeId)longcountBySourceStoreIdAndStatus(java.lang.String storeId, org.duracloud.snapshot.dto.SnapshotStatus status)longcountByStatusOrderBySnapshotDateAsc(org.duracloud.snapshot.dto.SnapshotStatus status)voiddeleteByName(java.lang.String snapshotId)java.util.List<Snapshot>findAll()SnapshotfindByName(java.lang.String snapshotId)SnapshotfindBySnapshotAlternateIds(java.lang.String alternateId)java.util.List<Snapshot>findBySourceHost(java.lang.String host)java.util.List<Snapshot>findBySourceHostAndSourceStoreId(java.lang.String host, java.lang.String storeId)java.util.List<Snapshot>findBySourceHostAndSourceStoreIdAndStatus(java.lang.String host, java.lang.String storeId, org.duracloud.snapshot.dto.SnapshotStatus status)java.util.List<Snapshot>findBySourceHostAndStatus(java.lang.String host, org.duracloud.snapshot.dto.SnapshotStatus status)java.util.List<Snapshot>findBySourceStoreId(java.lang.String storeId)java.util.List<Snapshot>findBySourceStoreIdAndStatus(java.lang.String storeId, org.duracloud.snapshot.dto.SnapshotStatus status)java.util.List<Snapshot>findByStatusOrderBySnapshotDateAsc(org.duracloud.snapshot.dto.SnapshotStatus status)-
Methods inherited from interface org.springframework.data.repository.CrudRepository
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
-
findAll
java.util.List<Snapshot> findAll()
-
findBySourceHost
java.util.List<Snapshot> findBySourceHost(java.lang.String host)
- Parameters:
host- where snapshot originated- Returns:
- all snapshots with the given host
-
findBySourceStoreId
java.util.List<Snapshot> findBySourceStoreId(java.lang.String storeId)
- Parameters:
storeId- storage provider ID- Returns:
- all snapshots with the given store ID
-
findBySourceHostAndSourceStoreId
java.util.List<Snapshot> findBySourceHostAndSourceStoreId(java.lang.String host, java.lang.String storeId)
- Parameters:
host- where snapshot originatedstoreId- storage provider ID- Returns:
- all snapshots with the given host and store ID
-
findByStatusOrderBySnapshotDateAsc
java.util.List<Snapshot> findByStatusOrderBySnapshotDateAsc(org.duracloud.snapshot.dto.SnapshotStatus status)
- Parameters:
status- current snapshot status- Returns:
- all snapshots with the given status
-
findBySourceHostAndStatus
java.util.List<Snapshot> findBySourceHostAndStatus(java.lang.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
java.util.List<Snapshot> findBySourceStoreIdAndStatus(java.lang.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
java.util.List<Snapshot> findBySourceHostAndSourceStoreIdAndStatus(java.lang.String host, java.lang.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(java.lang.String snapshotId)
- Parameters:
snapshotId- ID of snapshot- Returns:
- snapshot with the given ID
-
findBySnapshotAlternateIds
Snapshot findBySnapshotAlternateIds(java.lang.String alternateId)
- Parameters:
alternateId- alternate snapshot ID (i.e. bag ID)- Returns:
- snapshot with the given alternate ID
-
count
long count()
- Specified by:
countin interfaceorg.springframework.data.repository.CrudRepository<Snapshot,java.lang.Long>- Returns:
- count of snapshots
-
countBySourceHost
long countBySourceHost(java.lang.String host)
- Parameters:
host- where snapshot originated- Returns:
- count of snapshots with the given host
-
countBySourceStoreId
long countBySourceStoreId(java.lang.String storeId)
- Parameters:
storeId- storage provider ID- Returns:
- count of snapshots with the given store ID
-
countBySourceHostAndSourceStoreId
long countBySourceHostAndSourceStoreId(java.lang.String host, java.lang.String storeId)- 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
long countBySourceHostAndStatus(java.lang.String host, org.duracloud.snapshot.dto.SnapshotStatus status)- Parameters:
host- where snapshot originatedstatus- current snapshot status- Returns:
- count of snapshots with the given host and status
-
countBySourceStoreIdAndStatus
long countBySourceStoreIdAndStatus(java.lang.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(java.lang.String host, java.lang.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
void deleteByName(java.lang.String snapshotId)
- Parameters:
snapshotId- ID of snapshot
-
-