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 Detail

      • findAll

        java.util.List<Snapshot> findAll()
        Specified by:
        findAll in interface org.springframework.data.repository.CrudRepository<Snapshot,​java.lang.Long>
        Specified by:
        findAll in interface org.springframework.data.jpa.repository.JpaRepository<Snapshot,​java.lang.Long>
        Returns:
        all snapshots
      • 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 originated
        storeId - 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 originated
        status - 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 ID
        status - 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 originated
        storeId - storage provider ID
        status - 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:
        count in interface org.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 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​(java.lang.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​(java.lang.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​(java.lang.String host,
                                                        java.lang.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​(java.lang.String snapshotId)
        Parameters:
        snapshotId - ID of snapshot