Interface MenuItemRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<MenuItem,Long>, CustomMenuItemRepository, org.springframework.data.repository.Repository<MenuItem,Long>

@Repository public interface MenuItemRepository extends org.springframework.data.repository.CrudRepository<MenuItem,Long>, CustomMenuItemRepository
  • Method Details

    • findByDiningCommonsCodeAndMealCodeAndNameAndStation

      Optional<MenuItem> findByDiningCommonsCodeAndMealCodeAndNameAndStation(String diningCommonsCode, String mealCode, String name, String station)
      This method returns a MenuItem entity with a given id.
      Parameters:
      diningCommonsCode - of menu item
      mealCode - of menu item
      name - of menu item
      station - of menu item
      Returns:
      Optional of Menu item based on the parameters (empty if not found)
    • existsById

      boolean existsById(Long id)
      Specified by:
      existsById in interface org.springframework.data.repository.CrudRepository<MenuItem,Long>
    • findTop20ByNameContainingIgnoreCaseOrderByNameAscIdAsc

      List<MenuItem> findTop20ByNameContainingIgnoreCaseOrderByNameAscIdAsc(String name)
      This method returns up to 20 menu items whose name contains the given text, ignoring case, ordered by name (then id, so that the order is stable).
      Parameters:
      name - text to look for anywhere in the name of the menu item
      Returns:
      up to 20 matching menu items (empty if none match)