Class Query
- java.lang.Object
-
- fr.gouv.vitam.common.database.builder.query.Query
-
- Direct Known Subclasses:
BooleanQuery
,CompareQuery
,ExistsQuery
,InQuery
,MatchQuery
,MltQuery
,NestedQuery
,NopQuery
,PathQuery
,QueryDepthHelper
,RangeQuery
,SearchQuery
,TermQuery
,WildcardQuery
public class Query extends java.lang.Object
Query component
-
-
Field Summary
Fields Modifier and Type Field Description protected com.fasterxml.jackson.databind.JsonNode
currentObject
protected com.fasterxml.jackson.databind.node.ObjectNode
currentQuery
protected BuilderToken.QUERY
currentTokenQUERY
static java.lang.String
DATE
DATE itemprotected int
exactdepth
protected int
extraInfo
protected boolean
isFullText
protected boolean
ready
protected int
relativedepth
-
Constructor Summary
Constructors Modifier Constructor Description protected
Query()
Empty constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clean()
Clean the objectprotected void
cleanDepth()
Removing exact depth and depthprotected void
createQueryArray(BuilderToken.QUERY query)
protected void
createQueryVariable(BuilderToken.QUERY query, java.lang.String variableName)
protected void
createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, boolean value)
protected void
createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, double value)
protected void
createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, long value)
protected void
createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, com.fasterxml.jackson.databind.JsonNode value)
protected void
createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, java.lang.String value)
protected void
createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, java.util.Date value)
com.fasterxml.jackson.databind.JsonNode
getCurrentObject()
com.fasterxml.jackson.databind.node.ObjectNode
getCurrentQuery()
int
getExtraInfo()
com.fasterxml.jackson.databind.JsonNode
getNode(java.lang.String key)
int
getParserExactdepth()
int
getParserRelativeDepth()
BuilderToken.QUERY
getQUERY()
boolean
isFullText()
boolean
isReady()
Query
setDepthLimit(int relativedepth)
Relative Depth, similar tosetRelativeDepthLimit(int)
Query
setExactDepthLimit(int exactdepth)
Query
setExtraInfo(int val)
Query
setFullText(boolean isFullText)
Query
setParserExactdepth(int exactdepth)
Query
setParserRelativeDepth(int relativedepth)
protected Query
setReady(boolean ready)
Query
setRelativeDepthLimit(int relativedepth)
java.lang.String
toString()
-
-
-
Field Detail
-
DATE
public static final java.lang.String DATE
DATE item- See Also:
- Constant Field Values
-
currentQuery
protected com.fasterxml.jackson.databind.node.ObjectNode currentQuery
-
currentObject
protected com.fasterxml.jackson.databind.JsonNode currentObject
-
currentTokenQUERY
protected BuilderToken.QUERY currentTokenQUERY
-
isFullText
protected boolean isFullText
-
ready
protected boolean ready
-
relativedepth
protected int relativedepth
-
exactdepth
protected int exactdepth
-
extraInfo
protected int extraInfo
-
-
Method Detail
-
createQueryArray
protected final void createQueryArray(BuilderToken.QUERY query)
-
createQueryVariable
protected final void createQueryVariable(BuilderToken.QUERY query, java.lang.String variableName) throws InvalidCreateOperationException
- Throws:
InvalidCreateOperationException
-
createQueryVariableValue
protected final void createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, long value) throws InvalidCreateOperationException
- Throws:
InvalidCreateOperationException
-
createQueryVariableValue
protected final void createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, double value) throws InvalidCreateOperationException
- Throws:
InvalidCreateOperationException
-
createQueryVariableValue
protected final void createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, java.lang.String value) throws InvalidCreateOperationException
- Throws:
InvalidCreateOperationException
-
createQueryVariableValue
protected final void createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, java.util.Date value) throws InvalidCreateOperationException
- Throws:
InvalidCreateOperationException
-
createQueryVariableValue
protected final void createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, boolean value) throws InvalidCreateOperationException
- Throws:
InvalidCreateOperationException
-
createQueryVariableValue
protected final void createQueryVariableValue(BuilderToken.QUERY query, java.lang.String variableName, com.fasterxml.jackson.databind.JsonNode value) throws InvalidCreateOperationException
- Throws:
InvalidCreateOperationException
-
clean
public void clean()
Clean the object
-
cleanDepth
protected void cleanDepth()
Removing exact depth and depth
-
setExactDepthLimit
public final Query setExactDepthLimit(int exactdepth)
- Parameters:
exactdepth
- 0 to ignore- Returns:
- the single request ready to be added to global Query (remove previous exact depth and depth if any)
-
setRelativeDepthLimit
public final Query setRelativeDepthLimit(int relativedepth)
- Parameters:
relativedepth
- query's depth- Returns:
- the single request ready to be added to global Query (remove previous exact depth and depth if any)
-
setDepthLimit
public final Query setDepthLimit(int relativedepth)
Relative Depth, similar tosetRelativeDepthLimit(int)
- Parameters:
relativedepth
- query's depth- Returns:
- the single request ready to be added to global Query (remove previous exact depth and depth if any)
-
getCurrentQuery
public com.fasterxml.jackson.databind.node.ObjectNode getCurrentQuery()
- Returns:
- the currentQuery
-
getNode
public com.fasterxml.jackson.databind.JsonNode getNode(java.lang.String key)
- Parameters:
key
- of node- Returns:
- the root node named key
-
getCurrentObject
public com.fasterxml.jackson.databind.JsonNode getCurrentObject()
- Returns:
- the currentObject (internal use only during parse)
-
getQUERY
public BuilderToken.QUERY getQUERY()
- Returns:
- the current QUERY
-
isReady
public boolean isReady()
- Returns:
- the ready
-
setReady
protected Query setReady(boolean ready)
- Parameters:
ready
- the ready to set- Returns:
- this QUERY
-
setExtraInfo
public Query setExtraInfo(int val)
- Parameters:
val
- extra value- Returns:
- this Query
-
getExtraInfo
public int getExtraInfo()
- Returns:
- the extra info
-
isFullText
public final boolean isFullText()
- Returns:
- the isFullText
-
setFullText
public final Query setFullText(boolean isFullText)
- Parameters:
isFullText
- the isFullText to set- Returns:
- this
-
getParserExactdepth
public final int getParserExactdepth()
- Returns:
- the exact depth
-
setParserExactdepth
public final Query setParserExactdepth(int exactdepth)
- Parameters:
exactdepth
- the exact depth to set- Returns:
- this
-
getParserRelativeDepth
public final int getParserRelativeDepth()
- Returns:
- the relative depth
-
setParserRelativeDepth
public final Query setParserRelativeDepth(int relativedepth)
- Parameters:
relativedepth
- the relative depth to set- Returns:
- this
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-