Interface DocQueryContext
-
public interface DocQueryContext
Context for writing a doc store query.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
endBool()
End a bool expression/group.void
endBoolGroup()
End the Bool group.void
endBoolGroupList()
End a Must, Must Not or Should list.void
endNested()
End nested path expressions.void
endNot()
End a not wrapper.ExpressionPath
getExpressionPath(String propName)
Return the expression path for the given property path.void
startBool(Junction.Type type)
Start a junction.void
startBoolGroup()
Start a Bool which may contain some of Must, Must Not, Should.void
startBoolGroupList(Junction.Type type)
Start a Must, Must Not or Should list.void
startBoolMust()
Start a conjunction.void
startBoolMustNot()
Start a boolean NOT.void
startNested(String nestedPath)
Start nested path expressions.void
startNot()
Start a not wrapping an expression.void
writeAllEquals(Map<String,Object> propMap)
Write an all equals expression.void
writeEqualTo(String propertyName, Object value)
Write a equalTo expression.void
writeExists(boolean notNull, String propertyName)
Write an exists expression.void
writeId(Object value)
Write an Id equals expression.void
writeIds(Collection<?> idCollection)
Write an Id in expression.void
writeIEqualTo(String propName, String value)
Write a case insensitive equalTo expression.void
writeIn(String propertyName, Object[] values, boolean not)
Write an In expression.default void
writeINotEqualTo(String propName, String value)
Write a case insensitive notEqualTo expression.void
writeLike(String propName, String val, LikeType type, boolean caseInsensitive)
Write a Like expression.void
writeMatch(String propName, String search, Match options)
Write a Match expression.void
writeMultiMatch(String search, MultiMatch options)
Write a Multi-match expression.void
writeRange(String propertyName, Op lowOp, Object valueLow, Op highOp, Object valueHigh)
Write a range operation with a lower and upper values.void
writeRange(String propertyName, String rangeType, Object value)
Write a range operation with one value.void
writeRaw(String raw, Object[] values)
Write a raw expression with bind values (might not be supported).void
writeSimple(Op type, String propertyName, Object value)
Write one of the base expressions.void
writeTextCommonTerms(String search, TextCommonTerms options)
Write a common terms expression.void
writeTextQueryString(String search, TextQueryString options)
Write a query string expression.void
writeTextSimple(String search, TextSimple options)
Write a simple expression.
-
-
-
Method Detail
-
startBool
void startBool(Junction.Type type) throws IOException
Start a junction.- Throws:
IOException
-
startBoolMust
void startBoolMust() throws IOException
Start a conjunction.- Throws:
IOException
-
startBoolMustNot
void startBoolMustNot() throws IOException
Start a boolean NOT.- Throws:
IOException
-
endBool
void endBool() throws IOException
End a bool expression/group.- Throws:
IOException
-
writeEqualTo
void writeEqualTo(String propertyName, Object value) throws IOException
Write a equalTo expression.- Throws:
IOException
-
writeIEqualTo
void writeIEqualTo(String propName, String value) throws IOException
Write a case insensitive equalTo expression.- Throws:
IOException
-
writeINotEqualTo
default void writeINotEqualTo(String propName, String value) throws IOException
Write a case insensitive notEqualTo expression.- Throws:
IOException
-
writeRange
void writeRange(String propertyName, String rangeType, Object value) throws IOException
Write a range operation with one value.- Throws:
IOException
-
writeRange
void writeRange(String propertyName, Op lowOp, Object valueLow, Op highOp, Object valueHigh) throws IOException
Write a range operation with a lower and upper values.- Throws:
IOException
-
writeIn
void writeIn(String propertyName, Object[] values, boolean not) throws IOException
Write an In expression.- Throws:
IOException
-
writeIds
void writeIds(Collection<?> idCollection) throws IOException
Write an Id in expression.- Throws:
IOException
-
writeId
void writeId(Object value) throws IOException
Write an Id equals expression.- Throws:
IOException
-
writeRaw
void writeRaw(String raw, Object[] values) throws IOException
Write a raw expression with bind values (might not be supported).- Throws:
IOException
-
writeExists
void writeExists(boolean notNull, String propertyName) throws IOException
Write an exists expression.- Throws:
IOException
-
writeSimple
void writeSimple(Op type, String propertyName, Object value) throws IOException
Write one of the base expressions.- Throws:
IOException
-
writeAllEquals
void writeAllEquals(Map<String,Object> propMap) throws IOException
Write an all equals expression.- Throws:
IOException
-
writeLike
void writeLike(String propName, String val, LikeType type, boolean caseInsensitive) throws IOException
Write a Like expression.- Throws:
IOException
-
writeMatch
void writeMatch(String propName, String search, Match options) throws IOException
Write a Match expression.- Throws:
IOException
-
writeMultiMatch
void writeMultiMatch(String search, MultiMatch options) throws IOException
Write a Multi-match expression.- Throws:
IOException
-
writeTextSimple
void writeTextSimple(String search, TextSimple options) throws IOException
Write a simple expression.- Throws:
IOException
-
writeTextCommonTerms
void writeTextCommonTerms(String search, TextCommonTerms options) throws IOException
Write a common terms expression.- Throws:
IOException
-
writeTextQueryString
void writeTextQueryString(String search, TextQueryString options) throws IOException
Write a query string expression.- Throws:
IOException
-
startBoolGroup
void startBoolGroup() throws IOException
Start a Bool which may contain some of Must, Must Not, Should.- Throws:
IOException
-
startBoolGroupList
void startBoolGroupList(Junction.Type type) throws IOException
Start a Must, Must Not or Should list.- Throws:
IOException
-
endBoolGroupList
void endBoolGroupList() throws IOException
End a Must, Must Not or Should list.- Throws:
IOException
-
endBoolGroup
void endBoolGroup() throws IOException
End the Bool group.- Throws:
IOException
-
getExpressionPath
ExpressionPath getExpressionPath(String propName)
Return the expression path for the given property path.
-
startNested
void startNested(String nestedPath) throws IOException
Start nested path expressions.- Throws:
IOException
-
endNested
void endNested() throws IOException
End nested path expressions.- Throws:
IOException
-
startNot
void startNot() throws IOException
Start a not wrapping an expression.- Throws:
IOException
-
endNot
void endNot() throws IOException
End a not wrapper.- Throws:
IOException
-
-