Interface AuthLockRepository

  • All Superinterfaces:
    io.mosip.kernel.core.dataaccess.spi.repository.BaseRepository<AuthtypeLock,​Integer>, org.springframework.data.repository.CrudRepository<AuthtypeLock,​Integer>, org.springframework.data.jpa.repository.JpaRepository<AuthtypeLock,​Integer>, org.springframework.data.repository.PagingAndSortingRepository<AuthtypeLock,​Integer>, org.springframework.data.repository.query.QueryByExampleExecutor<AuthtypeLock>, org.springframework.data.repository.Repository<AuthtypeLock,​Integer>

    @Repository
    public interface AuthLockRepository
    extends io.mosip.kernel.core.dataaccess.spi.repository.BaseRepository<AuthtypeLock,​Integer>
    Author:
    Dinesh Karuppiah.T
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      List<Object[]> findByToken​(String tokenId)  
      List<AuthtypeLock> findByTokenAndAuthtypecode​(String tokenId, String authtypecode)  
      • Methods inherited from interface io.mosip.kernel.core.dataaccess.spi.repository.BaseRepository

        create, createNamedQuerySelect, createNamedQueryUpdateOrDelete, createQuerySelect, createQuerySelect, createQueryUpdateOrDelete, delete, findAll, findById, update
      • 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

      • findByToken

        @Query(value="select         t.auth_type_code,         t.status_code,          t.unlock_expiry_datetime      from         ida.uin_auth_lock t      inner join         (             select                 auth_type_code,                 MAX(cr_dtimes) as crd             from                 ida.uin_auth_lock                  where                 token_id = :token_id             group by                 token_id,                 auth_type_code          ) tm              on t.auth_type_code = tm.auth_type_code              and t.cr_dtimes = tm.crd      where         t.token_id = :token_id",
               nativeQuery=true)
        List<Object[]> findByToken​(@Param("token_id")
                                   String tokenId)