package sklep.alternatywne_wersje_bazy_danych;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import sklep.model.Product;


@Repository
public interface ProductRepository_v8 extends JpaRepository<Product, Integer> {

	List<Product> findByProductName(String name);

	List<Product> findByProductNameContains(String name);

	List<Product> findByProductNameContainingIgnoringCase(String name);

	List<Product> findByPriceBetween(BigDecimal min, BigDecimal max);

	List<Product> findByProductNameContainingIgnoringCaseAndPriceBetween(String name, BigDecimal min, BigDecimal max);

}