package nb.bar.management.model.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import nb.bar.management.model.reference_impl.ProductImpl;

@Repository
public interface ProductRepository extends CrudRepository<ProductImpl, Long> {
	
	@Query("SELECT p FROM ProductImpl p WHERE p.name LIKE %:name%")
	public List<ProductImpl> findByName(@Param(value = "name") String name);
}
