DATACMNS-128 - Adapted to API changes of ParametersParameterAccessor.
This commit is contained in:
@@ -110,6 +110,14 @@ public class ConvertingParameterAccessor implements MongoParameterAccessor {
|
|||||||
return writer.convertToMongoType(value);
|
return writer.convertToMongoType(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see org.springframework.data.repository.query.ParameterAccessor#hasBindableNullValue()
|
||||||
|
*/
|
||||||
|
public boolean hasBindableNullValue() {
|
||||||
|
return delegate.hasBindableNullValue();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom {@link Iterator} to convert items before returning them.
|
* Custom {@link Iterator} to convert items before returning them.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ import org.springframework.data.domain.Sort;
|
|||||||
import org.springframework.data.mongodb.core.convert.MongoWriter;
|
import org.springframework.data.mongodb.core.convert.MongoWriter;
|
||||||
import org.springframework.data.mongodb.core.geo.Distance;
|
import org.springframework.data.mongodb.core.geo.Distance;
|
||||||
import org.springframework.data.mongodb.core.geo.Point;
|
import org.springframework.data.mongodb.core.geo.Point;
|
||||||
import org.springframework.data.mongodb.repository.query.ConvertingParameterAccessor;
|
|
||||||
import org.springframework.data.mongodb.repository.query.MongoParameterAccessor;
|
|
||||||
import org.springframework.data.repository.query.ParameterAccessor;
|
import org.springframework.data.repository.query.ParameterAccessor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,7 +43,6 @@ class StubParameterAccessor implements MongoParameterAccessor {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static ConvertingParameterAccessor getAccessor(MongoWriter<Object> converter, Object... parameters) {
|
public static ConvertingParameterAccessor getAccessor(MongoWriter<Object> converter, Object... parameters) {
|
||||||
|
|
||||||
return new ConvertingParameterAccessor(converter, new StubParameterAccessor(parameters));
|
return new ConvertingParameterAccessor(converter, new StubParameterAccessor(parameters));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,26 +51,33 @@ class StubParameterAccessor implements MongoParameterAccessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
* @see org.springframework.data.repository.query.ParameterAccessor#getPageable()
|
||||||
* @see org.springframework.data.repository.query.ParameterAccessor#getPageable()
|
*/
|
||||||
*/
|
|
||||||
public Pageable getPageable() {
|
public Pageable getPageable() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/*
|
||||||
* @see org.springframework.data.repository.query.ParameterAccessor#getBindableParameter(int)
|
* (non-Javadoc)
|
||||||
*/
|
* @see org.springframework.data.repository.query.ParameterAccessor#getBindableValue(int)
|
||||||
|
*/
|
||||||
public Object getBindableValue(int index) {
|
public Object getBindableValue(int index) {
|
||||||
return values[index];
|
return values[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see org.springframework.data.repository.query.ParameterAccessor#hasBindableNullValue()
|
||||||
|
*/
|
||||||
|
public boolean hasBindableNullValue() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
* @see org.springframework.data.repository.query.ParameterAccessor#getSort()
|
||||||
* @see org.springframework.data.repository.query.ParameterAccessor#getSort()
|
*/
|
||||||
*/
|
|
||||||
public Sort getSort() {
|
public Sort getSort() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -87,15 +91,15 @@ class StubParameterAccessor implements MongoParameterAccessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
* @see org.springframework.data.repository.query.ParameterAccessor#iterator()
|
||||||
* @see java.lang.Iterable#iterator()
|
*/
|
||||||
*/
|
|
||||||
public Iterator<Object> iterator() {
|
public Iterator<Object> iterator() {
|
||||||
return Arrays.asList(values).iterator();
|
return Arrays.asList(values).iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
* @see org.springframework.data.mongodb.repository.MongoParameterAccessor#getGeoNearLocation()
|
* @see org.springframework.data.mongodb.repository.MongoParameterAccessor#getGeoNearLocation()
|
||||||
*/
|
*/
|
||||||
public Point getGeoNearLocation() {
|
public Point getGeoNearLocation() {
|
||||||
|
|||||||
Reference in New Issue
Block a user