public class BooleanQueryCriteria extends QueryCriteria
A Boolean Query Citeria that allows combination of a number of terms into a query with a boolean operator (AND, OR, NOT). The NOT operator can only be applied to one term.
Modifier and Type | Field and Description |
---|---|
static int |
AND
Constants
|
static int |
NOT |
static int |
OR |
Constructor and Description |
---|
BooleanQueryCriteria()
Default constructor.
|
BooleanQueryCriteria(List<QueryCriteria> terms,
int op)
Boolean query constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addTerm(QueryCriteria t)
Method to add a term to the boolean query.
|
String |
getElementName()
Method is not used in this class...
|
int |
getOperator()
Accessor method for the boolean operator.
|
List<QueryCriteria> |
getTerms()
Accessor method for the list of terms in the query.
|
void |
setElementName(String elementName)
Method is not used in this class...
|
void |
setOperator(int op)
Mutator method for the boolean operator.
|
String |
toString()
Method to convert the query to a string.
|
public static final int AND
public static final int OR
public static final int NOT
public BooleanQueryCriteria()
public BooleanQueryCriteria(List<QueryCriteria> terms, int op) throws QueryFormulationException
terms
- The criteria onto which to apply the boolean operatorop
- The boolean operator to be appliedQueryFormulationException
public void addTerm(QueryCriteria t) throws QueryFormulationException
t
- Term to be added to the queryQueryFormulationException
public List<QueryCriteria> getTerms()
public void setOperator(int op) throws QueryFormulationException
op
- Boolean operatorQueryFormulationException
public int getOperator()
public String getElementName()
getElementName
in class QueryCriteria
public void setElementName(String elementName)
setElementName
in class QueryCriteria
public String toString()
toString
in class QueryCriteria
Copyright © 1999–2017 Apache OODT. All rights reserved.