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

# Class RequestParserMultiple

java.lang.Object
fr.gouv.vitam.common.database.parser.request.AbstractParser<RequestMultiple>
fr.gouv.vitam.common.database.parser.request.multiple.RequestParserMultiple

Direct Known Subclasses:
  `DeleteParserMultiple`, `InsertParserMultiple`, `SelectParserMultiple`, `UpdateParserMultiple`

public abstract class RequestParserMultiple extends AbstractParser<RequestMultiple>
Partial Request Parser (common base): { $roots: root, $query : query, $filter : filter }

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected int`
  `lastDepth`
  Last computed Depth

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

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RequestParserMultiple()`
  Constructor for Internal API
  `RequestParserMultiple(VarNameAdapter adapter)`
  Constructor for Metadata

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `analyzeRootQuery(com.fasterxml.jackson.databind.JsonNode command)`
  { expression, $exactdepth : exactdepth, $depth : /- depth }, $exactdepth and $depth being optional (mutual exclusive)
  `protected void`
  `filterParse(com.fasterxml.jackson.databind.JsonNode rootNode)`
  Filter part
  `String`
  `getFinalScrollId()`
  get ScrollId
  `int`
  `getFinalScrollTimeout()`
  get ScrollTimeout
  `final int`
  `getLastDepth()`
  `RequestMultiple`
  `getRequest()`
  `boolean`
  `hintCache()`
  `boolean`
  `hintNoTimeout()`
  `BuilderToken.FILTERARGS`
  `model()`
  `protected void`
  `parseJson(com.fasterxml.jackson.databind.JsonNode jsonRequest)`
  `protected void`
  `parseQueryOnly(String query)`
  `protected void`
  `queryParse(com.fasterxml.jackson.databind.JsonNode rootNode)`
  [ query, query ] or { query } if one level only
  `protected void`
  `rootParse(com.fasterxml.jackson.databind.JsonNode rootNode)`
  Will be used as extra arguments in the first query
  `String`
  `toString()`
  `boolean`
  `trackTotalHits()`
  Returns whether total hits is computed (defaults to false).

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

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

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

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

- ## Field Details

  - ### lastDepth

    protected int lastDepth
    Last computed Depth

- ## Constructor Details

  - ### RequestParserMultiple

    public RequestParserMultiple()
    Constructor for Internal API

  - ### RequestParserMultiple

    public RequestParserMultiple(VarNameAdapter adapter)
    Constructor for Metadata
    Parameters:
      `adapter` - VarNameAdapter

- ## Method Details

  - ### parseJson

    protected void parseJson(com.fasterxml.jackson.databind.JsonNode jsonRequest) throws InvalidParseOperationException
    Overrides:
      `parseJson` in class `AbstractParser<RequestMultiple>`
    Parameters:
      `jsonRequest` - containing a parsed JSON as { $roots: root, $query : query, $filter : filter }
    Throws:
      `InvalidParseOperationException` - if jsonRequest could not parse to JSON

  - ### parseQueryOnly

    protected void parseQueryOnly(String query) throws InvalidParseOperationException
    Parameters:
      `query` - containing only the JSON query part (no filter neither roots)
    Throws:
      `InvalidParseOperationException` - if query could not parse to JSON

  - ### rootParse

    protected void rootParse(com.fasterxml.jackson.databind.JsonNode rootNode) throws InvalidParseOperationException
    Will be used as extra arguments in the first query
    Parameters:
      `rootNode` - JsonNode the root of the request
    Throws:
      `InvalidParseOperationException` - if rootNode could not parse to JSON

  - ### filterParse

    protected void filterParse(com.fasterxml.jackson.databind.JsonNode rootNode) throws InvalidParseOperationException
    Filter part
    Parameters:
      `rootNode` - JsonNode The filter of the request
    Throws:
      `InvalidParseOperationException` - if rootNode could not parse to JSON

  - ### queryParse

    protected void queryParse(com.fasterxml.jackson.databind.JsonNode rootNode) throws InvalidParseOperationException
    [ query, query ] or { query } if one level only
    Parameters:
      `rootNode` - JsonNode the query of the request
    Throws:
      `InvalidParseOperationException` - if rootNode could not parse to JSON

  - ### analyzeRootQuery

    protected void analyzeRootQuery(com.fasterxml.jackson.databind.JsonNode command) throws InvalidParseOperationException, InvalidCreateOperationException
    { expression, $exactdepth : exactdepth, $depth : /- depth }, $exactdepth and $depth being optional (mutual exclusive)
    Parameters:
      `command` - JsonNode
    Throws:
      `InvalidParseOperationException` - if query could not parse to JSON
      `InvalidCreateOperationException` - if could not create query in JSON

  - ### toString

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

  - ### getRequest

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

  - ### getLastDepth

    public final int getLastDepth()
    Specified by:
      `getLastDepth` in class `AbstractParser<RequestMultiple>`
    Returns:
      the lastDepth

  - ### hintCache

    public boolean hintCache()
    Specified by:
      `hintCache` in class `AbstractParser<RequestMultiple>`
    Returns:
      True if the hint contains cache

  - ### hintNoTimeout

    public boolean hintNoTimeout()
    Specified by:
      `hintNoTimeout` in class `AbstractParser<RequestMultiple>`
    Returns:
      True if the hint contains notimeout

  - ### model

    public BuilderToken.FILTERARGS model()
    Specified by:
      `model` in class `AbstractParser<RequestMultiple>`
    Returns:
      the model between Units/ObjectGroups/Objects (in that order)

  - ### trackTotalHits

    public boolean trackTotalHits()
    Returns whether total hits is computed (defaults to false). See ES documentation for more details on "track_total_hits"

  - ### getFinalScrollId

    public String getFinalScrollId()
    get ScrollId
    Returns:
      the limit

  - ### getFinalScrollTimeout

    public int getFinalScrollTimeout()
    get ScrollTimeout
    Returns:
      ScrollTimeout