@Test public void testGetGroupProviderUserOauth() { String userId = "urn:collab:person:test.surfguest.nl:tester2"; GroupProviderUserOauth groupProviderUserOauth = groupProviderServiceSQL.getGroupProviderUserOauth(userId, "avans"); assertEquals(userId,groupProviderUserOauth.getPersonId()); groupProviderUserOauth = groupProviderServiceSQL.getGroupProviderUserOauth("does-not-exist", "avans"); assertTrue(groupProviderUserOauth == null); }
@Override public GroupProviderUserOauth getGroupProviderUserOauth(String userId, String groupProviderIdentifier) { GroupProviderUserOauth gpUserOauth = null; try { RowMapper<GroupProviderUserOauth> rowMapper = new GroupProviderUserOauthRowMapper() ; gpUserOauth = this.jdbcTemplate.queryForObject( SELECT_USER_OAUTH + " and gp_user_oauth.provider_id = ?", new Object[] {userId, groupProviderIdentifier}, rowMapper); } catch (EmptyResultDataAccessException e) { } return gpUserOauth; }
GroupProviderServiceSQLImpl implements GroupProviderService { @Override public GroupProviderUserOauth getGroupProviderUserOauth(String userId, String groupProviderIdentifier) { GroupProviderUserOauth gpUserOauth = null; try { RowMapper<GroupProviderUserOauth> rowMapper = new GroupProviderUserOauthRowMapper() ; gpUserOauth = this.jdbcTemplate.queryForObject( SELECT_USER_OAUTH + " and gp_user_oauth.provider_id = ?", new Object[] {userId, groupProviderIdentifier}, rowMapper); } catch (EmptyResultDataAccessException e) { } return gpUserOauth; } }
GroupProviderServiceSQLImpl implements GroupProviderService { @Override public GroupProviderUserOauth getGroupProviderUserOauth(String userId, String groupProviderIdentifier) { GroupProviderUserOauth gpUserOauth = null; try { RowMapper<GroupProviderUserOauth> rowMapper = new GroupProviderUserOauthRowMapper() ; gpUserOauth = this.jdbcTemplate.queryForObject( SELECT_USER_OAUTH + " and gp_user_oauth.provider_id = ?", new Object[] {userId, groupProviderIdentifier}, rowMapper); } catch (EmptyResultDataAccessException e) { } return gpUserOauth; } GroupProviderServiceSQLImpl(JdbcTemplate jdbcTemplate); }
GroupProviderServiceSQLImpl implements GroupProviderService { @Override public GroupProviderUserOauth getGroupProviderUserOauth(String userId, String groupProviderIdentifier) { GroupProviderUserOauth gpUserOauth = null; try { RowMapper<GroupProviderUserOauth> rowMapper = new GroupProviderUserOauthRowMapper() ; gpUserOauth = this.jdbcTemplate.queryForObject( SELECT_USER_OAUTH + " and gp_user_oauth.provider_id = ?", new Object[] {userId, groupProviderIdentifier}, rowMapper); } catch (EmptyResultDataAccessException e) { } return gpUserOauth; } GroupProviderServiceSQLImpl(JdbcTemplate jdbcTemplate); @Override List<GroupProviderUserOauth> getGroupProviderUserOauths(String userId); @Override GroupProviderUserOauth getGroupProviderUserOauth(String userId, String groupProviderIdentifier); @Override GroupProvider getGroupProviderByStringIdentifier(String identifier); @Override List<GroupProvider> getOAuthGroupProviders(String userId); @Override List<GroupProvider> getAllGroupProviders(); }
GroupProviderServiceSQLImpl implements GroupProviderService { @Override public GroupProviderUserOauth getGroupProviderUserOauth(String userId, String groupProviderIdentifier) { GroupProviderUserOauth gpUserOauth = null; try { RowMapper<GroupProviderUserOauth> rowMapper = new GroupProviderUserOauthRowMapper() ; gpUserOauth = this.jdbcTemplate.queryForObject( SELECT_USER_OAUTH + " and gp_user_oauth.provider_id = ?", new Object[] {userId, groupProviderIdentifier}, rowMapper); } catch (EmptyResultDataAccessException e) { } return gpUserOauth; } GroupProviderServiceSQLImpl(JdbcTemplate jdbcTemplate); @Override List<GroupProviderUserOauth> getGroupProviderUserOauths(String userId); @Override GroupProviderUserOauth getGroupProviderUserOauth(String userId, String groupProviderIdentifier); @Override GroupProvider getGroupProviderByStringIdentifier(String identifier); @Override List<GroupProvider> getOAuthGroupProviders(String userId); @Override List<GroupProvider> getAllGroupProviders();  }