Spring Data Document

org.springframework.data.document.mongodb.repository
Class ConvertingParameterAccessor

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

public class ConvertingParameterAccessor
extends Object
implements org.springframework.data.repository.query.ParameterAccessor

Custom ParameterAccessor that uses a MongoWriter to serialize parameters into Mongo format.

Author:
Oliver Gierke

Nested Class Summary
static interface ConvertingParameterAccessor.PotentiallyConvertingIterator
          Custom Iterator that adds a method to access elements in a converted manner.
 
Constructor Summary
ConvertingParameterAccessor(MongoWriter<Object> writer, org.springframework.data.repository.query.ParameterAccessor delegate)
          Creates a new ConvertingParameterAccessor with the given MongoWriter and delegate.
 
Method Summary
 Object getBindableValue(int index)
           
 org.springframework.data.domain.Pageable getPageable()
           
 org.springframework.data.domain.Sort getSort()
           
 Iterator<Object> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertingParameterAccessor

public ConvertingParameterAccessor(MongoWriter<Object> writer,
                                   org.springframework.data.repository.query.ParameterAccessor delegate)
Creates a new ConvertingParameterAccessor with the given MongoWriter and delegate.

Parameters:
writer -
Method Detail

iterator

public Iterator<Object> iterator()
Specified by:
iterator in interface Iterable<Object>
Specified by:
iterator in interface org.springframework.data.repository.query.ParameterAccessor

getPageable

public org.springframework.data.domain.Pageable getPageable()
Specified by:
getPageable in interface org.springframework.data.repository.query.ParameterAccessor

getSort

public org.springframework.data.domain.Sort getSort()
Specified by:
getSort in interface org.springframework.data.repository.query.ParameterAccessor

getBindableValue

public Object getBindableValue(int index)
Specified by:
getBindableValue in interface org.springframework.data.repository.query.ParameterAccessor

Spring Data Document

Copyright © 2011. All Rights Reserved.