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

# Class InsertToMongodb

java.lang.Object
fr.gouv.vitam.common.database.translators.RequestToAbstract
fr.gouv.vitam.common.database.translators.mongodb.RequestToMongodb
fr.gouv.vitam.common.database.translators.mongodb.InsertToMongodb

public class InsertToMongodb extends RequestToMongodb
Insert to MongoDb

- ## Field Summary

  ### Fields inherited from class fr.gouv.vitam.common.database.translators.RequestToAbstract

  `requestParser`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InsertToMongodb(AbstractParser<?> insertParser)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.bson.Document`
  `getFinalData()`
  insertOne(data)

  ### Methods inherited from class fr.gouv.vitam.common.database.translators.mongodb.RequestToMongodb

  `getInitialRoots, getNthQueries, getRequest, getRequestToMongoDb`

  ### Methods inherited from class fr.gouv.vitam.common.database.translators.RequestToAbstract

  `getFinalLimit, getFinalOffset, getHints, getLastDepth, getNbQueries, getNthQuery, getRequest, getRequestParser, getUsage, hasFullTextQuery, hintCache, hintNoTimeout, isMultiple, model`

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

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

- ## Constructor Details

  - ### InsertToMongodb

    public InsertToMongodb(AbstractParser<?> insertParser)
    Parameters:
      `insertParser` - AbstractParser of unknown type

- ## Method Details

  - ### getFinalData

    public org.bson.Document getFinalData() throws InvalidParseOperationException
    insertOne(data)
    Returns:
      the projection
    Throws:
      `InvalidParseOperationException` - if could not parse to JSON