public class QueryMapper extends Object
Constructor and Description |
---|
QueryMapper(MongoConverter converter)
Creates a new
QueryMapper with the given MongoConverter . |
Modifier and Type | Method and Description |
---|---|
Object |
convertId(Object id)
Converts the given raw id value into either
ObjectId or String . |
protected Object |
delegateConvertToMongoType(Object source,
MongoPersistentEntity<?> entity)
Converts the given source Object to a mongo type with the type information of the original source type omitted.
|
com.mongodb.DBObject |
getMappedObject(com.mongodb.DBObject query,
MongoPersistentEntity<?> entity)
Replaces the property keys used in the given
DBObject with the appropriate keys by using the
PersistentEntity metadata. |
public QueryMapper(MongoConverter converter)
QueryMapper
with the given MongoConverter
.converter
- must not be null.public com.mongodb.DBObject getMappedObject(com.mongodb.DBObject query, MongoPersistentEntity<?> entity)
DBObject
with the appropriate keys by using the
PersistentEntity
metadata.query
- must not be null.entity
- can be null.protected Object delegateConvertToMongoType(Object source, MongoPersistentEntity<?> entity)
source
- entity
- Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.