public boolean checkScopeforService(String scope, String serviceName) throws JsonParseException, JsonMappingException, IOException { String scopeId = scopeClient.getScopeIdForScopeName(scope); String serviceScopeEntry = select( "select * from " + table + " where service_name LIKE " + "\'" + serviceName + "%" + "\'" + "and scope_pkey= " + "\'" + scopeId + "\'"); log.debug( "query to storage" + "select * from " + table + " where service_name LIKE " + "\'" + serviceName + "%" + "\'" + "and scope_pkey= " + "\'" + scopeId + "\'"); log.debug("response from storage" + serviceScopeEntry); ObjectMapper mapper = new ObjectMapper(); ServiceScopeEntry[] resultSet = mapper.readValue(serviceScopeEntry, ServiceScopeEntry[].class); if (resultSet.length > 0) { return true; } return false; }