public enum OPERATOR extends Enum<OPERATOR>
getUserInput() } has a value.Param.Builder| Enum Constant and Description |
|---|
AND
Not an operator, here to support " AND " syntax in user values
|
BETWEEN |
EQ |
GE |
GT |
IN |
ISBLANK |
ISEMPTY
for empty collection!
|
ISNOTBLANK |
ISNOTEMPTY
for empty collection!
|
ISNOTNULL |
ISNULL |
LE |
LIKE |
LT |
MEMBEROF |
NE |
OR
Not an operator, here to support " OR " syntax in user values
|
| Modifier and Type | Field and Description |
|---|---|
static char |
NEGATION |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
eq(String value)
check if a string (user value) indicates a greater/smaller than or equal
comparison
|
static OPERATOR |
fromToken(String token) |
static OPERATOR |
fromUserInput(String input) |
String |
getToken() |
String |
getUserInput()
When null the OPERATOR cannot be determined from user input
|
static boolean |
greater(String value)
check if a string (user value) indicates a greater than comparison
|
static boolean |
isAnd(String value)
true when " AND " is found in the given string and it comes before an optional " OR " and there are at least two terms
|
static boolean |
isBetween(String value) |
boolean |
isOperatorInUserInput(String input)
Is this operator in user input
|
static boolean |
isOr(String value)
true when " OR " is found in the given string and it comes before an optional " AND " and there are at least two terms
|
static boolean |
negation(String value)
check if a string (user value) indicates a negation
|
static OPERATOR |
operator(String operator,
String value,
boolean syntaxInValue)
Returns an operator from the value when syntaxInValue is true and the
value contains one of the supported operators, otherwise the operator is
determined from the operator argument
|
static boolean |
operatorInUserInput(String input)
Does user input contain an operator
|
static boolean |
smaller(String value)
check if a string (user value) indicates a smaller than comparison.
|
static String |
stripSyntax(String value) |
String |
toString()
returns the token wrapped in spaces, so string concatenation in query
building can be used.
|
static boolean |
valueIsOperator(String s,
boolean syntaxInValue)
users may input "(!)is null", "(!)is empty", "(!)is blank", in that case
there is no parameter value to be set for a key.
|
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 EQ
public static final OPERATOR GT
public static final OPERATOR LT
public static final OPERATOR GE
public static final OPERATOR LE
public static final OPERATOR IN
public static final OPERATOR LIKE
public static final OPERATOR NE
public static final OPERATOR MEMBEROF
public static final OPERATOR BETWEEN
public static final OPERATOR ISNULL
public static final OPERATOR ISNOTNULL
public static final OPERATOR ISBLANK
public static final OPERATOR ISNOTBLANK
public static final OPERATOR ISEMPTY
public static final OPERATOR ISNOTEMPTY
public static final OPERATOR AND
public static final OPERATOR OR
public static final char NEGATION
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 static boolean negation(String value)
value - NEGATIONpublic static boolean eq(String value)
public static boolean greater(String value)
value - GTpublic static boolean smaller(String value)
value - LTpublic static boolean valueIsOperator(String s, boolean syntaxInValue)
s - syntaxInValue - public static boolean isBetween(String value)
public static boolean isAnd(String value)
value - public static boolean isOr(String value)
value - public static OPERATOR operator(String operator, String value, boolean syntaxInValue)
operator - value - syntaxInValue - public String toString()
public String getToken()
public String getUserInput()
public boolean isOperatorInUserInput(String input)
input - public static boolean operatorInUserInput(String input)
input - isOperatorInUserInput(String)Copyright © 2018–2021 Fryske Akademy. All rights reserved.