Class SelectParserMultiple
java.lang.Object
fr.gouv.vitam.common.database.parser.request.AbstractParser<RequestMultiple>
fr.gouv.vitam.common.database.parser.request.multiple.RequestParserMultiple
fr.gouv.vitam.common.database.parser.request.multiple.SelectParserMultiple
Select Parser: { $roots: roots, $query : query, $filter : filter, $projection : projection }
-
Field Summary
Fields inherited from class fr.gouv.vitam.common.database.parser.request.multiple.RequestParserMultiple
lastDepth
Fields inherited from class fr.gouv.vitam.common.database.parser.request.AbstractParser
adapter, hasFullTextCurrentQuery, hasFullTextQuery, request, rootNode, sourceRequest
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Facet
analyzeOneFacet
(com.fasterxml.jackson.databind.JsonNode facet, BuilderToken.FACET facetCommand) Generate a Facet from a Json + commandprotected void
facetsParse
(com.fasterxml.jackson.databind.JsonNode rootNode) Parse facetsstatic final BuilderToken.FACET
getFacetCommand
(com.fasterxml.jackson.databind.JsonNode facet) Get the facet commandprotected RequestMultiple
void
parse
(com.fasterxml.jackson.databind.JsonNode request) void
parseQueryOnly
(String query) protected void
parseTrackTotalHits
(com.fasterxml.jackson.databind.JsonNode rootNode) protected void
projectionParse
(com.fasterxml.jackson.databind.JsonNode rootNode) $fields : {name1 : 0/1, name2 : 0/1, ...}, $usage : contractIdprotected void
thresholdParse
(com.fasterxml.jackson.databind.JsonNode rootNode) {$"threshold" : arg}Methods inherited from class fr.gouv.vitam.common.database.parser.request.multiple.RequestParserMultiple
analyzeRootQuery, filterParse, getFinalScrollId, getFinalScrollTimeout, getLastDepth, hintCache, hintNoTimeout, model, parseJson, queryParse, rootParse, toString, trackTotalHits
Methods inherited from class fr.gouv.vitam.common.database.parser.request.AbstractParser
analyzeOneCommand, getAdapter, getRootNode, getSource, hasFullTextQuery, parseOrderByFilter
-
Constructor Details
-
SelectParserMultiple
public SelectParserMultiple()Empty constructor -
SelectParserMultiple
- Parameters:
adapter
- VarNameAdapter
-
-
Method Details
-
getNewRequest
- Specified by:
getNewRequest
in classAbstractParser<RequestMultiple>
- Returns:
- a new Request
-
parse
public void parse(com.fasterxml.jackson.databind.JsonNode request) throws InvalidParseOperationException - Specified by:
parse
in classAbstractParser<RequestMultiple>
- Parameters:
request
- containing a parsed JSON as { $roots: root, $query : query, $filter : filter, $projection : projection }- Throws:
InvalidParseOperationException
- if request could not parse to JSON
-
parseQueryOnly
- Overrides:
parseQueryOnly
in classRequestParserMultiple
- Parameters:
query
- containing only the JSON request part (no filter neither projection nor roots)- Throws:
InvalidParseOperationException
- if request could not parse to JSON
-
facetsParse
protected void facetsParse(com.fasterxml.jackson.databind.JsonNode rootNode) throws InvalidParseOperationException Parse facets- Parameters:
rootNode
- JsonNode- Throws:
InvalidParseOperationException
- if rootNode could not parse to JSON
-
getFacetCommand
public static final BuilderToken.FACET getFacetCommand(com.fasterxml.jackson.databind.JsonNode facet) throws InvalidParseOperationException Get the facet command- Parameters:
facet
- facet- Returns:
- FACET command
- Throws:
InvalidParseOperationException
- when valid command could not be found
-
analyzeOneFacet
protected Facet analyzeOneFacet(com.fasterxml.jackson.databind.JsonNode facet, BuilderToken.FACET facetCommand) throws InvalidCreateOperationException, InvalidParseOperationException Generate a Facet from a Json + command- Parameters:
facet
- facet as jsonfacetCommand
- facet command- Returns:
- Facet
- Throws:
InvalidCreateOperationException
- parsing errorInvalidParseOperationException
- invalid command type
-
projectionParse
protected void projectionParse(com.fasterxml.jackson.databind.JsonNode rootNode) throws InvalidParseOperationException $fields : {name1 : 0/1, name2 : 0/1, ...}, $usage : contractId- Parameters:
rootNode
- JsonNode- Throws:
InvalidParseOperationException
- if rootNode could not parse to JSON
-
thresholdParse
protected void thresholdParse(com.fasterxml.jackson.databind.JsonNode rootNode) throws InvalidParseOperationException {$"threshold" : arg}- Parameters:
rootNode
- JsonNode- Throws:
InvalidParseOperationException
- if rootNode could not parse to JSON
-
parseTrackTotalHits
protected void parseTrackTotalHits(com.fasterxml.jackson.databind.JsonNode rootNode) throws InvalidParseOperationException - Throws:
InvalidParseOperationException
-
getRequest
- Overrides:
getRequest
in classRequestParserMultiple
- Returns:
- the Request
-