Class RequestMultiple
- java.lang.Object
-
- fr.gouv.vitam.common.database.builder.request.AbstractRequest
-
- fr.gouv.vitam.common.database.builder.request.multiple.RequestMultiple
-
- Direct Known Subclasses:
DeleteMultiQuery
,InsertMultiQuery
,SelectMultiQuery
,UpdateMultiQuery
public abstract class RequestMultiple extends AbstractRequest
abstract class for multi query request
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Facet>
facets
protected java.util.List<Query>
queries
protected java.util.Set<java.lang.String>
roots
protected java.lang.Long
threshold
-
Fields inherited from class fr.gouv.vitam.common.database.builder.request.AbstractRequest
filter, projection
-
-
Constructor Summary
Constructors Constructor Description RequestMultiple()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestMultiple
addQueries(Query... queries)
RequestMultiple
addRoots(com.fasterxml.jackson.databind.node.ArrayNode rootContent)
RequestMultiple
addRoots(java.lang.String... roots)
java.util.List<Action>
getActions()
default implements of getActionsboolean
getAllProjection()
default implements of getAllProjectioncom.fasterxml.jackson.databind.JsonNode
getData()
default implements of getDatajava.util.List<Facet>
getFacets()
getFacetsprotected com.fasterxml.jackson.databind.node.ObjectNode
getFinal()
Get the json final of requestint
getNbQueries()
Query
getNthQuery(int nth)
com.fasterxml.jackson.databind.node.ObjectNode
getProjection()
default implements of getProjectionjava.util.List<Query>
getQueries()
java.util.Set<java.lang.String>
getRoots()
java.lang.Long
getThreshold()
Getter for thresholdRequestMultiple
parseRoots(java.lang.String roots)
RequestMultiple
reset()
RequestMultiple
resetQueries()
RequestMultiple
resetRoots()
void
setFacets(java.util.List<Facet> facets)
setFacetsRequestMultiple
setQuery(Query query)
Set the query of request: in case of multi-query request: re-initialize list of queryvoid
setThreshold(java.lang.Long threshold)
Setter for thresholdjava.lang.String
toString()
-
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, selectSetProjection, selectSetScrollFilter, setFilter
-
-
-
-
Method Detail
-
resetQueries
public final RequestMultiple resetQueries()
- Returns:
- this Request
-
resetRoots
public final RequestMultiple resetRoots()
- Returns:
- this Request
-
reset
public RequestMultiple reset()
- Overrides:
reset
in classAbstractRequest
- Returns:
- this Request
-
addQueries
public final RequestMultiple addQueries(Query... queries) throws InvalidCreateOperationException
- Parameters:
queries
- list of query- Returns:
- this Request
- Throws:
InvalidCreateOperationException
- when query is invalid
-
setQuery
public RequestMultiple setQuery(Query query) throws InvalidCreateOperationException
Description copied from class:AbstractRequest
Set the query of request: in case of multi-query request: re-initialize list of query- Specified by:
setQuery
in classAbstractRequest
- Parameters:
query
- of request- Returns:
- this request
- Throws:
InvalidCreateOperationException
- when query is invalid
-
addRoots
public final RequestMultiple addRoots(java.lang.String... roots) throws InvalidParseOperationException
- Parameters:
roots
- string root- Returns:
- this Request
- Throws:
InvalidParseOperationException
- when query is invalid
-
addRoots
public final RequestMultiple addRoots(com.fasterxml.jackson.databind.node.ArrayNode rootContent)
- Parameters:
rootContent
- array of root- Returns:
- this Request
-
parseRoots
public final RequestMultiple parseRoots(java.lang.String roots) throws InvalidParseOperationException
- Parameters:
roots
- string of array root- Returns:
- this Request
- Throws:
InvalidParseOperationException
- when query is invalid
-
getFinal
protected final com.fasterxml.jackson.databind.node.ObjectNode getFinal()
Get the json final of request- Specified by:
getFinal
in classAbstractRequest
- Returns:
- the Final containing all 3 parts: roots, queries array and filter
-
getRoots
public final java.util.Set<java.lang.String> getRoots()
- Specified by:
getRoots
in classAbstractRequest
- Returns:
- the roots array
-
getNbQueries
public final int getNbQueries()
- Specified by:
getNbQueries
in classAbstractRequest
- Returns:
- the number of queries
-
getQueries
public final java.util.List<Query> getQueries()
- Specified by:
getQueries
in classAbstractRequest
- Returns:
- the queries list
-
getNthQuery
public final Query getNthQuery(int nth)
- Parameters:
nth
- query position- Returns:
- the nth query
-
getFacets
public java.util.List<Facet> getFacets()
getFacets- Returns:
-
setFacets
public void setFacets(java.util.List<Facet> facets)
setFacets- Parameters:
facets
-
-
getData
public com.fasterxml.jackson.databind.JsonNode getData()
default implements of getData- Specified by:
getData
in classAbstractRequest
- Returns:
- the data
-
getAllProjection
public boolean getAllProjection()
default implements of getAllProjection- Specified by:
getAllProjection
in classAbstractRequest
- Returns:
- True if the projection is not restricted
-
getProjection
public com.fasterxml.jackson.databind.node.ObjectNode getProjection()
default implements of getProjection- Specified by:
getProjection
in classAbstractRequest
- Returns:
- the projection
-
getThreshold
public java.lang.Long getThreshold()
Getter for threshold- Returns:
- the threshold
-
setThreshold
public void setThreshold(java.lang.Long threshold)
Setter for threshold- Parameters:
threshold
- the value to set for the threshold
-
getActions
public java.util.List<Action> getActions()
default implements of getActions- Specified by:
getActions
in classAbstractRequest
- Returns:
- list of actions
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractRequest
-
-