Type conversions - 6.3

Talend ESB Mediation Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

The MongoDbBasicConverters type converter included with the camel-mongodb component provides the following conversions:

Name

From type

To type

How?

fromMapToDBObject

Map

DBObject

constructs a new BasicDBObject via the new BasicDBObject(Map m) constructor

fromBasicDBObjectToMap

BasicDBObject

Map

BasicDBObject already implements Map

fromStringToDBObject

String

DBObject

uses com.mongodb.util.

JSON.parse(Strings)

fromAnyObjectToDBObject

Object

DBObject

uses the Jackson library to convert the object to a Map, which is in turn used to initialise a new BasicDBObject

This type converter is auto-discovered, so you don't need to configure anything manually.