From f115e9b4b9bafa99f8f8502c822d027d743f7686 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Tue, 19 Jul 2022 14:04:26 +0200 Subject: [PATCH] Removed uneeded parameters --- .../resourceregistry/client/ResourceRegistryClient.java | 4 ++-- .../resourceregistry/client/ResourceRegistryClientImpl.java | 6 +++--- .../resourceregistry/client/ResourceRegistryClientTest.java | 2 +- .../client/ResourceRegistryClientTestWikiExamples.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java index 2b541c5..9b49a43 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java @@ -163,10 +163,10 @@ public interface ResourceRegistryClient { /* ---------------------------------------------------------------------- */ - public String rawQuery(final String query, final int limit, final String fetchPlan) + public String rawQuery(final String query) throws InvalidQueryException, ResourceRegistryException; - public String rawQuery(final String query, final int limit, final String fetchPlan, boolean raw) + public String rawQuery(final String query, boolean raw) throws InvalidQueryException, ResourceRegistryException; } diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java index dcf943f..f0d1188 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java @@ -431,13 +431,13 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { } @Override - public String rawQuery(String query, int limit, String fetchPlan) + public String rawQuery(String query) throws InvalidQueryException, ResourceRegistryException { - return rawQuery(query, limit, fetchPlan, false); + return rawQuery(query, false); } @Override - public String rawQuery(String query, int limit, String fetchPlan, boolean raw) + public String rawQuery(String query, boolean raw) throws InvalidQueryException, ResourceRegistryException { try { diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTest.java index 404324c..731ed25 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTest.java @@ -49,7 +49,7 @@ public class ResourceRegistryClientTest extends ContextTest { @Test public void testQuery() throws ResourceRegistryException { - String res = resourceRegistryClient.rawQuery("SELECT FROM V", 0, null); + String res = resourceRegistryClient.rawQuery("SELECT FROM V"); logger.trace(res); } diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTestWikiExamples.java b/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTestWikiExamples.java index 5be21ef..822b22c 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTestWikiExamples.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientTestWikiExamples.java @@ -193,13 +193,13 @@ public class ResourceRegistryClientTestWikiExamples extends ContextTest { @Test public void rawQueryExample1() throws ResourceRegistryException, Exception{ - String jsonString = resourceRegistryClient.rawQuery("SELECT FROM SoftwareFacet", 1, null, true); + String jsonString = resourceRegistryClient.rawQuery("SELECT FROM SoftwareFacet", true); logger.debug("{}", jsonString); } @Test public void rawQueryExample2() throws ResourceRegistryException, Exception{ - String jsonString = resourceRegistryClient.rawQuery("SELECT FROM SoftwareFacet", 1, null); + String jsonString = resourceRegistryClient.rawQuery("SELECT FROM SoftwareFacet"); List list = ElementMapper.unmarshalList(SoftwareFacet.class, jsonString); logger.debug("{}", list); }