Package fr.gouv.vitam.common.database.server.mongodb

# Class BsonHelper

java.lang.Object
fr.gouv.vitam.common.database.server.mongodb.BsonHelper

public class BsonHelper extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BsonHelper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static com.fasterxml.jackson.databind.JsonNode`
  `fromDocumentToJsonNode(org.bson.Document object)`
  Convert bson document to JsonNode
  `static <T> T`
  `fromDocumentToObject(org.bson.Document document, com.fasterxml.jackson.core.type.TypeReference<T> typeReference)`
  Convert bson document to object
  `static <T> T`
  `fromDocumentToObject(org.bson.Document document, Class<T> clasz)`
  Convert bson document to object
  `static String`
  `stringify(org.bson.Document document)`
  Stringify mongo document

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### BsonHelper

    public BsonHelper()

- ## Method Details

  - ### stringify

    public static 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, 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`