Class ConvertingParameterAccessor
java.lang.Object
org.springframework.data.mongodb.repository.query.ConvertingParameterAccessor
- All Implemented Interfaces:
Iterable<Object>
,MongoParameterAccessor
,org.springframework.data.repository.query.ParameterAccessor
Custom
ParameterAccessor
that uses a MongoWriter
to serialize parameters into Mongo format.- Author:
- Oliver Gierke, Christoph Strobl, Thomas Darimont, Mark Paluch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
CustomIterator
that adds a method to access elements in a converted manner. -
Constructor Summary
ConstructorsConstructorDescriptionConvertingParameterAccessor
(MongoWriter<?> writer, MongoParameterAccessor delegate) Creates a newConvertingParameterAccessor
with the givenMongoWriter
and delegate. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
getBindableValue
(int index) Returns theCollation
to be used for the query.org.springframework.data.domain.Range<org.springframework.data.geo.Distance>
Returns aDistance
to be applied to Mongo geo queries.Returns theTextCriteria
to be used for full text query.org.springframework.data.geo.Point
Returns thePoint
to use for a geo-near query.org.springframework.data.domain.Pageable
org.springframework.data.domain.ScrollPosition
org.springframework.data.domain.Sort
getSort()
Returns theUpdate
to be used for an update execution.Object[]
Returns the raw parameter values of the underlying query method.boolean
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
-
Constructor Details
-
ConvertingParameterAccessor
Creates a newConvertingParameterAccessor
with the givenMongoWriter
and delegate.- Parameters:
writer
- must not be null.delegate
- must not be null.
-
-
Method Details
-
iterator
-
getScrollPosition
public org.springframework.data.domain.ScrollPosition getScrollPosition()- Specified by:
getScrollPosition
in interfaceorg.springframework.data.repository.query.ParameterAccessor
-
getPageable
public org.springframework.data.domain.Pageable getPageable()- Specified by:
getPageable
in interfaceorg.springframework.data.repository.query.ParameterAccessor
-
getSort
public org.springframework.data.domain.Sort getSort()- Specified by:
getSort
in interfaceorg.springframework.data.repository.query.ParameterAccessor
-
findDynamicProjection
- Specified by:
findDynamicProjection
in interfaceorg.springframework.data.repository.query.ParameterAccessor
-
getBindableValue
- Specified by:
getBindableValue
in interfaceorg.springframework.data.repository.query.ParameterAccessor
-
getDistanceRange
public org.springframework.data.domain.Range<org.springframework.data.geo.Distance> 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
public org.springframework.data.geo.Point 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.
-
getCollation
Description copied from interface:MongoParameterAccessor
Returns theCollation
to be used for the query.- Specified by:
getCollation
in interfaceMongoParameterAccessor
- Returns:
- null if not set.
-
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.
-
hasBindableNullValue
public boolean hasBindableNullValue()- Specified by:
hasBindableNullValue
in interfaceorg.springframework.data.repository.query.ParameterAccessor
-
getValues
Description copied from interface:MongoParameterAccessor
Returns the raw parameter values of the underlying query method.- Specified by:
getValues
in interfaceMongoParameterAccessor
- Returns:
-