Package balu.pizza.webapp.repositiries
Interface IngredientRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Ingredient,
,Integer> org.springframework.data.jpa.repository.JpaRepository<Ingredient,
,Integer> org.springframework.data.repository.PagingAndSortingRepository<Ingredient,
,Integer> org.springframework.data.repository.query.QueryByExampleExecutor<Ingredient>
,org.springframework.data.repository.Repository<Ingredient,
Integer>
@Repository
public interface IngredientRepository
extends org.springframework.data.jpa.repository.JpaRepository<Ingredient,Integer>
Repository for Entity Ingredient
-
Method Summary
Modifier and TypeMethodDescriptionfindByName
(String name) Search Ingredient by NamefindByPizzas
(Pizza pizza, org.springframework.data.domain.Sort type) Selection from the pizza ingredient databaseMethods 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, getReferenceById, 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, findBy, findOne
-
Method Details
-
findByPizzas
Selection from the pizza ingredient database- Parameters:
pizza
- Pizzatype
- The list will be sorted by type of ingredient- Returns:
- Sorted list of ingredients that are part of the pizza
-
findByName
Search Ingredient by Name- Parameters:
name
-- Returns:
- An object that may contain an Ingredient or be empty
-