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 interfaceCustomIteratorthat adds a method to access elements in a converted manner. -
Constructor Summary
ConstructorsConstructorDescriptionConvertingParameterAccessor(MongoWriter<?> writer, MongoParameterAccessor delegate) Creates a newConvertingParameterAccessorwith the givenMongoWriterand delegate. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>getBindableValue(int index) Returns theCollationto be used for the query.org.springframework.data.domain.Range<org.springframework.data.geo.Distance>Returns aDistanceto be applied to Mongo geo queries.Returns theTextCriteriato be used for full text query.org.springframework.data.geo.PointReturns thePointto use for a geo-near query.org.springframework.data.domain.Pageableorg.springframework.data.domain.ScrollPositionorg.springframework.data.domain.SortgetSort()Returns theUpdateto be used for an update execution.Object[]Returns the raw parameter values of the underlying query method.booleaniterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ConvertingParameterAccessor
Creates a newConvertingParameterAccessorwith the givenMongoWriterand 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:
getScrollPositionin interfaceorg.springframework.data.repository.query.ParameterAccessor
-
getPageable
public org.springframework.data.domain.Pageable getPageable()- Specified by:
getPageablein interfaceorg.springframework.data.repository.query.ParameterAccessor
-
getSort
public org.springframework.data.domain.Sort getSort()- Specified by:
getSortin interfaceorg.springframework.data.repository.query.ParameterAccessor
-
findDynamicProjection
- Specified by:
findDynamicProjectionin interfaceorg.springframework.data.repository.query.ParameterAccessor
-
getBindableValue
- Specified by:
getBindableValuein interfaceorg.springframework.data.repository.query.ParameterAccessor
-
getDistanceRange
public org.springframework.data.domain.Range<org.springframework.data.geo.Distance> 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
public org.springframework.data.geo.Point 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.
-
getCollation
Description copied from interface:MongoParameterAccessorReturns theCollationto be used for the query.- Specified by:
getCollationin interfaceMongoParameterAccessor- Returns:
- null if not set.
-
getUpdate
Description copied from interface:MongoParameterAccessorReturns theUpdateto be used for an update execution.- Specified by:
getUpdatein interfaceMongoParameterAccessor- Returns:
- null if not present.
-
hasBindableNullValue
public boolean hasBindableNullValue()- Specified by:
hasBindableNullValuein interfaceorg.springframework.data.repository.query.ParameterAccessor
-
getValues
Description copied from interface:MongoParameterAccessorReturns the raw parameter values of the underlying query method.- Specified by:
getValuesin interfaceMongoParameterAccessor- Returns:
-