Class MongoParametersParameterAccessor
java.lang.Object
org.springframework.data.repository.query.ParametersParameterAccessor
org.springframework.data.mongodb.repository.query.MongoParametersParameterAccessor
- All Implemented Interfaces:
Iterable<Object>
,MongoParameterAccessor
,ParameterAccessor
public class MongoParametersParameterAccessor
extends ParametersParameterAccessor
implements MongoParameterAccessor
Mongo-specific
ParametersParameterAccessor
to allow access to the Distance
parameter.- Author:
- Oliver Gierke, Christoph Strobl, Thomas Darimont, Mark Paluch
-
Constructor Summary
ConstructorDescriptionMongoParametersParameterAccessor
(MongoQueryMethod method, Object[] values) Creates a newMongoParametersParameterAccessor
. -
Method Summary
Modifier and TypeMethodDescriptionReturns theCollation
to be used for the query.Returns aDistance
to be applied to Mongo geo queries.Returns theTextCriteria
to be used for full text query.Returns thePoint
to use for a geo-near query.Returns theUpdate
to be used for an update execution.Object[]
Returns the raw parameter values of the underlying query method.protected TextCriteria
potentiallyConvertFullText
(Object fullText) Methods inherited from class org.springframework.data.repository.query.ParametersParameterAccessor
findDynamicProjection, getBindableValue, getLimit, getPageable, getParameters, getScrollPosition, getSort, getValue, hasBindableNullValue, iterator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.springframework.data.repository.query.ParameterAccessor
findDynamicProjection, getBindableValue, getLimit, getPageable, getScrollPosition, getSort, hasBindableNullValue, iterator
-
Constructor Details
-
MongoParametersParameterAccessor
Creates a newMongoParametersParameterAccessor
.- Parameters:
method
- must not be null.values
- must not be null.
-
-
Method Details
-
getDistanceRange
Description copied from interface:MongoParameterAccessor
Returns aDistance
to be applied to Mongo geo queries.- Specified by:
getDistanceRange
in interfaceMongoParameterAccessor
- Returns:
- the maximum distance to apply to the geo query or null if there's no
Distance
parameter at all or the given value for it was null.
-
getGeoNearLocation
Description copied from interface:MongoParameterAccessor
Returns thePoint
to use for a geo-near query.- Specified by:
getGeoNearLocation
in interfaceMongoParameterAccessor
- Returns:
-
getFullText
Description copied from interface:MongoParameterAccessor
Returns theTextCriteria
to be used for full text query.- Specified by:
getFullText
in interfaceMongoParameterAccessor
- Returns:
- null if not set.
-
potentiallyConvertFullText
-
getCollation
Description copied from interface:MongoParameterAccessor
Returns theCollation
to be used for the query.- Specified by:
getCollation
in interfaceMongoParameterAccessor
- Returns:
- null if not set.
-
getValues
Description copied from interface:MongoParameterAccessor
Returns the raw parameter values of the underlying query method.- Specified by:
getValues
in interfaceMongoParameterAccessor
- Overrides:
getValues
in classParametersParameterAccessor
- Returns:
-
getUpdate
Description copied from interface:MongoParameterAccessor
Returns theUpdate
to be used for an update execution.- Specified by:
getUpdate
in interfaceMongoParameterAccessor
- Returns:
- null if not present.
-