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 Type
    Method
    Description
    Search Ingredient by Name
    findByPizzas(Pizza pizza, org.springframework.data.domain.Sort type)
    Selection from the pizza ingredient database

    Methods 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

      List<Ingredient> findByPizzas(Pizza pizza, org.springframework.data.domain.Sort type)
      Selection from the pizza ingredient database
      Parameters:
      pizza - Pizza
      type - The list will be sorted by type of ingredient
      Returns:
      Sorted list of ingredients that are part of the pizza
    • findByName

      Optional<Ingredient> findByName(String name)
      Search Ingredient by Name
      Parameters:
      name -
      Returns:
      An object that may contain an Ingredient or be empty