public void writeScopesForService(String appIdentifier, List<GemoScopeBean> scopes) throws JsonParseException, JsonMappingException, IOException { List<String> scopeIds = scopeClient.getScopeIdsForScopes(scopes); for (String scopeId : scopeIds) { MultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>(); map.add("tableName", table); map.add("service_name", appIdentifier); map.add("scope_pkey", scopeId); insert(map); } }