FilterRepository

@NoRepositoryBean
interface FilterRepository<E, ID : Serializable> : JpaRepository<E, ID> (source)

Interface for filter repositories that extend JpaRepository. This interface provides a method for filtering entities. Use this interface as a base interface for your repositories that need to filter entities.

Add a Spring configuration class that enables JPA repositories and sets the repositoryBaseClass to DefaultFilterRepository.

Example:


Parameters

E

the entity type

ID

the ID type of the entity

Inheritors

Functions

Link copied to clipboard
abstract fun count(): Long
abstract fun <S : E> count(example: Example<S>): Long
Link copied to clipboard
abstract fun delete(entity: E)
Link copied to clipboard
abstract fun deleteAll()
abstract fun deleteAll(entities: MutableIterable<E>)
Link copied to clipboard
abstract fun deleteAllById(ids: MutableIterable<ID>)
Link copied to clipboard
Link copied to clipboard
abstract fun deleteAllInBatch()
abstract fun deleteAllInBatch(entities: MutableIterable<E>)
Link copied to clipboard
abstract fun deleteById(id: ID)
Link copied to clipboard
open fun deleteInBatch(entities: MutableIterable<E>)
Link copied to clipboard
abstract fun <S : E> exists(example: Example<S>): Boolean
Link copied to clipboard
abstract fun existsById(id: ID): Boolean
Link copied to clipboard
abstract override fun <S : E> findAll(example: Example<S>): MutableList<S>
abstract override fun <S : E> findAll(example: Example<S>, sort: Sort): MutableList<S>
abstract override fun findAll(): MutableList<E>
abstract override fun findAll(sort: Sort): MutableList<E>
abstract fun findAll(pageable: Pageable): Page<E>
abstract fun <S : E> findAll(example: Example<S>, pageable: Pageable): Page<S>
Link copied to clipboard
abstract override fun findAllById(ids: MutableIterable<ID>): MutableList<E>
Link copied to clipboard
abstract fun <S : E, R : Any> findBy(example: Example<S>, queryFunction: Function<FluentQuery.FetchableFluentQuery<S>, R>): R
Link copied to clipboard
abstract fun findById(id: ID): Optional<E>
Link copied to clipboard
abstract fun <S : E> findOne(example: Example<S>): Optional<S>
Link copied to clipboard
abstract fun flush()
Link copied to clipboard
abstract fun getById(id: ID): E
Link copied to clipboard
abstract fun getEntities(pagination: Pagination, filter: Filter?, sorting: Sorting?, fieldTransformer: TransformFunction<String, String> = createCaseFormatTransformFunction( CaseFormat.LOWER_UNDERSCORE, CaseFormat.LOWER_CAMEL )): Page<E>
Link copied to clipboard
abstract fun getOne(id: ID): E
Link copied to clipboard
abstract fun getReferenceById(id: ID): E
Link copied to clipboard
abstract fun <S : E> save(entity: S): S
Link copied to clipboard
abstract override fun <S : E> saveAll(entities: MutableIterable<S>): MutableList<S>
Link copied to clipboard
abstract fun <S : E> saveAllAndFlush(entities: MutableIterable<S>): MutableList<S>
Link copied to clipboard
abstract fun <S : E> saveAndFlush(entity: S): S