T
- the generic type of the comparison type
.S
- the generic type of the second comparison argument
- typically same as
first (<T>).public abstract class SqlOperator<T,S> extends Object
SqlOperator
represents the SQL function that compares two given values in expressions (e.g. in where
clauses).Modifier and Type | Class and Description |
---|---|
static class |
SqlOperator.SqlOperatorBetween<N extends Number>
Abstract base implementation of
SqlOperator for comparison of Number with Range using SQL
BETWEEN operation. |
static class |
SqlOperator.SqlOperatorContainment
Abstract base implementation of
SqlOperator for String comparison operations. |
static class |
SqlOperator.SqlOperatorEmptyness
|
static class |
SqlOperator.SqlOperatorLike
Abstract base implementation of
SqlOperator for SQL like match operation on String . |
static class |
SqlOperator.SqlOperatorNumber
Abstract base implementation of
SqlOperator for Number comparison operations. |
static class |
SqlOperator.SqlOperatorString
Abstract base implementation of
SqlOperator for String comparison operations. |
Modifier and Type | Field and Description |
---|---|
static SqlOperator<Number,Range<Number>> |
BETWEEN
SqlOperator to check if objects match using SQL BETWEEN operation. |
static SqlOperator<Collection,Void> |
EMPTY
SqlOperator to check if objects match using SQL EMPTY operation. |
static SqlOperator<Object,Object> |
EQUAL
SqlOperator to check if objects are equal . |
static SqlOperator<Number,Number> |
GREATER_OR_EQUAL
SqlOperator to check if some value is greater or equal to another. |
static SqlOperator<Number,Number> |
GREATER_THAN
SqlOperator to check if some value is greater than another. |
static SqlOperator<Object,Collection<?>> |
IN
SqlOperator to check if objects match using SQL IN operation. |
static SqlOperator<Number,Number> |
LESS_OR_EQUAL
SqlOperator to check if some value is less or equal than another. |
static SqlOperator<Number,Number> |
LESS_THAN
SqlOperator to check if some value is less than another. |
static SqlOperator<String,String> |
LIKE
SqlOperator to check if objects match using SQL like pattern. |
static SqlOperator<Number,Range<Number>> |
NOT_BETWEEN
SqlOperator to check if objects do NOT match using SQL BETWEEN operation. |
static SqlOperator<Collection,Void> |
NOT_EMPTY
SqlOperator to check if objects do NOT match using SQL EMPTY operation. |
static SqlOperator<Object,Object> |
NOT_EQUAL
SqlOperator to check if objects are NOT equal . |
static SqlOperator<Object,Collection<?>> |
NOT_IN
SqlOperator to check if objects do NOT match using SQL IN operation. |
static SqlOperator<String,String> |
NOT_LIKE
SqlOperator to check if objects match using SQL like pattern. |
private String |
sql |
private Class<T> |
type |
Modifier | Constructor and Description |
---|---|
protected |
SqlOperator(String sql,
Class<T> type)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
evaluate(T arg1,
S arg2)
This method evaluates this
SqlOperator for the given arguments. |
String |
getSql()
This method gets the SQL operator representation of this
SqlOperator . |
Class<T> |
getType() |
abstract SqlOperator<T,S> |
negate() |
String |
toString() |
public static final SqlOperator<Number,Number> GREATER_THAN
SqlOperator
to check if some value is greater than another.public static final SqlOperator<Number,Number> GREATER_OR_EQUAL
SqlOperator
to check if some value is greater or equal to another.public static final SqlOperator<Number,Number> LESS_THAN
SqlOperator
to check if some value is less than another.public static final SqlOperator<Number,Number> LESS_OR_EQUAL
SqlOperator
to check if some value is less or equal than another.public static final SqlOperator<Object,Object> EQUAL
SqlOperator
to check if objects are equal
.public static final SqlOperator<Object,Object> NOT_EQUAL
SqlOperator
to check if objects are NOT equal
.public static final SqlOperator<String,String> LIKE
SqlOperator
to check if objects match using SQL like pattern.public static final SqlOperator<String,String> NOT_LIKE
SqlOperator
to check if objects match using SQL like pattern.public static final SqlOperator<Number,Range<Number>> BETWEEN
SqlOperator
to check if objects match using SQL BETWEEN operation.public static final SqlOperator<Number,Range<Number>> NOT_BETWEEN
SqlOperator
to check if objects do NOT match using SQL BETWEEN operation.public static final SqlOperator<Collection,Void> EMPTY
SqlOperator
to check if objects match using SQL EMPTY operation.public static final SqlOperator<Collection,Void> NOT_EMPTY
SqlOperator
to check if objects do NOT match using SQL EMPTY operation.public static final SqlOperator<Object,Collection<?>> IN
SqlOperator
to check if objects match using SQL IN operation.public static final SqlOperator<Object,Collection<?>> NOT_IN
SqlOperator
to check if objects do NOT match using SQL IN operation.private final String sql
public String getSql()
SqlOperator
. E.g. "==", ">", ">=", etc.public Class<T> getType()
SqlOperator
can be applied
to.public abstract boolean evaluate(T arg1, S arg2)
SqlOperator
for the given arguments.arg1
- is the first argument.arg2
- is the second argument.SqlOperator
applied to the given arguments.public abstract SqlOperator<T,S> negate()
CompareOperator
that evaluates
to the
negated result.Copyright © 2001–2016 mmm-Team. All rights reserved.