Spring Data MongoDB - Core

org.springframework.data.mongodb.core.convert
Class UpdateMapper

java.lang.Object
  extended by org.springframework.data.mongodb.core.convert.QueryMapper
      extended by org.springframework.data.mongodb.core.convert.UpdateMapper

public class UpdateMapper
extends QueryMapper

A subclass of QueryMapper that retains type information on the mongo types.

Author:
Thomas Darimont

Constructor Summary
UpdateMapper(MongoConverter converter)
          Creates a new UpdateMapper using the given MongoConverter.
 
Method Summary
protected  Object delegateConvertToMongoType(Object source, MongoPersistentEntity<?> entity)
          Converts the given source object to a mongo type retaining the original type information of the source type on the mongo type.
 
Methods inherited from class org.springframework.data.mongodb.core.convert.QueryMapper
convertId, getMappedObject, isKeyword, isNestedKeyword
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateMapper

public UpdateMapper(MongoConverter converter)
Creates a new UpdateMapper using the given MongoConverter.

Parameters:
converter - must not be null.
Method Detail

delegateConvertToMongoType

protected Object delegateConvertToMongoType(Object source,
                                            MongoPersistentEntity<?> entity)
Converts the given source object to a mongo type retaining the original type information of the source type on the mongo type.

Overrides:
delegateConvertToMongoType in class QueryMapper
Returns:
the converted mongo type or null if source is null
See Also:
QueryMapper.delegateConvertToMongoType(java.lang.Object, org.springframework.data.mongodb.core.mapping.MongoPersistentEntity)

Spring Data MongoDB - Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.