public class SelectParserSingle extends RequestParserSingle
Modifier and Type | Field and Description |
---|---|
protected static int |
PROJECTION_POS |
FILTER_POS, QUERY_POS
adapter, hasFullTextCurrentQuery, hasFullTextQuery, request, rootNode, sourceRequest
Constructor and Description |
---|
SelectParserSingle()
Empty constructor
|
SelectParserSingle(VarNameAdapter adapter) |
Modifier and Type | Method and Description |
---|---|
void |
addProjection(com.fasterxml.jackson.databind.node.ObjectNode slice,
com.fasterxml.jackson.databind.node.ObjectNode allFields)
Add the new Projection slice to the current Projection.
|
protected RequestSingle |
getNewRequest() |
Select |
getRequest() |
void |
parse(com.fasterxml.jackson.databind.JsonNode request) |
void |
parseQueryOnly(String query) |
void |
projectionParse(com.fasterxml.jackson.databind.JsonNode rootNode)
$fields : {name1 : 0/1, name2 : 0/1, ...}, $usage : contractId
|
addCondition, analyzeRootQuery, filterParse, getLastDepth, hintCache, hintNoTimeout, model, parseJson, queryParse, toString
analyzeArrayCommand, analyzeOneCommand, getRequestId, getRootNode, getSource, hasFullTextQuery, isCommandAsFullText
protected static final int PROJECTION_POS
public SelectParserSingle()
public SelectParserSingle(VarNameAdapter adapter)
adapter
- VarNameAdapterprotected RequestSingle getNewRequest()
getNewRequest
in class AbstractParser<RequestSingle>
public void parse(com.fasterxml.jackson.databind.JsonNode request) throws InvalidParseOperationException
parse
in class AbstractParser<RequestSingle>
request
- containing a parsed JSON as [ {query}, {filter}, {projection} ] or { $query : query, $filter :
filter, $projection : projection }InvalidParseOperationException
- if request could not parse to JSONpublic void parseQueryOnly(String query) throws InvalidParseOperationException
parseQueryOnly
in class RequestParserSingle
query
- containing only the JSON request part (no filter neither projection nor roots)InvalidParseOperationException
- if query could not parse to projectionpublic void projectionParse(com.fasterxml.jackson.databind.JsonNode rootNode) throws InvalidParseOperationException
rootNode
- JsonNodeInvalidParseOperationException
- if rootNode could not parse to projection or check sanity to rootNode is
in errorpublic void addProjection(com.fasterxml.jackson.databind.node.ObjectNode slice, com.fasterxml.jackson.databind.node.ObjectNode allFields) throws InvalidParseOperationException
slice
- the projection to addallFields
- the default fields to add if none exists yetInvalidParseOperationException
- if slice or allFields is null or check sanity to them is in errorpublic Select getRequest()
getRequest
in class AbstractParser<RequestSingle>
Copyright © 2018 Vitam. All rights reserved.