Class MongoParameters
java.lang.Object
org.springframework.data.repository.query.Parameters<MongoParameters,org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>
org.springframework.data.mongodb.repository.query.MongoParameters
- All Implemented Interfaces:
Iterable<org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>
,Supplier<Stream<org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>>
,org.springframework.data.util.Streamable<org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>
public class MongoParameters
extends org.springframework.data.repository.query.Parameters<MongoParameters,org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>
Custom extension of
Parameters
discovering additional- Author:
- Oliver Gierke, Christoph Strobl, Mark Paluch, Thomas Darimont
-
Field Summary
Fields inherited from class org.springframework.data.repository.query.Parameters
TYPES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected MongoParameters
createFrom
(List<org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter> parameters) protected org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter
createParameter
(org.springframework.core.MethodParameter parameter) int
Returns the index of theCollation
parameter or -1 if not present.int
int
Returns the index of the parameter to be used as a textquery paramint
Returns the index of theDistance
parameter to be used for max distance in geo queries.int
Returns the index of the parameter to be used to start a geo-near query from.int
int
Returns the index of theUpdateDefinition
parameter or -1 if not present.boolean
Methods inherited from class org.springframework.data.repository.query.Parameters
getBindableParameter, getBindableParameters, getDynamicProjectionIndex, getNumberOfParameters, getPageableIndex, getParameter, getSortIndex, hasDynamicProjection, hasPageableParameter, hasParameterAt, hasSortParameter, hasSpecialParameter, isBindable, iterator, potentiallySortsDynamically
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.util.Streamable
and, and, and, and, filter, flatMap, get, isEmpty, map, stream, toList, toSet
-
Constructor Details
-
MongoParameters
- Parameters:
method
- must not be null.isGeoNearMethod
- indicate if this is a geo spatial query method
-
-
Method Details
-
createParameter
protected org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter createParameter(org.springframework.core.MethodParameter parameter) - Overrides:
createParameter
in classorg.springframework.data.repository.query.Parameters<MongoParameters,
org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>
-
getDistanceRangeIndex
public int getDistanceRangeIndex() -
getMaxDistanceIndex
public int getMaxDistanceIndex()Returns the index of theDistance
parameter to be used for max distance in geo queries.- Returns:
- Since:
- 1.7
-
getNearIndex
public int getNearIndex()Returns the index of the parameter to be used to start a geo-near query from.- Returns:
-
getFullTextParameterIndex
public int getFullTextParameterIndex()Returns the index of the parameter to be used as a textquery param- Returns:
- Since:
- 1.6
-
hasFullTextParameter
public boolean hasFullTextParameter()- Returns:
- Since:
- 1.6
-
getRangeIndex
public int getRangeIndex()- Returns:
- Since:
- 1.7
-
getCollationParameterIndex
public int getCollationParameterIndex()Returns the index of theCollation
parameter or -1 if not present.- Returns:
- -1 if not set.
- Since:
- 2.2
-
getUpdateIndex
public int getUpdateIndex()Returns the index of theUpdateDefinition
parameter or -1 if not present.- Returns:
- -1 if not present.
- Since:
- 3.4
-
createFrom
protected MongoParameters createFrom(List<org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter> parameters) - Specified by:
createFrom
in classorg.springframework.data.repository.query.Parameters<MongoParameters,
org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>
-