E
- is one of RequestMultiple or RequestSinglepublic abstract class AbstractParser<E extends AbstractRequest> extends Object
Modifier and Type | Field and Description |
---|---|
protected VarNameAdapter |
adapter |
protected boolean |
hasFullTextCurrentQuery
Current analyzed query to be computed by a full text index
|
protected boolean |
hasFullTextQuery
Contains queries to be computed by a full text index
|
protected E |
request |
protected com.fasterxml.jackson.databind.JsonNode |
rootNode |
protected String |
sourceRequest |
Constructor and Description |
---|
AbstractParser() |
Modifier and Type | Method and Description |
---|---|
protected Query[] |
analyzeArrayCommand(BuilderToken.QUERY query,
com.fasterxml.jackson.databind.JsonNode commands) |
protected Query |
analyzeOneCommand(String refCommand,
com.fasterxml.jackson.databind.JsonNode command) |
abstract int |
getLastDepth() |
protected abstract E |
getNewRequest() |
E |
getRequest() |
static BuilderToken.QUERY |
getRequestId(String queryroot)
Compute the QUERY from command
|
com.fasterxml.jackson.databind.JsonNode |
getRootNode() |
String |
getSource() |
boolean |
hasFullTextQuery() |
abstract boolean |
hintCache() |
abstract boolean |
hintNoTimeout() |
protected static boolean |
isCommandAsFullText(BuilderToken.QUERY query)
Check if the command is allowed using the "standard" database
|
abstract BuilderToken.FILTERARGS |
model() |
abstract void |
parse(com.fasterxml.jackson.databind.JsonNode jsonRequest) |
protected void |
parseJson(com.fasterxml.jackson.databind.JsonNode jsonRequest) |
protected VarNameAdapter adapter
protected String sourceRequest
protected E extends AbstractRequest request
protected boolean hasFullTextQuery
protected boolean hasFullTextCurrentQuery
protected com.fasterxml.jackson.databind.JsonNode rootNode
public String getSource()
public com.fasterxml.jackson.databind.JsonNode getRootNode()
public E getRequest()
protected abstract E getNewRequest()
public abstract void parse(com.fasterxml.jackson.databind.JsonNode jsonRequest) throws InvalidParseOperationException
jsonRequest
- containing a parsed JSON as [ {root}, {query}, {filter} ] or { $roots: root, $query : query,
$filter : filter }InvalidParseOperationException
- if jsonRequest could not parse to JSONprotected void parseJson(com.fasterxml.jackson.databind.JsonNode jsonRequest) throws InvalidParseOperationException
jsonRequest
- containing a parsed JSON as [ {root}, {query}, {filter} ] or { $roots: root, $query : query,
$filter : filter }InvalidParseOperationException
- if jsonRequest could not parse to JSONpublic final boolean hasFullTextQuery()
protected Query[] analyzeArrayCommand(BuilderToken.QUERY query, com.fasterxml.jackson.databind.JsonNode commands) throws InvalidParseOperationException, InvalidCreateOperationException
protected static boolean isCommandAsFullText(BuilderToken.QUERY query)
query
- QUERYpublic static final BuilderToken.QUERY getRequestId(String queryroot) throws InvalidParseOperationException
queryroot
- StringInvalidParseOperationException
- if queryroot could not parse to JSONprotected Query analyzeOneCommand(String refCommand, com.fasterxml.jackson.databind.JsonNode command) throws InvalidParseOperationException, InvalidCreateOperationException
public abstract int getLastDepth()
public abstract BuilderToken.FILTERARGS model()
public abstract boolean hintNoTimeout()
public abstract boolean hintCache()
Copyright © 2018 Vitam. All rights reserved.