Interface UserRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<User,​java.lang.String>, org.springframework.data.mongodb.repository.MongoRepository<User,​java.lang.String>, org.springframework.data.repository.PagingAndSortingRepository<User,​java.lang.String>, org.springframework.data.repository.query.QueryByExampleExecutor<User>, org.springframework.data.repository.Repository<User,​java.lang.String>

    @Repository
    public interface UserRepository
    extends org.springframework.data.mongodb.repository.MongoRepository<User,​java.lang.String>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<User> findByUsernameIgnoreCase​(java.lang.String username)  
      org.springframework.data.domain.Page<User> search​(java.lang.String query, org.springframework.data.domain.Pageable page)  
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAllById, findById, save
      • Methods inherited from interface org.springframework.data.mongodb.repository.MongoRepository

        findAll, findAll, findAll, findAll, insert, insert, saveAll
      • 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 Detail

      • findByUsernameIgnoreCase

        java.util.Optional<User> findByUsernameIgnoreCase​(java.lang.String username)
      • search

        @Query("{ $or: [ { \'username\' : {$regex:?0,$options:\'i\'} } ] }")
        org.springframework.data.domain.Page<User> search​(java.lang.String query,
                                                          org.springframework.data.domain.Pageable page)