Class AbstractParser<E extends AbstractRequest>

  • Type Parameters:
    E - is one of RequestMultiple or RequestSingle
    Direct Known Subclasses:
    RequestParserMultiple, RequestParserSingle

    public abstract class AbstractParser<E extends AbstractRequest>
    extends java.lang.Object
    Abstract class implementing Parser for a Request Common abstract for both Multiple and Single Request
    • Field Detail

      • sourceRequest

        protected java.lang.String sourceRequest
      • hasFullTextQuery

        protected boolean hasFullTextQuery
        Contains queries to be computed by a full text index
      • hasFullTextCurrentQuery

        protected boolean hasFullTextCurrentQuery
        Current analyzed query to be computed by a full text index
      • rootNode

        protected com.fasterxml.jackson.databind.JsonNode rootNode
    • Constructor Detail

      • AbstractParser

        public AbstractParser()
    • Method Detail

      • getSource

        public java.lang.String getSource()
        Returns:
        the source
      • getRootNode

        public com.fasterxml.jackson.databind.JsonNode getRootNode()
        Returns:
        the rootNode
      • getRequest

        public E getRequest()
        Returns:
        the Request
      • getNewRequest

        protected abstract E getNewRequest()
        Returns:
        a new Request
      • parse

        public abstract void parse​(com.fasterxml.jackson.databind.JsonNode jsonRequest)
                            throws InvalidParseOperationException
        Parameters:
        jsonRequest - containing a parsed JSON as { $roots: root, $query : query, $filter : filter }
        Throws:
        InvalidParseOperationException - if jsonRequest could not parse to JSON
      • parseJson

        protected void parseJson​(com.fasterxml.jackson.databind.JsonNode jsonRequest)
                          throws InvalidParseOperationException
        Parameters:
        jsonRequest - containing a parsed JSON as { $roots: root, $query : query, $filter : filter }
        Throws:
        InvalidParseOperationException - if jsonRequest could not parse to JSON
      • hasFullTextQuery

        public final boolean hasFullTextQuery()
        Returns:
        the hasFullTextQuery
      • getAdapter

        public VarNameAdapter getAdapter()
        Returns:
        the adapter
      • getLastDepth

        public abstract int getLastDepth()
        Returns:
        int the depth of the query
      • hintNoTimeout

        public abstract boolean hintNoTimeout()
        Returns:
        true if not time out
      • hintCache

        public abstract boolean hintCache()
        Returns:
        true if not cache hint