Class BsonHelper
- java.lang.Object
-
- fr.gouv.vitam.common.database.server.mongodb.BsonHelper
-
public class BsonHelper extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description BsonHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.fasterxml.jackson.databind.JsonNode
fromDocumentToJsonNode(org.bson.Document object)
Convert bson document to JsonNodestatic <T> T
fromDocumentToObject(org.bson.Document document, com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
Convert bson document to objectstatic <T> T
fromDocumentToObject(org.bson.Document document, java.lang.Class<T> clasz)
Convert bson document to objectstatic java.lang.String
stringify(org.bson.Document document)
Stringify mongo document
-
-
-
Method Detail
-
stringify
public static java.lang.String stringify(org.bson.Document document)
Stringify mongo document- Parameters:
document
-- Returns:
- Unpretty print object
-
fromDocumentToJsonNode
public static com.fasterxml.jackson.databind.JsonNode fromDocumentToJsonNode(org.bson.Document object) throws InvalidParseOperationException
Convert bson document to JsonNode- Throws:
InvalidParseOperationException
-
fromDocumentToObject
public static <T> T fromDocumentToObject(org.bson.Document document, java.lang.Class<T> clasz) throws InvalidParseOperationException
Convert bson document to object- Throws:
InvalidParseOperationException
-
fromDocumentToObject
public static <T> T fromDocumentToObject(org.bson.Document document, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) throws InvalidParseOperationException
Convert bson document to object- Throws:
InvalidParseOperationException
-
-