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>, UsersRepositoryCustom

@Repository public interface UsersRepository extends org.springframework.data.jpa.repository.JpaRepository<User,String>, UsersRepositoryCustom
Spring Data repository used to access the users in BBDD. See User.
  • Method Summary

    Modifier and Type
    Method
    Description
    Find users by device operation system.
    findByUserOnboardingId(String userOnboardingId)
    Find User by Onboarding identification.
    <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

    Methods inherited from interface es.kukenan.smartfi.microservice.communication.repository.UsersRepositoryCustom

    refresh
  • Method Details

    • 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>
      Type Parameters:
      S - the entity type.
      Parameters:
      entity - the entity to save
      Returns:
      the saved entity
    • findByDeviceOperationSystem

      @Query(nativeQuery=true, value="SELECT u.* FROM \"user\" u INNER JOIN push_notification p ON u.id = p.id INNEr JOIN mobile_operation_system mos ON mos.id = p.operation_system WHERE mos.name = :operation_system") List<User> findByDeviceOperationSystem(@Param("operation_system") String operationSystem)
      Find users by device operation system.
      Parameters:
      operationSystem - device operation system
      Returns:
      The users list
    • findByUserOnboardingId

      @Query("SELECT u FROM User u WHERE u.userOnboardingId = :user_onboarding_id") Optional<User> findByUserOnboardingId(@Param("user_onboarding_id") String userOnboardingId)
      Find User by Onboarding identification.
      Parameters:
      userOnboardingId - user onboarding identification.
      Returns:
      Optional User.