@Test @Ignore public void test_should_return_user() { List<User> actualUsers = userRepository.findAll(UserSearchCriteria.builder().userName("bigcat399") .tenantId("ap.public").type(UserType.EMPLOYEE).build()); assertTrue(!actualUsers.isEmpty()); }
public List<User> findAll(UserSearchCriteria userSearch) { final List<Object> preparedStatementValues = new ArrayList<>(); String queryStr = userTypeQueryBuilder.getQuery(userSearch, preparedStatementValues); log.debug(queryStr); List<User> users = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), userResultSetExtractor); enrichRoles(users); return users; }
UserRepository { public List<User> findAll(UserSearchCriteria userSearch) { final List<Object> preparedStatementValues = new ArrayList<>(); String queryStr = userTypeQueryBuilder.getQuery(userSearch, preparedStatementValues); log.debug(queryStr); List<User> users = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), userResultSetExtractor); enrichRoles(users); return users; } }
UserRepository { public List<User> findAll(UserSearchCriteria userSearch) { final List<Object> preparedStatementValues = new ArrayList<>(); String queryStr = userTypeQueryBuilder.getQuery(userSearch, preparedStatementValues); log.debug(queryStr); List<User> users = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), userResultSetExtractor); enrichRoles(users); return users; } @Autowired  UserRepository(RoleRepository roleRepository, UserTypeQueryBuilder userTypeQueryBuilder,
                   AddressRepository addressRepository, UserResultSetExtractor userResultSetExtractor,
                   JdbcTemplate jdbcTemplate,
                   NamedParameterJdbcTemplate namedParameterJdbcTemplate); }
UserRepository { public List<User> findAll(UserSearchCriteria userSearch) { final List<Object> preparedStatementValues = new ArrayList<>(); String queryStr = userTypeQueryBuilder.getQuery(userSearch, preparedStatementValues); log.debug(queryStr); List<User> users = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), userResultSetExtractor); enrichRoles(users); return users; } @Autowired  UserRepository(RoleRepository roleRepository, UserTypeQueryBuilder userTypeQueryBuilder,
                   AddressRepository addressRepository, UserResultSetExtractor userResultSetExtractor,
                   JdbcTemplate jdbcTemplate,
                   NamedParameterJdbcTemplate namedParameterJdbcTemplate); List<User> findAll(UserSearchCriteria userSearch); boolean isUserPresent(String userName, String tenantId, UserType userType); User create(User user); void update(final User user, User oldUser); void fetchFailedLoginAttemptsByUser(String uuid); List<FailedLoginAttempt> fetchFailedAttemptsByUserAndTime(String uuid, long attemptStartDate); FailedLoginAttempt insertFailedLoginAttempt(FailedLoginAttempt failedLoginAttempt); void resetFailedLoginAttemptsForUser(String uuid); }
UserRepository { public List<User> findAll(UserSearchCriteria userSearch) { final List<Object> preparedStatementValues = new ArrayList<>(); String queryStr = userTypeQueryBuilder.getQuery(userSearch, preparedStatementValues); log.debug(queryStr); List<User> users = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), userResultSetExtractor); enrichRoles(users); return users; } @Autowired  UserRepository(RoleRepository roleRepository, UserTypeQueryBuilder userTypeQueryBuilder,
                   AddressRepository addressRepository, UserResultSetExtractor userResultSetExtractor,
                   JdbcTemplate jdbcTemplate,
                   NamedParameterJdbcTemplate namedParameterJdbcTemplate); List<User> findAll(UserSearchCriteria userSearch); boolean isUserPresent(String userName, String tenantId, UserType userType); User create(User user); void update(final User user, User oldUser); void fetchFailedLoginAttemptsByUser(String uuid); List<FailedLoginAttempt> fetchFailedAttemptsByUserAndTime(String uuid, long attemptStartDate); FailedLoginAttempt insertFailedLoginAttempt(FailedLoginAttempt failedLoginAttempt); void resetFailedLoginAttemptsForUser(String uuid);  }