DATAMONGO-2324 - Adapt to API changes in Commons.
This commit is contained in:
@@ -103,6 +103,15 @@ public class ConvertingParameterAccessor implements MongoParameterAccessor {
|
||||
return delegate.getDynamicProjection();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.ParameterAccessor#findDynamicProjection()
|
||||
*/
|
||||
@Override
|
||||
public Class<?> findDynamicProjection() {
|
||||
return delegate.findDynamicProjection();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.ParameterAccessor#getBindableValue(int)
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
*/
|
||||
package org.springframework.data.mongodb.repository.query;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.domain.Range;
|
||||
import org.springframework.data.domain.Range.Bound;
|
||||
import org.springframework.data.geo.Distance;
|
||||
@@ -41,7 +38,6 @@ import org.springframework.util.ClassUtils;
|
||||
public class MongoParametersParameterAccessor extends ParametersParameterAccessor implements MongoParameterAccessor {
|
||||
|
||||
private final MongoQueryMethod method;
|
||||
private final List<Object> values;
|
||||
|
||||
/**
|
||||
* Creates a new {@link MongoParametersParameterAccessor}.
|
||||
@@ -54,7 +50,6 @@ public class MongoParametersParameterAccessor extends ParametersParameterAccesso
|
||||
super(method.getParameters(), values);
|
||||
|
||||
this.method = method;
|
||||
this.values = Arrays.asList(values);
|
||||
}
|
||||
|
||||
public Range<Distance> getDistanceRange() {
|
||||
@@ -156,6 +151,6 @@ public class MongoParametersParameterAccessor extends ParametersParameterAccesso
|
||||
*/
|
||||
@Override
|
||||
public Object[] getValues() {
|
||||
return values.toArray();
|
||||
return super.getValues();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,14 +35,12 @@ import org.springframework.data.repository.util.ReactiveWrappers;
|
||||
*/
|
||||
class ReactiveMongoParameterAccessor extends MongoParametersParameterAccessor {
|
||||
|
||||
private final Object[] values;
|
||||
private final List<MonoProcessor<?>> subscriptions;
|
||||
|
||||
public ReactiveMongoParameterAccessor(MongoQueryMethod method, Object[] values) {
|
||||
|
||||
super(method, values);
|
||||
|
||||
this.values = values;
|
||||
this.subscriptions = new ArrayList<>(values.length);
|
||||
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
@@ -82,7 +80,7 @@ class ReactiveMongoParameterAccessor extends MongoParametersParameterAccessor {
|
||||
@Override
|
||||
public Object[] getValues() {
|
||||
|
||||
Object[] result = new Object[values.length];
|
||||
Object[] result = new Object[super.getValues().length];
|
||||
for (int i = 0; i < result.length; i++) {
|
||||
result[i] = getValue(i);
|
||||
}
|
||||
|
||||
@@ -163,4 +163,13 @@ class StubParameterAccessor implements MongoParameterAccessor {
|
||||
public Optional<Class<?>> getDynamicProjection() {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.ParameterAccessor#findDynamicProjection()
|
||||
*/
|
||||
@Override
|
||||
public Class<?> findDynamicProjection() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user