UserRepository

@Repository
interface UserRepository : CrudRepository<User, Long>

DAO repository for working with "user" db table

Functions

Link copied to clipboard
abstract fun count(): Long
Link copied to clipboard
abstract fun delete(entity: User)
Link copied to clipboard
abstract fun deleteAll()
abstract fun deleteAll(entities: MutableIterable<User>)
Link copied to clipboard
abstract fun deleteAllById(ids: MutableIterable<Long>)
Link copied to clipboard
abstract fun deleteById(id: Long)
Link copied to clipboard
abstract fun existsById(id: Long): Boolean
Link copied to clipboard
abstract fun findAll(): MutableIterable<User>
Link copied to clipboard
Link copied to clipboard
abstract fun findById(id: Long): Optional<User>
Link copied to clipboard
abstract fun findUserByToken(token: String): User?

Find user model by its token

Link copied to clipboard
abstract fun <S : User> save(entity: S): S
Link copied to clipboard
abstract fun <S : User> saveAll(entities: MutableIterable<S>): MutableIterable<S>