Class JaversSnapshotRepositoryImpl

java.lang.Object
org.qubership.atp.environments.repo.impl.AbstractRepository
org.qubership.atp.environments.repo.impl.JaversSnapshotRepositoryImpl

@Repository public class JaversSnapshotRepositoryImpl extends AbstractRepository
  • Constructor Details

    • JaversSnapshotRepositoryImpl

      @Autowired public JaversSnapshotRepositoryImpl(com.querydsl.sql.SQLQueryFactory queryFactory)
  • Method Details

    • getTerminatedSnapshots

      public List<JaversVersionResponse> getTerminatedSnapshots()
      Get terminated snapshots.
      Returns:
      List of JaversVersionResponse.
    • getGlobalIdAndCount

      public List<JaversCountResponse> getGlobalIdAndCount(Integer count)
      Get globalId and number of snapshots.
      Parameters:
      count - number of last revision.
      Returns:
      List of JaversCountResponse
    • getOld

      public List<JaversVersionResponse> getOld(Long globalId, Long count)
      Get globalId, commitId and version for old objects.
      Parameters:
      globalId - global id.
      count - number of revisions which must be removed.
      Returns:
      List of JaversVersionResponse
    • deleteByVersionAndGlobalIdAndCommitId

      public void deleteByVersionAndGlobalIdAndCommitId(Long version, Long globalId, Long commitId)
      Delete snapshots by version, globalId and commitId.
      Parameters:
      version - old version.
      globalId - global id.
      commitId - commit id.
    • deleteByGlobalIds

      public void deleteByGlobalIds(List<Long> globalIds)
      Delete snapshots by globalIds.
      Parameters:
      globalIds - globalIds.
    • getCountByCommitId

      public Long getCountByCommitId(Long commitId)
      Get number of snapshots.
      Parameters:
      commitId - commit id.
      Returns:
      Long number of snapshots by commit id.
    • updateAsInitial

      public void updateAsInitial(Long globalId)
      Update snapshot as initial.
      Parameters:
      globalId - global id.