Interface UsersRepository
- 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 TypeMethodDescriptionfindByDeviceOperationSystem(String operationSystem) Find users by device operation system.findByUserOnboardingId(String userOnboardingId) Find User by Onboarding identification.<S extends User>
SsaveAndFlush(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, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlushMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOneMethods inherited from interface es.kukenan.smartfi.microservice.communication.repository.UsersRepositoryCustom
refresh
-
Method Details
-
saveAndFlush
Saves an entity and flushes changes instantly. -
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.
-