public class Criterion
extends java.lang.Object
The Criterion
represents a single query criterion in a connector query.
This query object is passed to the connector by OTPC connector framework as the result of a search action on the OTPC client. Connector writer can use this Query Object to configure and implement the query against the backend repository and return the query result for the OTPC client.
Modifier and Type | Field and Description |
---|---|
static Criterion |
EMPTY_CRITERION |
static java.lang.String |
OPERATOR_EQUAL |
static java.lang.String |
OPERATOR_GREATTHAN |
static java.lang.String |
OPERATOR_GREATTHANOREQUAL |
static java.lang.String |
OPERATOR_LESSTHANOREQUAL |
static java.lang.String |
OPERATOR_LESSTTHAN |
static java.lang.String |
OPERATOR_LIKE |
static java.lang.String |
OPERATOR_NOTEQUAL |
static java.lang.String |
QUERY_NULL_VALUE |
Constructor and Description |
---|
Criterion() |
Criterion(java.lang.String attribute, Operator operator, java.lang.Object value)
Constructs a criterion with specified work item field name, operator, and value.
|
Criterion(java.lang.String attribute, java.lang.String description, Operator operator, java.lang.Object value)
Constructs a criterion with specified work item field name, description, operator, and value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttribute()
Retrieves the work item field name from the criterion object.
|
java.lang.String |
getDescription()
Retrieves the description of the criterion.
|
Operator |
getOperator()
Retrieves the operator object for the criterion.
|
java.lang.Object |
getValue()
Retrieves the criterion value object.
|
boolean |
isRequired()
Deprecated.
Use
required attribute on WorkItemFieldDef instead. |
void |
setAttribute(java.lang.String attribute)
Sets a new work item field name for the criterion.
|
void |
setDescription(java.lang.String description)
Sets the description of the criterion.
|
void |
setOperator(Operator operator)
Sets the operator object for the criterion.
|
void |
setRequired(boolean required)
Deprecated.
Use
required attribute on WorkItemFieldDef instead. |
void |
setValue(java.lang.Object value)
Sets criterion value object.
|
public static final Criterion EMPTY_CRITERION
public static final java.lang.String OPERATOR_EQUAL
public static final java.lang.String OPERATOR_NOTEQUAL
public static final java.lang.String OPERATOR_LIKE
public static final java.lang.String OPERATOR_GREATTHAN
public static final java.lang.String OPERATOR_LESSTTHAN
public static final java.lang.String OPERATOR_GREATTHANOREQUAL
public static final java.lang.String OPERATOR_LESSTHANOREQUAL
public static final java.lang.String QUERY_NULL_VALUE
public Criterion()
public Criterion(java.lang.String attribute, Operator operator, java.lang.Object value)
attribute
- name of a work item fieldoperator
- operator objectvalue
- value objectpublic Criterion(java.lang.String attribute, java.lang.String description, Operator operator, java.lang.Object value)
attribute
- name of a work item fielddescription
- description of the criterionoperator
- operator objectvalue
- value objectpublic java.lang.String getAttribute()
public void setAttribute(java.lang.String attribute)
attribute
is null, then the criterion's field name is unchanged.attribute
- field of a work itempublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
is null, then the criterion's description is unchanged.description
- of the criterionpublic Operator getOperator()
public void setOperator(Operator operator)
operator
- operator objectpublic java.lang.Object getValue()
public void setValue(java.lang.Object value)
value
- the value objectpublic boolean isRequired()
required
attribute on WorkItemFieldDef instead.public void setRequired(boolean required)
required
attribute on WorkItemFieldDef instead.required
-