public class BooleanQuery extends AbstractFieldQuery
Query
testing a boolean field.Query.LogicalOperator, Query.Operator
Modifier and Type | Field and Description |
---|---|
protected Query.Operator |
_operator
The operator.
|
protected Boolean |
_value
The boolean value to test.
|
_fieldPath
Constructor and Description |
---|
BooleanQuery(String fieldPath)
Build a BooleanQuery testing the existence of the field.
|
BooleanQuery(String fieldPath,
Boolean value)
Build a BooleanQuery.
|
BooleanQuery(String fieldPath,
Query.Operator op,
Boolean value)
Build a BooleanQuery.
|
Modifier and Type | Method and Description |
---|---|
String |
build()
Build the solr query string representing the Query object.
|
boolean |
equals(Object obj) |
Query.Operator |
getOperator()
Get the operator.
|
boolean |
getValue()
Get the value.
|
int |
hashCode() |
getFieldPath
protected Query.Operator _operator
public BooleanQuery(String fieldPath)
fieldPath
- the field's pathpublic BooleanQuery(String fieldPath, Boolean value)
fieldPath
- the field's pathvalue
- the value.public BooleanQuery(String fieldPath, Query.Operator op, Boolean value)
fieldPath
- the field's pathop
- the operator.value
- the value.public Query.Operator getOperator()
public boolean getValue()
public String build() throws QuerySyntaxException
Query
QuerySyntaxException
- if the query can't be built because of a syntax error.public int hashCode()
hashCode
in class AbstractFieldQuery
public boolean equals(Object obj)
equals
in class AbstractFieldQuery