Interface JobRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Job,Long>, org.springframework.data.jpa.repository.JpaRepository<Job,Long>, org.springframework.data.repository.ListCrudRepository<Job,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<Job,Long>, org.springframework.data.repository.PagingAndSortingRepository<Job,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Job>, org.springframework.data.repository.Repository<Job,Long>

@Transactional public interface JobRepository extends org.springframework.data.jpa.repository.JpaRepository<Job,Long>
Data Access Object for the Job class
Author:
Dr. Thomas Bassler
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
     
    int
     
    int
     
     
    Deprecated.
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findAllByJobState

      @Query("select j from Job j where j.jobState = ?1") List<Job> findAllByJobState(Job.JobState jobState)
    • findAllByProcessingOrder

      @Query("select j from Job j where j.processingOrder.id = ?1") List<Job> findAllByProcessingOrder(long orderId)
    • findAllByJobStateAndProcessingOrder

      @Deprecated @Query("select j from Job j where j.jobState = ?1 and j.processingOrder.id = ?2") List<Job> findAllByJobStateAndProcessingOrder(Job.JobState jobState, long orderId)
      Deprecated.
    • countAllByJobStateAndProcessingOrder

      @Query("select count(*) from Job j where j.jobState = ?1 and j.processingOrder.id = ?2") int countAllByJobStateAndProcessingOrder(Job.JobState jobState, long orderId)
    • countJobNotFinishedByProcessingOrderId

      @Query("SELECT COUNT(*) FROM Job j WHERE j.processingOrder.id = ?1 AND j.jobState NOT IN (\'CLOSED\', \'COMPLETED\', \'FAILED\')") int countJobNotFinishedByProcessingOrderId(long id)
    • countJobFailedByProcessingOrderId

      @Query("SELECT COUNT(*) FROM Job j WHERE j.processingOrder.id = ?1 AND j.jobState = \'FAILED\'") int countJobFailedByProcessingOrderId(long id)
    • countJobOnHoldByProcessingOrderId

      @Query("SELECT COUNT(*) FROM Job j WHERE j.processingOrder.id = ?1 AND j.jobState = \'ON_HOLD\'") int countJobOnHoldByProcessingOrderId(long id)