Enum CriteriaType
- All Implemented Interfaces:
Serializable
,Comparable<CriteriaType>
,java.lang.constant.Constable
Enum of criteria type
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAfterAllAndArray containsBeforeBetweenContainEnds withFalseGreater thanGreater than or equalInIs equalIs not nullIs nullLess thanLess than or equalNotNot inOrStarts withString equalsTrue -
Method Summary
Modifier and TypeMethodDescriptionTo get sql keywordstatic boolean
isBinary
(CriteriaType type) Check if CriteriaType operation is binary, with format of (A ops A -> B).static boolean
isClosed
(CriteriaType type) Check if CriteriaType operation is closure, with format of (A ops A -> A).static boolean
isFunction
(CriteriaType type) Check if CriteriaType operation is a function.static boolean
Check if CriteriaType operation is a function.static boolean
isPartTypeSupported
(org.springframework.data.repository.query.parser.Part.Type partType) Check if PartType is supported.static boolean
isPartTypeUnSupported
(org.springframework.data.repository.query.parser.Part.Type partType) Check if PartType is NOT supported.static boolean
isUnary
(CriteriaType type) Check if CriteriaType operation is unary, with format of (ops A -> B).static CriteriaType
toCriteriaType
(org.springframework.data.repository.query.parser.Part.Type partType) Convert to criteria type.static CriteriaType
Returns the enum constant of this type with the specified name.static CriteriaType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ALL
All -
IS_EQUAL
Is equal -
OR
Or -
AND
And -
NOT
Not -
BEFORE
Before -
AFTER
After -
IN
In -
NOT_IN
Not in -
IS_NULL
Is null -
IS_NOT_NULL
Is not null -
LESS_THAN
Less than -
LESS_THAN_EQUAL
Less than or equal -
GREATER_THAN
Greater than -
GREATER_THAN_EQUAL
Greater than or equal -
CONTAINING
Contain -
ENDS_WITH
Ends with -
STARTS_WITH
Starts with -
TRUE
True -
FALSE
False -
BETWEEN
Between -
ARRAY_CONTAINS
Array contains -
STRING_EQUALS
String equals
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getSqlKeyword
To get sql keyword- Returns:
- String
-
isPartTypeUnSupported
public static boolean isPartTypeUnSupported(@NonNull org.springframework.data.repository.query.parser.Part.Type partType) Check if PartType is NOT supported.- Parameters:
partType
- PartType to be checked.- Returns:
- True if unsupported, or false.
-
isPartTypeSupported
public static boolean isPartTypeSupported(@NonNull org.springframework.data.repository.query.parser.Part.Type partType) Check if PartType is supported.- Parameters:
partType
- PartType to be checked.- Returns:
- True if supported, or false.
-
toCriteriaType
public static CriteriaType toCriteriaType(@NonNull org.springframework.data.repository.query.parser.Part.Type partType) Convert to criteria type.- Parameters:
partType
- PartType to be converted.- Returns:
- CriteriaType
- Throws:
UnsupportedOperationException
- for unsupported part type
-
isClosed
Check if CriteriaType operation is closure, with format of (A ops A -> A). Example: AND, OR.- Parameters:
type
- CriteriaType operation- Returns:
- True if match, or false.
-
isBinary
Check if CriteriaType operation is binary, with format of (A ops A -> B). Example: IS_EQUAL, AFTER.- Parameters:
type
- CriteriaType operation- Returns:
- True if match, or false.
-
isFunction
Check if CriteriaType operation is a function.- Parameters:
type
- CriteriaType- Returns:
- True if match, or false.
-
isFunctionWithCaseSensitiveSupport
Check if CriteriaType operation is a function.- Parameters:
type
- CriteriaType- Returns:
- True if match, or false.
-
isUnary
Check if CriteriaType operation is unary, with format of (ops A -> B).- Parameters:
type
- CriteriaType- Returns:
- True if match, or false.
-