Interface TradeRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<Trade,​Long>, org.springframework.data.jpa.repository.JpaRepository<Trade,​Long>, org.springframework.data.repository.PagingAndSortingRepository<Trade,​Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Trade>, org.springframework.data.repository.Repository<Trade,​Long>

    @Repository
    public interface TradeRepository
    extends org.springframework.data.jpa.repository.JpaRepository<Trade,​Long>
    Trade repository.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      List<Trade> findByOrderByTimestampAsc()
      Retrieve all trades (sorted by timestamp).
      Optional<Trade> findByTradeId​(String tradeId)
      Find a trade by its trade id.
      • 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, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, 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

      • findByTradeId

        Optional<Trade> findByTradeId​(String tradeId)
        Find a trade by its trade id.
        Parameters:
        tradeId - trade id
        Returns:
        trade
      • findByOrderByTimestampAsc

        List<Trade> findByOrderByTimestampAsc()
        Retrieve all trades (sorted by timestamp).
        Returns:
        trades