|
|
|
@ -7,7 +7,6 @@ import org.springframework.data.jpa.repository.JpaRepository; |
|
|
|
|
import org.springframework.data.jpa.repository.Query; |
|
|
|
|
import org.springframework.stereotype.Repository; |
|
|
|
|
|
|
|
|
|
import com.mousetech.gourmetj.persistence.model.Category; |
|
|
|
|
import com.mousetech.gourmetj.persistence.model.Recipe; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -24,7 +23,7 @@ import com.mousetech.gourmetj.persistence.model.Recipe; |
|
|
|
|
public interface RecipeRepository |
|
|
|
|
extends JpaRepository<Recipe, Long> { |
|
|
|
|
|
|
|
|
|
List<Recipe> findByTitleContaining(String searchText); |
|
|
|
|
List<Recipe> findByTitleContainingIgnoreCase(String searchText); |
|
|
|
|
|
|
|
|
|
@EntityGraph(value="Recipe.findWorkingSet") |
|
|
|
|
public Recipe findDetailsById(Long recipeId); |
|
|
|
@ -32,11 +31,11 @@ public interface RecipeRepository |
|
|
|
|
@Query(name = "Recipe.findCusines", nativeQuery = true) |
|
|
|
|
List<String> FindCuisinesNative(); |
|
|
|
|
|
|
|
|
|
List<Recipe> findByCategories_CategoryContains(String searchText); |
|
|
|
|
List<Recipe> findByCategories_CategoryContainsIgnoreCase(String searchText); |
|
|
|
|
|
|
|
|
|
List<Recipe> findByCuisineContains(String searchText); |
|
|
|
|
List<Recipe> findByCuisineContainsIgnoreCase(String searchText); |
|
|
|
|
|
|
|
|
|
List<Recipe> findDistinctByIngredientHash_ItemContains( |
|
|
|
|
List<Recipe> findDistinctByIngredientHash_ItemContainsIgnoreCase( |
|
|
|
|
String searchText); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|