class UserDao extends NamedParameterJdbcDaoSupport {

    public PipelineUser loadUserByName(String name) {
        Collection<PipelineUser> items =
                getJdbcTemplate().query(loadUserByNameQuery,
                        UserParameters.getUserExtractor(), name.toLowerCase());
        if (CollectionUtils.isEmpty(items)) {
            return null;
        } else {
            return items.stream().filter(user -> user.getUserName()
                    .equalsIgnoreCase(name)).findAny().orElse(null);
        }
    }

}