FoodItemDao

interface FoodItemDao : JpaRepository<FoodItem, Long>

Interface to the database "foods" table

Functions

Link copied to clipboard
abstract fun count(): Long
abstract fun <S : FoodItem> count(example: Example<S>): Long
Link copied to clipboard
abstract fun delete(entity: FoodItem)
Link copied to clipboard
abstract fun deleteAll()
abstract fun deleteAll(entities: MutableIterable<FoodItem>)
Link copied to clipboard
abstract fun deleteAllById(ids: MutableIterable<Long>)
Link copied to clipboard
Link copied to clipboard
abstract fun deleteAllInBatch()
abstract fun deleteAllInBatch(entities: MutableIterable<FoodItem>)
Link copied to clipboard
abstract fun deleteById(id: Long)
Link copied to clipboard
Link copied to clipboard
abstract fun <S : FoodItem> exists(example: Example<S>): Boolean
Link copied to clipboard
abstract fun existsById(id: Long): Boolean
Link copied to clipboard
abstract override fun <S : FoodItem> findAll(example: Example<S>): MutableList<S>
abstract override fun <S : FoodItem> findAll(example: Example<S>, sort: Sort): MutableList<S>
abstract override fun findAll(): MutableList<FoodItem>
abstract override fun findAll(sort: Sort): MutableList<FoodItem>
abstract fun findAll(pageable: Pageable): Page<FoodItem>
abstract fun <S : FoodItem> findAll(example: Example<S>, pageable: Pageable): Page<S>
Link copied to clipboard
abstract override fun findAllById(ids: MutableIterable<Long>): MutableList<FoodItem>
Link copied to clipboard
abstract fun <S : FoodItem, R : Any> findBy(example: Example<S>, queryFunction: Function<FluentQuery.FetchableFluentQuery<S>, R>): R
Link copied to clipboard
abstract fun findById(id: Long): Optional<FoodItem>
Link copied to clipboard
abstract fun findByName(name: String): Optional<FoodItem>

Get a food item by its name. May return Optional.empty

Link copied to clipboard
abstract fun <S : FoodItem> findOne(example: Example<S>): Optional<S>
Link copied to clipboard
abstract fun flush()
Link copied to clipboard
abstract fun getById(id: Long): FoodItem
Link copied to clipboard
abstract fun getOne(id: Long): FoodItem
Link copied to clipboard
abstract fun getReferenceById(id: Long): FoodItem
Link copied to clipboard
abstract fun <S : FoodItem> save(entity: S): S
Link copied to clipboard
abstract override fun <S : FoodItem> saveAll(entities: MutableIterable<S>): MutableList<S>
Link copied to clipboard
abstract fun <S : FoodItem> saveAllAndFlush(entities: MutableIterable<S>): MutableList<S>
Link copied to clipboard
abstract fun <S : FoodItem> saveAndFlush(entity: S): S