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
ConstructorsConstructorDescriptionMongoParametersParameterAccessor(MongoParameters parameters, Object[] values) Creates a newMongoParametersParameterAccessor.MongoParametersParameterAccessor(MongoQueryMethod method, Object[] values) Creates a newMongoParametersParameterAccessor. -
Method Summary
Modifier and TypeMethodDescription@Nullable CollationReturns theCollationto be used for the query.Returns aDistanceto be applied to Mongo geo queries.@Nullable TextCriteriaReturns theTextCriteriato be used for full text query.@Nullable PointReturns thePointto use for a geo-near query.@Nullable UpdateDefinitionReturns theUpdateto be used for an update execution.Object @Nullable []Returns the raw parameter values of the underlying query method.protected TextCriteriapotentiallyConvertFullText(@Nullable Object fullText) Methods inherited from class ParametersParameterAccessor
findDynamicProjection, getBindableValue, getLimit, getPageable, getParameters, getScore, getScrollPosition, getSort, getValue, getVector, hasBindableNullValue, iteratorMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface ParameterAccessor
findDynamicProjection, getBindableValue, getLimit, getPageable, getScore, getScrollPosition, getSort, getVector, hasBindableNullValue, iterator
-
Constructor Details
-
MongoParametersParameterAccessor
Creates a newMongoParametersParameterAccessor.- Parameters:
method- must not be null.values- must not be null.
-
MongoParametersParameterAccessor
Creates a newMongoParametersParameterAccessor.- Parameters:
parameters- must not be null.values- must not be null.- Since:
- 5.0
-
-
Method Details
-
getScoreRange
- Specified by:
getScoreRangein interfaceParameterAccessor- Overrides:
getScoreRangein classParametersParameterAccessor
-
getDistanceRange
Description copied from interface:MongoParameterAccessorReturns aDistanceto be applied to Mongo geo queries.- Specified by:
getDistanceRangein interfaceMongoParameterAccessor- Returns:
- the maximum distance to apply to the geo query or null if there's no
Distanceparameter at all or the given value for it was null.
-
getGeoNearLocation
Description copied from interface:MongoParameterAccessorReturns thePointto use for a geo-near query.- Specified by:
getGeoNearLocationin interfaceMongoParameterAccessor- Returns:
-
getFullText
Description copied from interface:MongoParameterAccessorReturns theTextCriteriato be used for full text query.- Specified by:
getFullTextin interfaceMongoParameterAccessor- Returns:
- null if not set.
-
potentiallyConvertFullText
@Contract("null -> fail") protected TextCriteria potentiallyConvertFullText(@Nullable Object fullText) -
getCollation
Description copied from interface:MongoParameterAccessorReturns theCollationto be used for the query.- Specified by:
getCollationin interfaceMongoParameterAccessor- Returns:
- null if not set.
-
getValues
Description copied from interface:MongoParameterAccessorReturns the raw parameter values of the underlying query method.- Specified by:
getValuesin interfaceMongoParameterAccessor- Overrides:
getValuesin classParametersParameterAccessor- Returns:
-
getUpdate
Description copied from interface:MongoParameterAccessorReturns theUpdateto be used for an update execution.- Specified by:
getUpdatein interfaceMongoParameterAccessor- Returns:
- null if not present.
-