org.springframework.data.document.mongodb.convert
Interface MongoConverter

All Superinterfaces:
MongoReader<java.lang.Object>, MongoWriter<java.lang.Object>
All Known Implementing Classes:
AbstractMongoConverter, MappingMongoConverter, SimpleMongoConverter

public interface MongoConverter
extends MongoWriter<java.lang.Object>, MongoReader<java.lang.Object>


Method Summary
 org.bson.types.ObjectId convertObjectId(java.lang.Object id)
          Returns the ObjectId instance for the given id.
<T> T
convertObjectId(org.bson.types.ObjectId id, java.lang.Class<T> targetType)
          Converts the given ObjectId to the given target type.
 org.springframework.core.convert.ConversionService getConversionService()
           
 org.springframework.data.mapping.model.MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> getMappingContext()
           
 java.lang.Object[] maybeConvertArray(java.lang.Object[] src)
           
 com.mongodb.BasicDBList maybeConvertList(com.mongodb.BasicDBList dbl)
           
 java.lang.Object maybeConvertObject(java.lang.Object obj)
           
 
Methods inherited from interface org.springframework.data.document.mongodb.MongoWriter
write
 
Methods inherited from interface org.springframework.data.document.mongodb.MongoReader
read
 

Method Detail

convertObjectId

<T> T convertObjectId(org.bson.types.ObjectId id,
                      java.lang.Class<T> targetType)
Converts the given ObjectId to the given target type.

Type Parameters:
T - the actual type to create
Parameters:
id - the source ObjectId
targetType - the target type to convert the ObjectId to
Returns:

convertObjectId

org.bson.types.ObjectId convertObjectId(java.lang.Object id)
Returns the ObjectId instance for the given id.

Parameters:
id -
Returns:

getMappingContext

org.springframework.data.mapping.model.MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> getMappingContext()

maybeConvertObject

java.lang.Object maybeConvertObject(java.lang.Object obj)

maybeConvertArray

java.lang.Object[] maybeConvertArray(java.lang.Object[] src)

maybeConvertList

com.mongodb.BasicDBList maybeConvertList(com.mongodb.BasicDBList dbl)

getConversionService

org.springframework.core.convert.ConversionService getConversionService()


Copyright © 2011. All Rights Reserved.