Interface CredentialEventStoreRepository

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      List<String> findDistictCredentialTransactionIdsInList​(List<String> requestIds)
      Find credential transaction id by credential transaction id order by cr D times desc.
      Optional<LocalDateTime> findMaxCrDTimesByStatusCode​(String statusCode)
      Find max cr D times by status code.
      org.springframework.data.domain.Page<CredentialEventStore> findNewOrFailedEvents​(org.springframework.data.domain.Pageable pageable)
      Find new or failed events.
      Optional<CredentialEventStore> findTop1ByCredentialTransactionIdOrderByCrDTimesDesc​(String requestId)
      Find top 1 by credential transaction id order by cr D times desc.
      • 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

      • findNewOrFailedEvents

        @Query(value="SELECT * from credential_event_store where status_code in (\'NEW\', \'FAILED\')",
               nativeQuery=true)
        org.springframework.data.domain.Page<CredentialEventStore> findNewOrFailedEvents​(org.springframework.data.domain.Pageable pageable)
        Find new or failed events.
        Parameters:
        pageable - the pageable
        Returns:
        the page
      • findMaxCrDTimesByStatusCode

        @Query("SELECT  MAX(crDTimes) from CredentialEventStore where statusCode = :statusCode")
        Optional<LocalDateTime> findMaxCrDTimesByStatusCode​(@Param("statusCode")
                                                            String statusCode)
        Find max cr D times by status code.
        Parameters:
        statusCode - the status code
        Returns:
        the optional
      • findTop1ByCredentialTransactionIdOrderByCrDTimesDesc

        Optional<CredentialEventStore> findTop1ByCredentialTransactionIdOrderByCrDTimesDesc​(String requestId)
        Find top 1 by credential transaction id order by cr D times desc.
        Parameters:
        requestId - the request id
        Returns:
        the optional
      • findDistictCredentialTransactionIdsInList

        @Query("SELECT DISTINCT(credentialTransactionId) FROM CredentialEventStore WHERE credentialTransactionId IN (:requestIds)")
        List<String> findDistictCredentialTransactionIdsInList​(@Param("requestIds")
                                                               List<String> requestIds)
        Find credential transaction id by credential transaction id order by cr D times desc.
        Parameters:
        requestIds - the request ids
        Returns:
        the list