org.springframework.data.document.mongodb
Class MongoTemplate.ReadDbObjectCallback<T>

java.lang.Object
  extended by org.springframework.data.document.mongodb.MongoTemplate.ReadDbObjectCallback<T>
All Implemented Interfaces:
MongoTemplate.DbObjectCallback<T>
Enclosing class:
MongoTemplate

private class MongoTemplate.ReadDbObjectCallback<T>
extends java.lang.Object
implements MongoTemplate.DbObjectCallback<T>

Simple MongoTemplate.DbObjectCallback that will transform DBObject into the given target type using the given MongoReader.

Author:
Oliver Gierke

Field Summary
private  MongoReader<? super T> reader
           
private  java.lang.Class<T> type
           
 
Constructor Summary
MongoTemplate.ReadDbObjectCallback(MongoReader<? super T> reader, java.lang.Class<T> type)
           
 
Method Summary
 T doWith(DBObject object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

private final MongoReader<? super T> reader

type

private final java.lang.Class<T> type
Constructor Detail

MongoTemplate.ReadDbObjectCallback

public MongoTemplate.ReadDbObjectCallback(MongoReader<? super T> reader,
                                          java.lang.Class<T> type)
Method Detail

doWith

public T doWith(DBObject object)
Specified by:
doWith in interface MongoTemplate.DbObjectCallback<T>