Interface UserRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<User,String>, org.springframework.data.jpa.repository.JpaRepository<User,String>, org.springframework.data.repository.PagingAndSortingRepository<User,String>, org.springframework.data.repository.query.QueryByExampleExecutor<User>, org.springframework.data.repository.Repository<User,String>

@Repository public interface UserRepository extends org.springframework.data.jpa.repository.JpaRepository<User,String>
Repository interface to do queries for Users data.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get user is in BBDD.
    <S extends User>
    S
    saveAndFlush(S entity)
    Saves an entity and flushes changes instantly.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush

    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 Details

    • findOneByDocumentIdAndCompanyId

      User findOneByDocumentIdAndCompanyId(@Param("username") String documentId, @Param("companyId") String companyId)
      Get user is in BBDD.
      Parameters:
      documentId - document id of user.
      companyId - bank entity.
      Returns:
      User object if it is possiblr to find.
    • saveAndFlush

      <S extends User> S saveAndFlush(S entity)
      Saves an entity and flushes changes instantly.
      Specified by:
      saveAndFlush in interface org.springframework.data.jpa.repository.JpaRepository<User,String>
      Parameters:
      entity - user entity to save.
      Returns:
      the saved entity