public class DefaultOperators
You can use any operator directly like DefaultOperators.Equals or you can get
all of them using DefaultOperators.getDefaultOperatorMap()
method.
Modifier and Type | Field and Description |
---|---|
static OperatorBase |
And
All subcriteria (criterion.criteria) are true.
|
static OperatorBase |
Between
Shortcut for greaterThan + lessThan + and.
|
static OperatorBase |
BetweenInclusive
Shortcut for greaterOrEqual + lessOrEqual + and.
|
static OperatorBase |
Contains
Contains as sub-string (match case).
|
static OperatorBase |
ContainsField
Contains as sub-string (match case) another field value (specify fieldName as criterion.value).
|
static OperatorBase |
EndsWith
Ends with (match case).
|
static OperatorBase |
EndsWithField
Ends with (match case) another field value (specify fieldName as criterion.value).
|
static OperatorBase |
Equals
Exactly equal to.
|
static OperatorBase |
EqualsField
Matches another field (specify fieldName as criterion.value).
|
static OperatorBase |
GreaterOrEqual
Greater than or equal to.
|
static OperatorBase |
GreaterOrEqualField
Greater than or equal to another field (specify fieldName as criterion.value).
|
static OperatorBase |
GreaterThan
Greater than.
|
static OperatorBase |
GreaterThanField
Greater than another field (specify fieldName as criterion.value).
|
static OperatorBase |
IBetween
Shortcut for greaterThan + lessThan + and (case insensitive)
|
static OperatorBase |
IBetweenInclusive
Shortcut for greaterOrEqual + lessOrEqual + and (case insensitive)
|
static OperatorBase |
IContains
Contains as sub-string (case insensitive).
|
static OperatorBase |
IEndsWith
Ends with (case insensitive).
|
static OperatorBase |
IEquals
exactly equal to, if case is disregarded.
|
static OperatorBase |
INotContains
Does not contain as sub-string (case insensitive).
|
static OperatorBase |
INotEndsWith
Does not end with (case insensitive).
|
static OperatorBase |
INotEqual
Not equal to, if case is disregarded.
|
static OperatorBase |
INotStartsWith
Does not start with (case insensitive).
|
static OperatorBase |
InSet
Value is in a set of values.
|
static OperatorBase |
Iregexp
Regular expression match (case insensitive).
|
static OperatorBase |
IsNull
Value is null.
|
static OperatorBase |
IStartsWith
Starts with (case insensitive).
|
static OperatorBase |
LessOrEqual
Less than or equal to.
|
static OperatorBase |
LessOrEqualField
Less than or equal to another field (specify fieldName as criterion.value).
|
static OperatorBase |
LessThan
Less than.
|
static OperatorBase |
LessThanField
Less than another field (specify fieldName as criterion.value).
|
static OperatorBase |
Not
All subcriteria (criterion.criteria) are false.
|
static OperatorBase |
NotContains
Does not contain as sub-string (match case).
|
static OperatorBase |
NotEndsWith
Does not end with (match case).
|
static OperatorBase |
NotEqual
Not equal to.
|
static OperatorBase |
NotEqualField
Does not match another field (specify fieldName as criterion.value).
|
static OperatorBase |
NotInSet
Value is not in a set of values.
|
static OperatorBase |
NotNull
Value is non-null.
|
static OperatorBase |
NotStartsWith
Does not start with (match case).
|
static OperatorBase |
Or
At least one subcriteria (criterion.criteria) is true.
|
static OperatorBase |
Regexp
Regular expression match.
|
static OperatorBase |
StartsWith
Starts with (match case).
|
static OperatorBase |
StartsWithField
Starts with (match case) another field value (specify fieldName as criterion.value)
|
Modifier and Type | Method and Description |
---|---|
static java.util.Map |
getDefaultOperatorMap()
Retrieving the Map containing all default operators.
|
static boolean |
isEqual(java.lang.Object value,
java.lang.Object operand)
Compare two objects in a style suitable for Advanced Criteria operators.
|
static boolean |
isEqualToConfiguredValue(java.lang.Object value,
java.lang.String operand)
Returns true if argument "value" (presumed to come from a DataSource) is equal to the
value represented by argument "operand" (a String, presumed to come from a .ds.xml
file).
|
static boolean |
rangeCheck(java.lang.Object value,
java.lang.Object lower,
java.lang.Object upper,
boolean inclusive,
boolean caseInsensitive)
Evaluates: "lower (< <=) value (< <=) upper", where lower, value, and upper
are presumed to be objects of (nearly) the same type.
|
static boolean |
rangeCheckToConfiguredValues(java.lang.Object value,
java.lang.String lower,
java.lang.String upper,
boolean inclusive,
boolean caseInsensitive)
Evaluates: "lower (< <=) value (< <=) upper", where value is an object
(presumably from a record), and lower and upper are Strings, presumably parsed
from a .ds.xml file, which are converted to the type of value prior to comparison.
|
public static OperatorBase Equals
public static OperatorBase NotEqual
public static OperatorBase IEquals
public static OperatorBase INotEqual
public static OperatorBase GreaterThan
public static OperatorBase LessThan
public static OperatorBase GreaterOrEqual
public static OperatorBase LessOrEqual
public static OperatorBase Between
public static OperatorBase IBetween
public static OperatorBase BetweenInclusive
public static OperatorBase IBetweenInclusive
public static OperatorBase IContains
public static OperatorBase IStartsWith
public static OperatorBase IEndsWith
public static OperatorBase Contains
public static OperatorBase StartsWith
public static OperatorBase EndsWith
public static OperatorBase INotContains
public static OperatorBase INotStartsWith
public static OperatorBase INotEndsWith
public static OperatorBase NotContains
public static OperatorBase NotStartsWith
public static OperatorBase NotEndsWith
public static OperatorBase IsNull
public static OperatorBase NotNull
public static OperatorBase Regexp
public static OperatorBase Iregexp
public static OperatorBase InSet
public static OperatorBase NotInSet
public static OperatorBase EqualsField
public static OperatorBase NotEqualField
public static OperatorBase And
public static OperatorBase Not
public static OperatorBase Or
public static OperatorBase GreaterThanField
public static OperatorBase LessThanField
public static OperatorBase GreaterOrEqualField
public static OperatorBase LessOrEqualField
public static OperatorBase ContainsField
public static OperatorBase StartsWithField
public static OperatorBase EndsWithField
public static boolean isEqualToConfiguredValue(java.lang.Object value, java.lang.String operand) throws java.lang.Exception
This is meant to be a wrapper class around isEqual(), handling the most common cases of type conversion and data conditioning.
java.lang.Exception
public static boolean isEqual(java.lang.Object value, java.lang.Object operand) throws java.lang.Exception
java.lang.Exception
public static boolean rangeCheckToConfiguredValues(java.lang.Object value, java.lang.String lower, java.lang.String upper, boolean inclusive, boolean caseInsensitive) throws java.lang.Exception
java.lang.Exception
public static boolean rangeCheck(java.lang.Object value, java.lang.Object lower, java.lang.Object upper, boolean inclusive, boolean caseInsensitive) throws java.lang.Exception
java.lang.Exception
public static java.util.Map getDefaultOperatorMap()