Interface RidRepository

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Rid findRid​(String centerId, String machineId)
      This method fetch entity for provided center and machine id.
      int updateRid​(int currentSequence, String centerId, String machineId)
      This method update sequence number against provided center and machine id.
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

        deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

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

        count, exists, findAll, findOne
    • Method Detail

      • findRid

        @Query("from Rid r WHERE r.centerId=?1 AND r.machineId=?2")
        Rid findRid​(String centerId,
                    String machineId)
        This method fetch entity for provided center and machine id.
        Parameters:
        centerId - the center id.
        machineId - the machine id.
        Returns:
        the entity.
      • updateRid

        @Modifying
        @Transactional
        @Query("UPDATE Rid r SET r.currentSequenceNo=?1 WHERE r.centerId=?2 AND r.machineId=?3")
        int updateRid​(int currentSequence,
                      String centerId,
                      String machineId)
        This method update sequence number against provided center and machine id.
        Parameters:
        currentSequence - the current sequence number.
        centerId - the center id.
        machineId - the machine id.
        Returns:
        the number of updated rows.