Class AbstractParser<E extends AbstractRequest>
java.lang.Object
fr.gouv.vitam.common.database.parser.request.AbstractParser<E>
- Type Parameters:
E
- is one of RequestMultiple or RequestSingle
- Direct Known Subclasses:
RequestParserMultiple
,RequestParserSingle
Abstract class implementing Parser for a Request
Common abstract for both Multiple and Single Request
-
Field Summary
Modifier and TypeFieldDescriptionprotected VarNameAdapter
protected boolean
Current analyzed query to be computed by a full text indexprotected boolean
Contains queries to be computed by a full text indexprotected E
protected com.fasterxml.jackson.databind.JsonNode
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Query
analyzeOneCommand
(String refCommand, com.fasterxml.jackson.databind.JsonNode command) abstract int
protected abstract E
com.fasterxml.jackson.databind.JsonNode
final boolean
abstract boolean
abstract boolean
abstract BuilderToken.FILTERARGS
model()
abstract void
parse
(com.fasterxml.jackson.databind.JsonNode jsonRequest) protected void
parseJson
(com.fasterxml.jackson.databind.JsonNode jsonRequest) protected void
parseOrderByFilter
(com.fasterxml.jackson.databind.JsonNode filterNode)
-
Field Details
-
adapter
-
sourceRequest
-
request
-
hasFullTextQuery
protected boolean hasFullTextQueryContains queries to be computed by a full text index -
hasFullTextCurrentQuery
protected boolean hasFullTextCurrentQueryCurrent analyzed query to be computed by a full text index -
rootNode
protected com.fasterxml.jackson.databind.JsonNode rootNode
-
-
Constructor Details
-
AbstractParser
public AbstractParser()
-
-
Method Details
-
getSource
- Returns:
- the source
-
getRootNode
public com.fasterxml.jackson.databind.JsonNode getRootNode()- Returns:
- the rootNode
-
getRequest
- Returns:
- the Request
-
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
- Returns:
- the adapter
-
analyzeOneCommand
protected Query analyzeOneCommand(String refCommand, com.fasterxml.jackson.databind.JsonNode command) throws InvalidParseOperationException, InvalidCreateOperationException -
getLastDepth
public abstract int getLastDepth()- Returns:
- int the depth of the query
-
model
- Returns:
- FILTERARGS the filter argument
-
hintNoTimeout
public abstract boolean hintNoTimeout()- Returns:
- true if not time out
-
hintCache
public abstract boolean hintCache()- Returns:
- true if not cache hint
-
parseOrderByFilter
protected void parseOrderByFilter(com.fasterxml.jackson.databind.JsonNode filterNode) throws InvalidParseOperationException - Throws:
InvalidParseOperationException
-