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 Details

    • findAll

      List<Snapshot> findAll()
      Specified by:
      findAll in interface org.springframework.data.repository.CrudRepository<Snapshot,Long>
      Specified by:
      findAll in interface org.springframework.data.jpa.repository.JpaRepository<Snapshot,Long>
      Returns:
      all snapshots
    • 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 originated
      storeId - 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 originated
      status - 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 ID
      status - 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 originated
      storeId - storage provider ID
      status - 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
    • count

      long count()
      Specified by:
      count in interface org.springframework.data.repository.CrudRepository<Snapshot,Long>
      Returns:
      count of snapshots
    • countBySourceHost

      long countBySourceHost(String host)
      Parameters:
      host - where snapshot originated
      Returns:
      count of snapshots with the given host
    • countBySourceStoreId

      long countBySourceStoreId(String storeId)
      Parameters:
      storeId - storage provider ID
      Returns:
      count of snapshots with the given store ID
    • countBySourceHostAndSourceStoreId

      long countBySourceHostAndSourceStoreId(String host, String storeId)
      Parameters:
      host - where snapshot originated
      storeId - 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(String host, org.duracloud.snapshot.dto.SnapshotStatus status)
      Parameters:
      host - where snapshot originated
      status - 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 ID
      status - 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 originated
      storeId - storage provider ID
      status - current snapshot status
      Returns:
      count of snapshots with the given host, store ID, and status
    • deleteByName

      void deleteByName(String snapshotId)
      Parameters:
      snapshotId - ID of snapshot