From ba5178fe5aec61f4ca7a21fc9b05f163afd9f734 Mon Sep 17 00:00:00 2001 From: agrgr Date: Tue, 21 Nov 2023 13:00:54 +0200 Subject: [PATCH] code format, remove unused parameters --- .../aerospike/core/AerospikeTemplate.java | 12 +++++------ .../core/ReactiveAerospikeTemplate.java | 20 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/springframework/data/aerospike/core/AerospikeTemplate.java b/src/main/java/org/springframework/data/aerospike/core/AerospikeTemplate.java index fba056c05..c659e5da7 100644 --- a/src/main/java/org/springframework/data/aerospike/core/AerospikeTemplate.java +++ b/src/main/java/org/springframework/data/aerospike/core/AerospikeTemplate.java @@ -892,7 +892,7 @@ public Stream find(Query query, Class targetClass, String setName) { Assert.notNull(targetClass, "Target class must not be null!"); Assert.notNull(setName, "Set name must not be null!"); - return findUsingQueryWithPostProcessing(setName, targetClass, query); + return findWithPostProcessing(setName, targetClass, query); } private Stream find(Class targetClass, String setName) { @@ -938,10 +938,10 @@ public Stream findAll(Sort sort, long offset, long limit, Class target Assert.notNull(setName, "Set name must not be null!"); Assert.notNull(targetClass, "Target class must not be null!"); - return findUsingQualifierWithPostProcessing(setName, targetClass, sort, offset, limit); + return findWithPostProcessing(setName, targetClass, sort, offset, limit); } - private Stream findUsingQueryWithPostProcessing(String setName, Class targetClass, Query query) { + private Stream findWithPostProcessing(String setName, Class targetClass, Query query) { verifyUnsortedWithOffset(query.getSort(), query.getOffset()); Stream results = findUsingQueryWithDistinctPredicate(setName, targetClass, getDistinctPredicate(query), query); @@ -982,7 +982,7 @@ public Stream findInRange(long offset, long limit, Sort sort, Assert.notNull(targetClass, "Target class must not be null!"); Assert.notNull(setName, "Set name must not be null!"); - return findUsingQualifierWithPostProcessing(setName, targetClass, sort, offset, limit); + return findWithPostProcessing(setName, targetClass, sort, offset, limit); } @Override @@ -1264,8 +1264,8 @@ private Record putAndGetHeader(AerospikeWriteData data, WritePolicy policy, bool } @SuppressWarnings("SameParameterValue") - private Stream findUsingQualifierWithPostProcessing(String setName, Class targetClass, Sort sort, - long offset, long limit) { + private Stream findWithPostProcessing(String setName, Class targetClass, Sort sort, long offset, + long limit) { verifyUnsortedWithOffset(sort, offset); Stream results = find(targetClass, setName); return applyPostProcessingOnResults(results, sort, offset, limit); diff --git a/src/main/java/org/springframework/data/aerospike/core/ReactiveAerospikeTemplate.java b/src/main/java/org/springframework/data/aerospike/core/ReactiveAerospikeTemplate.java index 1fd8991b4..adc96c287 100644 --- a/src/main/java/org/springframework/data/aerospike/core/ReactiveAerospikeTemplate.java +++ b/src/main/java/org/springframework/data/aerospike/core/ReactiveAerospikeTemplate.java @@ -807,7 +807,7 @@ public Flux find(Query query, Class targetClass, String setName) { Assert.notNull(targetClass, "Target class must not be null!"); Assert.notNull(setName, "Set name must not be null!"); - return findUsingQueryWithPostProcessing(setName, targetClass, query); + return findWithPostProcessing(setName, targetClass, query); } @Override @@ -830,7 +830,7 @@ public Flux findAll(Class targetClass, String setName) { Assert.notNull(targetClass, "Target class must not be null!"); Assert.notNull(setName, "Set name must not be null!"); - return findUsingQuery(setName, targetClass, null); + return find(setName, targetClass); } @Override @@ -853,7 +853,7 @@ public Flux findAll(Sort sort, long offset, long limit, Class targetCl Assert.notNull(targetClass, "Target class must not be null!"); Assert.notNull(setName, "Set name must not be null!"); - return findUsingQueryWithPostProcessing(setName, targetClass, sort, offset, limit, null); + return findWithPostProcessing(setName, targetClass, sort, offset, limit); } @Override @@ -876,7 +876,7 @@ public Flux findInRange(long offset, long limit, Sort sort, Class targ Assert.notNull(targetClass, "Target Class must not be null!"); Assert.notNull(setName, "Set name must not be null!"); - return findUsingQueryWithPostProcessing(setName, targetClass, sort, offset, limit, null); + return findWithPostProcessing(setName, targetClass, sort, offset, limit); } private BatchPolicy getBatchPolicyFilterExp(Query query) { @@ -1171,7 +1171,7 @@ private Throwable translateError(Throwable e) { return e; } - private Flux findUsingQueryWithPostProcessing(String setName, Class targetClass, Query query) { + private Flux findWithPostProcessing(String setName, Class targetClass, Query query) { verifyUnsortedWithOffset(query.getSort(), query.getOffset()); Flux results = findUsingQueryWithDistinctPredicate(setName, targetClass, getDistinctPredicate(query), query); @@ -1180,10 +1180,10 @@ private Flux findUsingQueryWithPostProcessing(String setName, Class ta } @SuppressWarnings("SameParameterValue") - private Flux findUsingQueryWithPostProcessing(String setName, Class targetClass, Sort sort, - long offset, long limit, Query query) { + private Flux findWithPostProcessing(String setName, Class targetClass, Sort sort, long offset, + long limit) { verifyUnsortedWithOffset(sort, offset); - Flux results = findUsingQuery(setName, targetClass, query); + Flux results = find(setName, targetClass); results = applyPostProcessingOnResults(results, sort, offset, limit); return results; } @@ -1234,8 +1234,8 @@ private Flux applyPostProcessingOnResults(Flux results, Sort sort, lon return results; } - private Flux findUsingQuery(String setName, Class targetClass, Query query) { - return findRecordsUsingQuery(setName, targetClass, query) + private Flux find(String setName, Class targetClass) { + return findRecordsUsingQuery(setName, targetClass, null) .map(keyRecord -> mapToEntity(keyRecord, targetClass)); }