Class QueryNode
- java.lang.Object
-
- com.redis.lettucemod.search.querybuilder.QueryNode
-
- All Implemented Interfaces:
Node
- Direct Known Subclasses:
IntersectNode,UnionNode
public abstract class QueryNode extends java.lang.Object implements Node
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.redis.lettucemod.search.querybuilder.Node
Node.ParenMode
-
-
Constructor Summary
Constructors Constructor Description QueryNode()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description QueryNodeadd(Node... nodes)Add children nodes to this node.QueryNodeadd(java.lang.String field, Value... values)Add a match criteria to this nodeQueryNodeadd(java.lang.String field, java.lang.String... values)Convenience method to add a list of string valuesQueryNodeadd(java.lang.String field, java.util.Collection<Value> values)Add a list of values from a collectionprotected abstract java.lang.StringgetJoinString()protected booleanshouldUseParens(Node.ParenMode mode)java.lang.StringtoString()Returns the string form of this node.java.lang.StringtoString(Node.ParenMode parenMode)Returns the string form of this node.
-
-
-
Method Detail
-
getJoinString
protected abstract java.lang.String getJoinString()
-
add
public QueryNode add(java.lang.String field, Value... values)
Add a match criteria to this node- Parameters:
field- The field to check. If null or empty, then any field is checkedvalues- Values to check for.- Returns:
- The current node, for chaining.
-
add
public QueryNode add(java.lang.String field, java.lang.String... values)
Convenience method to add a list of string values- Parameters:
field- Field to check forvalues- One or more string values.- Returns:
- The current node, for chaining.
-
add
public QueryNode add(java.lang.String field, java.util.Collection<Value> values)
Add a list of values from a collection- Parameters:
field- The field to checkvalues- Collection of values to match- Returns:
- The current node for chaining.
-
add
public QueryNode add(Node... nodes)
Add children nodes to this node.- Parameters:
nodes- Children nodes to add- Returns:
- The current node, for chaining.
-
shouldUseParens
protected boolean shouldUseParens(Node.ParenMode mode)
-
toString
public java.lang.String toString(Node.ParenMode parenMode)
Description copied from interface:NodeReturns the string form of this node.
-
-