Class SelectMultiQuery
- java.lang.Object
-
- fr.gouv.vitam.common.database.builder.request.AbstractRequest
-
- fr.gouv.vitam.common.database.builder.request.multiple.RequestMultiple
-
- fr.gouv.vitam.common.database.builder.request.multiple.SelectMultiQuery
-
public class SelectMultiQuery extends RequestMultiple
Select: { $roots: roots, $query : query, $filter : filter, $projection : projection, $facets : facet }
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Facet>
facets
Facetsprotected java.lang.Long
threshold
-
Fields inherited from class fr.gouv.vitam.common.database.builder.request.multiple.RequestMultiple
queries, roots
-
Fields inherited from class fr.gouv.vitam.common.database.builder.request.AbstractRequest
filter, projection
-
-
Constructor Summary
Constructors Constructor Description SelectMultiQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SelectMultiQuery
addFacets(Facet... facets)
protected void
addFacetsToNode(com.fasterxml.jackson.databind.node.ObjectNode node)
Add facets to given nodeSelectMultiQuery
addOrderByAscFilter(java.lang.String... variableNames)
SelectMultiQuery
addOrderByDescFilter(java.lang.String... variableNames)
SelectMultiQuery
addOrderByFilter(com.fasterxml.jackson.databind.JsonNode filterContent)
SelectMultiQuery
addProjection(com.fasterxml.jackson.databind.JsonNode projectionContent)
SelectMultiQuery
addUnusedProjection(java.lang.String... variableNames)
SelectMultiQuery
addUsedProjection(java.lang.String... variableNames)
boolean
getAllProjection()
default implements of getAllProjectionjava.util.List<Facet>
getFacets()
getFacetscom.fasterxml.jackson.databind.node.ObjectNode
getFinalSelect()
com.fasterxml.jackson.databind.node.ObjectNode
getFinalSelectById()
com.fasterxml.jackson.databind.node.ObjectNode
getProjection()
default implements of getProjectionjava.lang.Long
getThreshold()
Getter for thresholdSelectMultiQuery
parseLimitFilter(java.lang.String filter)
SelectMultiQuery
parseOrderByFilter(java.lang.String filter)
SelectMultiQuery
parseProjection(java.lang.String projection)
SelectMultiQuery
reset()
SelectMultiQuery
resetFacets()
SelectMultiQuery
resetLimitFilter()
SelectMultiQuery
resetOrderByFilter()
SelectMultiQuery
resetUsageProjection()
SelectMultiQuery
resetUsedProjection()
protected SelectMultiQuery
selectSetProjection(com.fasterxml.jackson.databind.JsonNode projectionContent)
SelectMultiQuery
setFacet(Facet facet)
SelectMultiQuery
setFilter(com.fasterxml.jackson.databind.JsonNode filterContent)
SelectMultiQuery
setLimitFilter(long offset, long limit)
SelectMultiQuery
setLimitFilter(com.fasterxml.jackson.databind.JsonNode filterContent)
SelectMultiQuery
setProjection(com.fasterxml.jackson.databind.JsonNode projectionContent)
SelectMultiQuery
setScrollFilter(java.lang.String scrollId, int scrollTimeout, int limit)
void
setThreshold(java.lang.Long threshold)
Setter for thresholdSelectMultiQuery
setUsageProjection(com.fasterxml.jackson.databind.JsonNode projectionContent)
SelectMultiQuery
setUsageProjection(java.lang.String usage)
java.lang.String
toString()
SelectMultiQuery
trackTotalHits(boolean trackTotalHits)
-
Methods inherited from class fr.gouv.vitam.common.database.builder.request.multiple.RequestMultiple
addQueries, addRoots, addRoots, getActions, getData, getFinal, getNbQueries, getNthQuery, getQueries, getRoots, parseRoots, resetQueries, resetRoots, setFacets, setQuery
-
Methods inherited from class fr.gouv.vitam.common.database.builder.request.AbstractRequest
addHintFilter, addHintFilter, getFilter, parseFilter, resetFilter, resetHintFilter, selectAddOrderByAscFilter, selectAddOrderByDescFilter, selectAddOrderByFilter, selectAddProjection, selectAddUnusedProjection, selectAddUsedProjection, selectGetAllProjection, selectGetFinalSelect, selectGetProjection, selectParseLimitFilter, selectParseOrderByFilter, selectParseProjection, selectReset, selectResetLimitFilter, selectResetOrderByFilter, selectResetUsedProjection, selectSetFilter, selectSetLimitFilter, selectSetLimitFilter, selectSetScrollFilter
-
-
-
-
Field Detail
-
facets
protected java.util.List<Facet> facets
Facets
-
threshold
protected java.lang.Long threshold
-
-
Method Detail
-
resetFacets
public final SelectMultiQuery resetFacets()
- Returns:
- this Request
-
resetLimitFilter
public final SelectMultiQuery resetLimitFilter()
- Returns:
- this Query
-
resetOrderByFilter
public final SelectMultiQuery resetOrderByFilter()
- Returns:
- this Query
-
resetUsedProjection
public final SelectMultiQuery resetUsedProjection()
- Returns:
- this Query
-
resetUsageProjection
public final SelectMultiQuery resetUsageProjection()
- Returns:
- this Query
-
reset
public final SelectMultiQuery reset()
- Overrides:
reset
in classRequestMultiple
- Returns:
- this Query
-
setLimitFilter
public final SelectMultiQuery setLimitFilter(long offset, long limit)
- Parameters:
offset
- ignored if 0limit
- ignored if 0- Returns:
- this Query
-
setLimitFilter
public final SelectMultiQuery setLimitFilter(com.fasterxml.jackson.databind.JsonNode filterContent)
- Parameters:
filterContent
- content json- Returns:
- this Query
-
trackTotalHits
public final SelectMultiQuery trackTotalHits(boolean trackTotalHits)
- Parameters:
trackTotalHits
- to set. false (default) to return approximative total hits, true to return exact total hits- Returns:
- this Query
-
parseLimitFilter
public final SelectMultiQuery parseLimitFilter(java.lang.String filter) throws InvalidParseOperationException
- Parameters:
filter
- string filter- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
addOrderByAscFilter
public final SelectMultiQuery addOrderByAscFilter(java.lang.String... variableNames) throws InvalidParseOperationException
- Parameters:
variableNames
- list of key name- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
addOrderByDescFilter
public final SelectMultiQuery addOrderByDescFilter(java.lang.String... variableNames) throws InvalidParseOperationException
- Parameters:
variableNames
- list of key name- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
addOrderByFilter
public final SelectMultiQuery addOrderByFilter(com.fasterxml.jackson.databind.JsonNode filterContent) throws InvalidParseOperationException
- Parameters:
filterContent
- json filter- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
parseOrderByFilter
public final SelectMultiQuery parseOrderByFilter(java.lang.String filter) throws InvalidParseOperationException
- Parameters:
filter
- string filter- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
setFilter
public final SelectMultiQuery setFilter(com.fasterxml.jackson.databind.JsonNode filterContent) throws InvalidParseOperationException
- Overrides:
setFilter
in classAbstractRequest
- Parameters:
filterContent
- json filter- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
addUsedProjection
public final SelectMultiQuery addUsedProjection(java.lang.String... variableNames) throws InvalidParseOperationException
- Parameters:
variableNames
- list of key name- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
addUnusedProjection
public final SelectMultiQuery addUnusedProjection(java.lang.String... variableNames) throws InvalidParseOperationException
- Parameters:
variableNames
- list of key name- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
addProjection
public final SelectMultiQuery addProjection(com.fasterxml.jackson.databind.JsonNode projectionContent)
- Parameters:
projectionContent
- json projection- Returns:
- this Query
-
parseProjection
public final SelectMultiQuery parseProjection(java.lang.String projection) throws InvalidParseOperationException
- Parameters:
projection
- string projection- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
setUsageProjection
public final SelectMultiQuery setUsageProjection(java.lang.String usage) throws InvalidParseOperationException
- Parameters:
usage
- string- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
setUsageProjection
public final SelectMultiQuery setUsageProjection(com.fasterxml.jackson.databind.JsonNode projectionContent) throws InvalidParseOperationException
- Parameters:
projectionContent
- json projection- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
selectSetProjection
protected final SelectMultiQuery selectSetProjection(com.fasterxml.jackson.databind.JsonNode projectionContent) throws InvalidParseOperationException
- Overrides:
selectSetProjection
in classAbstractRequest
- Parameters:
projectionContent
- json projection- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
setProjection
public final SelectMultiQuery setProjection(com.fasterxml.jackson.databind.JsonNode projectionContent) throws InvalidParseOperationException
- Parameters:
projectionContent
- json projection- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
getFinalSelect
public final com.fasterxml.jackson.databind.node.ObjectNode getFinalSelect()
- Returns:
- the Final Select containing all 5 parts: roots array, queries array, facets array, filter and projection
-
getFinalSelectById
public final com.fasterxml.jackson.databind.node.ObjectNode getFinalSelectById()
- Returns:
- the Final Select By Id containing only one part: projection
-
addFacetsToNode
protected void addFacetsToNode(com.fasterxml.jackson.databind.node.ObjectNode node)
Add facets to given node- Parameters:
node
- with facets
-
getAllProjection
public final boolean getAllProjection()
Description copied from class:RequestMultiple
default implements of getAllProjection- Overrides:
getAllProjection
in classRequestMultiple
- Returns:
- True if the projection is not restricted
-
getProjection
public final com.fasterxml.jackson.databind.node.ObjectNode getProjection()
Description copied from class:RequestMultiple
default implements of getProjection- Overrides:
getProjection
in classRequestMultiple
- Returns:
- the projection
-
getFacets
public final java.util.List<Facet> getFacets()
Description copied from class:RequestMultiple
getFacets- Overrides:
getFacets
in classRequestMultiple
- Returns:
- the facets
-
addFacets
public final SelectMultiQuery addFacets(Facet... facets)
- Parameters:
facets
- list of facet- Returns:
- this Request
- Throws:
java.lang.IllegalArgumentException
- when facet is invalid
-
setFacet
public SelectMultiQuery setFacet(Facet facet)
- Parameters:
facet
- facet- Returns:
- this Request
- Throws:
java.lang.IllegalArgumentException
- when facet is invalid
-
setScrollFilter
public final SelectMultiQuery setScrollFilter(java.lang.String scrollId, int scrollTimeout, int limit)
- Parameters:
scrollId
- ignored if empty or nullscrollTimeout
- ignored if 0limit
- ignored if 0- Returns:
- this Query
-
getThreshold
public java.lang.Long getThreshold()
Getter for threshold- Overrides:
getThreshold
in classRequestMultiple
- Returns:
- the threshold
-
setThreshold
public void setThreshold(java.lang.Long threshold)
Setter for threshold- Overrides:
setThreshold
in classRequestMultiple
- Parameters:
threshold
- the value to set for the threshold
-
toString
public java.lang.String toString()
- Overrides:
toString
in classRequestMultiple
-
-