public class ComparisonPredicate extends QueryParameterPredicate
A predicate which compares a query parameter (i.e. left operand) with an expected value (i.e. right operand) based on a specific operator.
Constructor and Description |
---|
ComparisonPredicate(ComparisonOperator operator,
QueryParameter queryParameter,
Object value)
Constructs a new comparison predicate instance.
|
Modifier and Type | Method and Description |
---|---|
ComparisonPredicate |
deriveWithQueryParameter(QueryParameter queryParameter)
Derives a new predicate with the given query parameter from this predicate.
|
ComparisonOperator |
getOperator()
Returns the operator of this predicate.
|
QueryParameter |
getQueryParameter()
Returns the query parameter (i.e. left operand) of this predicate.
|
Object |
getValue()
Returns the value (i.e. right operand) of this predicate.
|
String |
toString() |
and, apply, not, or
public ComparisonPredicate(ComparisonOperator operator, QueryParameter queryParameter, Object value)
Constructs a new comparison predicate instance.
operator
- the operator to be used for the comparisonqueryParameter
- the left operandvalue
- the right operandpublic ComparisonOperator getOperator()
Returns the operator of this predicate.
public QueryParameter getQueryParameter()
Returns the query parameter (i.e. left operand) of this predicate.
getQueryParameter
in class QueryParameterPredicate
public Object getValue()
Returns the value (i.e. right operand) of this predicate.
public ComparisonPredicate deriveWithQueryParameter(QueryParameter queryParameter)
Derives a new predicate with the given query parameter from this predicate.
deriveWithQueryParameter
in class QueryParameterPredicate
queryParameter
- the new query parameterCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.