Class RequestToAbstract
- java.lang.Object
-
- fr.gouv.vitam.common.database.translators.RequestToAbstract
-
- Direct Known Subclasses:
RequestToElasticsearch,RequestToMongodb
public class RequestToAbstract extends java.lang.ObjectRequest To X Abstract class. All translators should be based on this one.
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractParser<?>requestParser
-
Constructor Summary
Constructors Constructor Description RequestToAbstract(AbstractParser<?> requestParser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetFinalLimit()FindIterable.limit(limit)intgetFinalOffset()FindIterable.skip(offset)com.fasterxml.jackson.databind.node.ArrayNodegetHints()Used by the Data Engine (cache, nocache, notimeout (noCursorTimeout(noCursorTimeout)))intgetLastDepth()intgetNbQueries()QuerygetNthQuery(int nth)AbstractRequestgetRequest()AbstractParser<?>getRequestParser()java.lang.StringgetUsage()booleanhasFullTextQuery()booleanhintCache()booleanhintNoTimeout()booleanisMultiple()BuilderToken.FILTERARGSmodel()
-
-
-
Field Detail
-
requestParser
protected AbstractParser<?> requestParser
-
-
Constructor Detail
-
RequestToAbstract
public RequestToAbstract(AbstractParser<?> requestParser)
- Parameters:
requestParser- AbstractParser in unknown type
-
-
Method Detail
-
getRequestParser
public AbstractParser<?> 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
public BuilderToken.FILTERARGS model()
- Returns:
- the model between Units/ObjectGroups/Objects (in that order)
-
getLastDepth
public int getLastDepth()
- Returns:
- The possible maximum depth
-
getRequest
public AbstractRequest 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
public java.lang.String getUsage()
- Returns:
- the associated usage if any
-
getNthQuery
public final Query getNthQuery(int nth)
- Parameters:
nth- int- Returns:
- the nth Query
-
-