Interface RidRepository

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

@Repository public interface RidRepository extends BaseRepository<Rid,Integer>
Rid Generator repository.
Since:
1.0.0
Author:
Ritesh Sinha, Abhishek Kumar
  • Method Summary

    Modifier and Type
    Method
    Description
    Method to fetch last updated sequence no.
    int
    updateRid(int currentId, int previousId)
    Method to update previous sequence no.

    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

    • findLastRid

      @Query(value="select r.curr_seq_no, r.cr_by, r.cr_dtimes, r.upd_by, r.upd_dtimes FROM rid_seq r ", nativeQuery=true) Rid findLastRid()
      Method to fetch last updated sequence no.
      Returns:
      the entity.
    • updateRid

      @Modifying @Transactional @Query("UPDATE Rid SET currentSequenceNo=?1 WHERE currentSequenceNo=?2") int updateRid(int currentId, int previousId)
      Method to update previous sequence no.
      Parameters:
      currentId - the current sequence no.
      previousId - the previous sequence no.
      Returns:
      the number of rows updated.