Interface ProfileRepository

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

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<Profile> findById​(java.lang.String id)  
      java.util.List<Profile> findByParentId​(java.lang.String parentId)  
      java.util.Optional<Profile> findByUserId​(java.lang.String userId)  
      java.util.Optional<Profile> findProfileByEmail​(java.lang.String emailAddress)  
      java.util.Optional<Profile> findProfileIgnoreCase​(java.lang.String firstName, java.lang.String lastName, java.lang.String emailAddress)  
      org.springframework.data.domain.Page<Profile> 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, 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

      • findById

        java.util.Optional<Profile> findById​(java.lang.String id)
        Specified by:
        findById in interface org.springframework.data.repository.CrudRepository<Profile,​java.lang.String>
      • findProfileIgnoreCase

        @Query("{\'firstName\': {$regex:?0,$options:\'i\'}, \'lastName\' : {$regex:?1,$options:\'i\'}, \'emailAddress\' : {$regex:?2,$options:\'i\'} }")
        java.util.Optional<Profile> findProfileIgnoreCase​(java.lang.String firstName,
                                                          java.lang.String lastName,
                                                          java.lang.String emailAddress)
      • findProfileByEmail

        @Query("{\'emailAddress\' : ?0 }")
        java.util.Optional<Profile> findProfileByEmail​(java.lang.String emailAddress)
      • findByUserId

        @Query("{\'user.id\' : ?0}")
        java.util.Optional<Profile> findByUserId​(java.lang.String userId)
      • findByParentId

        @Query("{\'embeddedParent.id\' : ?0}")
        java.util.List<Profile> findByParentId​(java.lang.String parentId)
      • search

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