public enum Operator extends Enum<Operator>
Enum Constant and Description |
---|
AND |
BETWEEN |
EQ |
GT |
GTEQ |
IN |
LIKE |
LIKE_IN |
LT |
LTEQ |
NEQ |
NOT |
NOTIN |
NOTLIKE |
NOTLIKE_IN |
OR |
RLIKE |
Modifier and Type | Field and Description |
---|---|
private boolean |
expressionOperator |
private boolean |
isListOperator |
private String |
sqlSymbol |
private String |
symbol |
private int |
value |
private static Map<Integer,Operator> |
valueMapping |
Modifier and Type | Method and Description |
---|---|
static Operator |
fromValue(int value)
Get the
Operator object when you know the integer code. |
abstract Restriction |
getRestriction(Expression lvalue,
Expression rvalue) |
abstract Restriction |
getRestriction(Expression lvalue,
Expression[] rvalues) |
String |
getSqlSymbol()
Get the SQL symbol for this operator.
|
String |
getSymbol()
Get the symbol for this operator, useful for display in client applications.
|
int |
getValue()
Get the integer value that is used when storing an operator in the database.
|
boolean |
isExpressionOperator() |
boolean |
isListOperator()
Gets if the operator should be used with a list or not.
|
String |
toString() |
static Operator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Operator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Operator AND
public static final Operator OR
public static final Operator NOT
public static final Operator EQ
public static final Operator NEQ
public static final Operator LT
public static final Operator LTEQ
public static final Operator GT
public static final Operator GTEQ
public static final Operator LIKE
public static final Operator NOTLIKE
public static final Operator IN
public static final Operator NOTIN
public static final Operator LIKE_IN
public static final Operator NOTLIKE_IN
public static final Operator RLIKE
public static final Operator BETWEEN
private final int value
private final String symbol
private final String sqlSymbol
private final boolean expressionOperator
private final boolean isListOperator
public static Operator[] values()
for (Operator c : Operator.values()) System.out.println(c);
public static Operator valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic int getValue()
public String getSymbol()
public String getSqlSymbol()
public boolean isExpressionOperator()
public abstract Restriction getRestriction(Expression lvalue, Expression rvalue) throws InvalidDataException
InvalidDataException
public abstract Restriction getRestriction(Expression lvalue, Expression[] rvalues) throws InvalidDataException
InvalidDataException
public static Operator fromValue(int value)
Operator
object when you know the integer code.value
- The integer codepublic boolean isListOperator()