Package fr.gouv.vitam.common.database.parser.request.single

# Class InsertParserSingle

java.lang.Object
fr.gouv.vitam.common.database.parser.request.AbstractParser<RequestSingle>
fr.gouv.vitam.common.database.parser.request.single.RequestParserSingle
fr.gouv.vitam.common.database.parser.request.single.InsertParserSingle

public class InsertParserSingle extends RequestParserSingle
Insert Parser: { $query : query, $filter : filter, $data : data}

- ## Field Summary

  ### Fields inherited from class fr.gouv.vitam.common.database.parser.request.AbstractParser

  `adapter, hasFullTextCurrentQuery, hasFullTextQuery, request, rootNode, sourceRequest`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InsertParserSingle(VarNameAdapter adapter)`
  Use in Masterdata

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `dataParse(com.fasterxml.jackson.databind.JsonNode rootNode)`
  {$data : [{ field: value, ...
  `protected RequestSingle`
  `getNewRequest()`
  `Insert`
  `getRequest()`
  `void`
  `parse(com.fasterxml.jackson.databind.JsonNode request)`
  `String`
  `toString()`

  ### Methods inherited from class fr.gouv.vitam.common.database.parser.request.single.RequestParserSingle

  `addCondition, analyzeRootQuery, filterParse, getLastDepth, hintCache, hintNoTimeout, model, parseJson, parseQueryOnly, queryParse`

  ### Methods inherited from class fr.gouv.vitam.common.database.parser.request.AbstractParser

  `analyzeOneCommand, analyzeOneFacet, getAdapter, getRootNode, getSource, hasFullTextQuery, parseOrderByFilter`

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

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

- ## Constructor Details

  - ### InsertParserSingle

    public InsertParserSingle(VarNameAdapter adapter)
    Use in Masterdata
    Parameters:
      `adapter` - VarNameAdapter

- ## Method Details

  - ### getNewRequest

    protected RequestSingle getNewRequest()
    Specified by:
      `getNewRequest` in class `AbstractParser<RequestSingle>`
    Returns:
      a new Request

  - ### parse

    public void parse(com.fasterxml.jackson.databind.JsonNode request) throws InvalidParseOperationException
    Specified by:
      `parse` in class `AbstractParser<RequestSingle>`
    Parameters:
      `request` - containing a parsed JSON as { $roots: root, $query : query, $filter : filter, $data : data}
    Throws:
      `InvalidParseOperationException` - if request could not parse to JSON

  - ### dataParse

    protected void dataParse(com.fasterxml.jackson.databind.JsonNode rootNode) throws InvalidParseOperationException
    {$data : [{ field: value, ... }, ... ] or { field: value, ... }
    Parameters:
      `rootNode` - JsonNode
    Throws:
      `InvalidParseOperationException` - if rootNode could not parse to JSON

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `RequestParserSingle`

  - ### getRequest

    public Insert getRequest()
    Overrides:
      `getRequest` in class `AbstractParser<RequestSingle>`
    Returns:
      the Request