Class RequestToAbstract

java.lang.Object
fr.gouv.vitam.common.database.translators.RequestToAbstract
Direct Known Subclasses:
RequestToElasticsearch, RequestToMongodb

public class RequestToAbstract extends Object
Request To X Abstract class. All translators should be based on this one.
  • Field Details

  • Constructor Details

    • RequestToAbstract

      public RequestToAbstract(AbstractParser<?> requestParser)
      Parameters:
      requestParser - AbstractParser in unknown type
  • Method Details

    • getRequestParser

      public AbstractParser<?> getRequestParser()
      Returns:
      the associated RequestParser
    • hasFullTextQuery

      public boolean hasFullTextQuery()
      Returns:
      true if at least one Query is needing Elasticsearch
    • hintCache

      public boolean hintCache()
      Returns:
      True if the hint contains cache
    • hintNoTimeout

      public boolean hintNoTimeout()
      Returns:
      True if the hint contains notimeout
    • model

      public BuilderToken.FILTERARGS model()
      Returns:
      the model between Units/ObjectGroups/Objects (in that order)
    • getLastDepth

      public int getLastDepth()
      Returns:
      The possible maximum depth
    • getRequest

      public AbstractRequest getRequest()
      Returns:
      the Request
    • getNbQueries

      public int getNbQueries()
      Returns:
      the number of queries
    • isMultiple

      public boolean isMultiple()
      Returns:
      True if this request is a "multiple" result request
    • getHints

      public com.fasterxml.jackson.databind.node.ArrayNode getHints()
      Used by the Data Engine (cache, nocache, notimeout (noCursorTimeout(noCursorTimeout)))
      Returns:
      the array of hints (if any)
    • getFinalLimit

      public int getFinalLimit()
      FindIterable.limit(limit)
      Returns:
      the limit
    • getFinalOffset

      public int getFinalOffset()
      FindIterable.skip(offset)
      Returns:
      the offset
    • getUsage

      public String getUsage()
      Returns:
      the associated usage if any
    • getNthQuery

      public final Query getNthQuery(int nth)
      Parameters:
      nth - int
      Returns:
      the nth Query