Spring Data Document

org.springframework.data.mongodb.repository.query
Class MongoParametersParameterAccessor

java.lang.Object
  extended by org.springframework.data.repository.query.ParametersParameterAccessor
      extended by org.springframework.data.mongodb.repository.query.MongoParametersParameterAccessor
All Implemented Interfaces:
Iterable<Object>, MongoParameterAccessor, org.springframework.data.repository.query.ParameterAccessor

public class MongoParametersParameterAccessor
extends org.springframework.data.repository.query.ParametersParameterAccessor
implements MongoParameterAccessor

Mongo-specific ParametersParameterAccessor to allow access to the Distance parameter.

Author:
Oliver Gierke

Constructor Summary
MongoParametersParameterAccessor(MongoQueryMethod method, Object[] values)
          Creates a new MongoParametersParameterAccessor.
 
Method Summary
 Point getGeoNearLocation()
          Returns the Point to use for a geo-near query.
 Distance getMaxDistance()
          Returns a Distance to be applied to Mongo geo queries.
 
Methods inherited from class org.springframework.data.repository.query.ParametersParameterAccessor
getBindableValue, getPageable, getParameters, 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 org.springframework.data.repository.query.ParameterAccessor
getBindableValue, getPageable, getSort, hasBindableNullValue, iterator
 

Constructor Detail

MongoParametersParameterAccessor

public MongoParametersParameterAccessor(MongoQueryMethod method,
                                        Object[] values)
Creates a new MongoParametersParameterAccessor.

Parameters:
method - must not be null.
values - must not be .
Method Detail

getMaxDistance

public Distance getMaxDistance()
Description copied from interface: MongoParameterAccessor
Returns a Distance to be applied to Mongo geo queries.

Specified by:
getMaxDistance in interface MongoParameterAccessor
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 Point getGeoNearLocation()
Description copied from interface: MongoParameterAccessor
Returns the Point to use for a geo-near query.

Specified by:
getGeoNearLocation in interface MongoParameterAccessor
Returns:

Spring Data Document

Copyright © 2012. All Rights Reserved.