Skip to content

Commit

Permalink
code format, remove unused parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
agrgr committed Nov 21, 2023
1 parent ccc0f25 commit ba5178f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ public <T> Stream<T> find(Query query, Class<T> 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 <T> Stream<T> find(Class<T> targetClass, String setName) {
Expand Down Expand Up @@ -938,10 +938,10 @@ public <T> Stream<T> findAll(Sort sort, long offset, long limit, Class<T> 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 <T> Stream<T> findUsingQueryWithPostProcessing(String setName, Class<T> targetClass, Query query) {
private <T> Stream<T> findWithPostProcessing(String setName, Class<T> targetClass, Query query) {
verifyUnsortedWithOffset(query.getSort(), query.getOffset());
Stream<T> results = findUsingQueryWithDistinctPredicate(setName, targetClass,
getDistinctPredicate(query), query);
Expand Down Expand Up @@ -982,7 +982,7 @@ public <T> Stream<T> 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
Expand Down Expand Up @@ -1264,8 +1264,8 @@ private Record putAndGetHeader(AerospikeWriteData data, WritePolicy policy, bool
}

@SuppressWarnings("SameParameterValue")
private <T> Stream<T> findUsingQualifierWithPostProcessing(String setName, Class<T> targetClass, Sort sort,
long offset, long limit) {
private <T> Stream<T> findWithPostProcessing(String setName, Class<T> targetClass, Sort sort, long offset,
long limit) {
verifyUnsortedWithOffset(sort, offset);
Stream<T> results = find(targetClass, setName);
return applyPostProcessingOnResults(results, sort, offset, limit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ public <T> Flux<T> find(Query query, Class<T> 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
Expand All @@ -830,7 +830,7 @@ public <T> Flux<T> findAll(Class<T> 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
Expand All @@ -853,7 +853,7 @@ public <T> Flux<T> findAll(Sort sort, long offset, long limit, Class<T> 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
Expand All @@ -876,7 +876,7 @@ public <T> Flux<T> findInRange(long offset, long limit, Sort sort, Class<T> 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) {
Expand Down Expand Up @@ -1171,7 +1171,7 @@ private Throwable translateError(Throwable e) {
return e;
}

private <T> Flux<T> findUsingQueryWithPostProcessing(String setName, Class<T> targetClass, Query query) {
private <T> Flux<T> findWithPostProcessing(String setName, Class<T> targetClass, Query query) {
verifyUnsortedWithOffset(query.getSort(), query.getOffset());
Flux<T> results = findUsingQueryWithDistinctPredicate(setName, targetClass, getDistinctPredicate(query),
query);
Expand All @@ -1180,10 +1180,10 @@ private <T> Flux<T> findUsingQueryWithPostProcessing(String setName, Class<T> ta
}

@SuppressWarnings("SameParameterValue")
private <T> Flux<T> findUsingQueryWithPostProcessing(String setName, Class<T> targetClass, Sort sort,
long offset, long limit, Query query) {
private <T> Flux<T> findWithPostProcessing(String setName, Class<T> targetClass, Sort sort, long offset,
long limit) {
verifyUnsortedWithOffset(sort, offset);
Flux<T> results = findUsingQuery(setName, targetClass, query);
Flux<T> results = find(setName, targetClass);
results = applyPostProcessingOnResults(results, sort, offset, limit);
return results;
}
Expand Down Expand Up @@ -1234,8 +1234,8 @@ private <T> Flux<T> applyPostProcessingOnResults(Flux<T> results, Sort sort, lon
return results;
}

private <T> Flux<T> findUsingQuery(String setName, Class<T> targetClass, Query query) {
return findRecordsUsingQuery(setName, targetClass, query)
private <T> Flux<T> find(String setName, Class<T> targetClass) {
return findRecordsUsingQuery(setName, targetClass, null)
.map(keyRecord -> mapToEntity(keyRecord, targetClass));
}

Expand Down

0 comments on commit ba5178f

Please sign in to comment.