Class AbstractRequest
java.lang.Object
fr.gouv.vitam.common.database.builder.request.AbstractRequest
- Direct Known Subclasses:
RequestMultiple
,RequestSingle
Common Abstract Request
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.fasterxml.jackson.databind.node.ObjectNode
protected com.fasterxml.jackson.databind.node.ObjectNode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal AbstractRequest
addHintFilter
(com.fasterxml.jackson.databind.JsonNode filterContent) final AbstractRequest
addHintFilter
(String... hints) abstract boolean
abstract com.fasterxml.jackson.databind.JsonNode
getData()
final com.fasterxml.jackson.databind.node.ObjectNode
protected abstract com.fasterxml.jackson.databind.node.ObjectNode
getFinal()
Get the json final of requestabstract int
abstract com.fasterxml.jackson.databind.node.ObjectNode
getRoots()
final AbstractRequest
parseFilter
(String filter) reset()
final AbstractRequest
final AbstractRequest
protected final AbstractRequest
selectAddOrderByAscFilter
(String... variableNames) protected final AbstractRequest
selectAddOrderByDescFilter
(String... variableNames) protected final AbstractRequest
selectAddOrderByFilter
(com.fasterxml.jackson.databind.JsonNode filterContent) protected final AbstractRequest
selectAddProjection
(com.fasterxml.jackson.databind.JsonNode projectionContent) protected final AbstractRequest
selectAddUnusedProjection
(String... variableNames) protected final AbstractRequest
selectAddUsedProjection
(String... variableNames) protected boolean
protected final com.fasterxml.jackson.databind.node.ObjectNode
protected com.fasterxml.jackson.databind.node.ObjectNode
protected final AbstractRequest
selectParseLimitFilter
(String filter) protected final AbstractRequest
selectParseOrderByFilter
(String filter) protected final AbstractRequest
selectParseProjection
(String projection) protected final AbstractRequest
protected final AbstractRequest
protected final AbstractRequest
protected final AbstractRequest
protected final AbstractRequest
selectSetFilter
(com.fasterxml.jackson.databind.JsonNode filterContent) protected final AbstractRequest
selectSetLimitFilter
(long offset, long limit) protected final AbstractRequest
selectSetLimitFilter
(com.fasterxml.jackson.databind.JsonNode filterContent) protected AbstractRequest
selectSetProjection
(com.fasterxml.jackson.databind.JsonNode projectionContent) protected final AbstractRequest
selectSetScrollFilter
(String scrollId, int scrollTimeout, int limit) setFilter
(com.fasterxml.jackson.databind.JsonNode filterContent) abstract AbstractRequest
Set the query of request: in case of multi-query request: re-initialize list of querytoString()
-
Field Details
-
filter
protected com.fasterxml.jackson.databind.node.ObjectNode filter -
projection
protected com.fasterxml.jackson.databind.node.ObjectNode projection
-
-
Constructor Details
-
AbstractRequest
public AbstractRequest()
-
-
Method Details
-
resetHintFilter
- Returns:
- this Request
-
resetFilter
- Returns:
- this Request
-
reset
- Returns:
- this Request
-
addHintFilter
- Parameters:
hints
- list of hint- Returns:
- this Request
- Throws:
InvalidParseOperationException
- when query is invalid
-
addHintFilter
- Parameters:
filterContent
- json filter- Returns:
- this Request
-
setFilter
public AbstractRequest setFilter(com.fasterxml.jackson.databind.JsonNode filterContent) throws InvalidParseOperationException - Parameters:
filterContent
- json filter- Returns:
- this Request
- Throws:
InvalidParseOperationException
- when query is invalid
-
parseFilter
- Parameters:
filter
- String filter- Returns:
- this Request
- Throws:
InvalidParseOperationException
- when query is invalid
-
getFilter
public final com.fasterxml.jackson.databind.node.ObjectNode getFilter()- Returns:
- the filter
-
toString
-
setQuery
Set the query of request: in case of multi-query request: re-initialize list of query- Parameters:
query
- of request- Returns:
- this request
- Throws:
InvalidCreateOperationException
- when query is invalid
-
getNbQueries
public abstract int getNbQueries()- Returns:
- the number of queries
-
getQueries
- Returns:
- the queries list
-
getRoots
- Returns:
- the queries list
-
getData
public abstract com.fasterxml.jackson.databind.JsonNode getData()- Returns:
- the data
-
getActions
- Returns:
- list of actions
-
getAllProjection
public abstract boolean getAllProjection()- Returns:
- True if the projection is not restricted
-
getProjection
public abstract com.fasterxml.jackson.databind.node.ObjectNode getProjection()- Returns:
- the projection
-
selectResetLimitFilter
- Returns:
- this Query
-
selectResetOrderByFilter
- Returns:
- this Query
-
selectResetUsedProjection
- Returns:
- this Query
-
selectReset
-
selectSetScrollFilter
protected final AbstractRequest selectSetScrollFilter(String scrollId, int scrollTimeout, int limit) - Parameters:
scrollId
- ignored if empty or nullscrollTimeout
- ignored if 0limit
- ignored if 0- Returns:
- this Query
-
selectSetLimitFilter
- Parameters:
offset
- ignored if 0limit
- ignored if 0- Returns:
- this Query
-
selectSetLimitFilter
protected final AbstractRequest selectSetLimitFilter(com.fasterxml.jackson.databind.JsonNode filterContent) - Parameters:
filterContent
- json filter- Returns:
- this Query
-
selectParseLimitFilter
protected final AbstractRequest selectParseLimitFilter(String filter) throws InvalidParseOperationException - Parameters:
filter
- string filter- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
selectAddOrderByAscFilter
protected final AbstractRequest selectAddOrderByAscFilter(String... variableNames) throws InvalidParseOperationException - Parameters:
variableNames
- list of key name- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
selectAddOrderByDescFilter
protected final AbstractRequest selectAddOrderByDescFilter(String... variableNames) throws InvalidParseOperationException - Parameters:
variableNames
- list of key name- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
selectAddOrderByFilter
protected final AbstractRequest selectAddOrderByFilter(com.fasterxml.jackson.databind.JsonNode filterContent) throws InvalidParseOperationException - Parameters:
filterContent
- json filter- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
selectParseOrderByFilter
protected final AbstractRequest selectParseOrderByFilter(String filter) throws InvalidParseOperationException - Parameters:
filter
- string filter- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
selectSetFilter
protected final AbstractRequest selectSetFilter(com.fasterxml.jackson.databind.JsonNode filterContent) throws InvalidParseOperationException - Throws:
InvalidParseOperationException
-
selectAddUsedProjection
protected final AbstractRequest selectAddUsedProjection(String... variableNames) throws InvalidParseOperationException - Parameters:
variableNames
- list of key name- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
selectAddUnusedProjection
protected final AbstractRequest selectAddUnusedProjection(String... variableNames) throws InvalidParseOperationException - Parameters:
variableNames
- list of key name- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
selectAddProjection
protected final AbstractRequest selectAddProjection(com.fasterxml.jackson.databind.JsonNode projectionContent) - Parameters:
projectionContent
- json projection- Returns:
- this Query
-
selectParseProjection
protected final AbstractRequest selectParseProjection(String projection) throws InvalidParseOperationException - Parameters:
projection
- string projection- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
selectSetProjection
protected AbstractRequest selectSetProjection(com.fasterxml.jackson.databind.JsonNode projectionContent) throws InvalidParseOperationException - Parameters:
projectionContent
- json projection- Returns:
- this Query
- Throws:
InvalidParseOperationException
- when query is invalid
-
getFinal
protected abstract com.fasterxml.jackson.databind.node.ObjectNode getFinal()Get the json final of request- Returns:
- the Final json containing all 2 parts: query and filter
-
selectGetFinalSelect
protected final com.fasterxml.jackson.databind.node.ObjectNode selectGetFinalSelect()- Returns:
- the Final Select containing all 3 parts: query, filter and projection
-
selectGetAllProjection
protected boolean selectGetAllProjection()- Returns:
- True if the projection is not restricted
-
selectGetProjection
protected com.fasterxml.jackson.databind.node.ObjectNode selectGetProjection()- Returns:
- the projection
-