Class RequestToAbstract
java.lang.Object
fr.gouv.vitam.common.database.translators.RequestToAbstract
- Direct Known Subclasses:
RequestToElasticsearch
,RequestToMongodb
Request To X Abstract class. All translators should be based on this one.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
FindIterable.limit(limit)int
FindIterable.skip(offset)com.fasterxml.jackson.databind.node.ArrayNode
getHints()
Used by the Data Engine (cache, nocache, notimeout (noCursorTimeout(noCursorTimeout)))int
int
final Query
getNthQuery
(int nth) getUsage()
boolean
boolean
boolean
boolean
model()
-
Field Details
-
requestParser
-
-
Constructor Details
-
RequestToAbstract
- Parameters:
requestParser
- AbstractParser in unknown type
-
-
Method Details
-
getRequestParser
- Returns:
- the associated RequestParser
-
hasFullTextQuery
public boolean hasFullTextQuery()- Returns:
- true if at least one Query is needing Elasticsearch
-
hintCache
public boolean hintCache()- Returns:
- True if the hint contains cache
-
hintNoTimeout
public boolean hintNoTimeout()- Returns:
- True if the hint contains notimeout
-
model
- Returns:
- the model between Units/ObjectGroups/Objects (in that order)
-
getLastDepth
public int getLastDepth()- Returns:
- The possible maximum depth
-
getRequest
- Returns:
- the Request
-
getNbQueries
public int getNbQueries()- Returns:
- the number of queries
-
isMultiple
public boolean isMultiple()- Returns:
- True if this request is a "multiple" result request
-
getHints
public com.fasterxml.jackson.databind.node.ArrayNode getHints()Used by the Data Engine (cache, nocache, notimeout (noCursorTimeout(noCursorTimeout)))- Returns:
- the array of hints (if any)
-
getFinalLimit
public int getFinalLimit()FindIterable.limit(limit)- Returns:
- the limit
-
getFinalOffset
public int getFinalOffset()FindIterable.skip(offset)- Returns:
- the offset
-
getUsage
- Returns:
- the associated usage if any
-
getNthQuery
- Parameters:
nth
- int- Returns:
- the nth Query
-