/FileExtraction/Java_unseen/cassandre-tech_cassandre-trading-bot/spring-boot-starter/autoconfigure/src/main/java/tech/cassandre/trading/bot/repository/StrategyRepository.java
package tech.cassandre.trading.bot.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;
import tech.cassandre.trading.bot.domain.Strategy;

import java.util.Optional;

/**
 * {@link Strategy} repository.
 */
@Repository
public interface StrategyRepository extends JpaRepository<Strategy, Long>, JpaSpecificationExecutor<Strategy> {

    /**
     * Find a strategy by its strategy id.
     *
     * @param strategyId strategy id
     * @return strategy
     */
    Optional<Strategy> findByStrategyId(String strategyId);

}
