Enum CriteriaType
- java.lang.Object
-
- java.lang.Enum<CriteriaType>
-
- com.azure.spring.data.cosmos.core.query.CriteriaType
-
- All Implemented Interfaces:
Serializable,Comparable<CriteriaType>
public enum CriteriaType extends Enum<CriteriaType>
Enum of criteria type
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AFTERAfterALLAllANDAndARRAY_CONTAINSArray containsBEFOREBeforeBETWEENBetweenCONTAININGContainENDS_WITHEnds withFALSEFalseGREATER_THANGreater thanGREATER_THAN_EQUALGreater than or equalINInIS_EQUALIs equalIS_NOT_NULLIs not nullIS_NULLIs nullLESS_THANLess thanLESS_THAN_EQUALLess than or equalNOTNotNOT_INNot inOROrSTARTS_WITHStarts withTRUETrue
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetSqlKeyword()To get sql keywordstatic booleanisBinary(CriteriaType type)Check if CriteriaType operation is binary, with format of (A ops A -> B).static booleanisClosed(CriteriaType type)Check if CriteriaType operation is closure, with format of (A ops A -> A).static booleanisFunction(CriteriaType type)Check if CriteriaType operation is a function.static booleanisPartTypeSupported(org.springframework.data.repository.query.parser.Part.Type partType)Check if PartType is supported.static booleanisPartTypeUnSupported(org.springframework.data.repository.query.parser.Part.Type partType)Check if PartType is NOT supported.static booleanisUnary(CriteriaType type)Check if CriteriaType operation is unary, with format of (ops A -> B).static CriteriaTypetoCriteriaType(org.springframework.data.repository.query.parser.Part.Type partType)Convert to criteria type.static CriteriaTypevalueOf(String name)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 Detail
-
ALL
public static final CriteriaType ALL
All
-
IS_EQUAL
public static final CriteriaType IS_EQUAL
Is equal
-
OR
public static final CriteriaType OR
Or
-
AND
public static final CriteriaType AND
And
-
NOT
public static final CriteriaType NOT
Not
-
BEFORE
public static final CriteriaType BEFORE
Before
-
AFTER
public static final CriteriaType AFTER
After
-
IN
public static final CriteriaType IN
In
-
NOT_IN
public static final CriteriaType NOT_IN
Not in
-
IS_NULL
public static final CriteriaType IS_NULL
Is null
-
IS_NOT_NULL
public static final CriteriaType IS_NOT_NULL
Is not null
-
LESS_THAN
public static final CriteriaType LESS_THAN
Less than
-
LESS_THAN_EQUAL
public static final CriteriaType LESS_THAN_EQUAL
Less than or equal
-
GREATER_THAN
public static final CriteriaType GREATER_THAN
Greater than
-
GREATER_THAN_EQUAL
public static final CriteriaType GREATER_THAN_EQUAL
Greater than or equal
-
CONTAINING
public static final CriteriaType CONTAINING
Contain
-
ENDS_WITH
public static final CriteriaType ENDS_WITH
Ends with
-
STARTS_WITH
public static final CriteriaType STARTS_WITH
Starts with
-
TRUE
public static final CriteriaType TRUE
True
-
FALSE
public static final CriteriaType FALSE
False
-
BETWEEN
public static final CriteriaType BETWEEN
Between
-
ARRAY_CONTAINS
public static final CriteriaType ARRAY_CONTAINS
Array contains
-
-
Method Detail
-
values
public static CriteriaType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CriteriaType c : CriteriaType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CriteriaType valueOf(String name)
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
public String 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
public static boolean isClosed(CriteriaType type)
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
public static boolean isBinary(CriteriaType type)
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
public static boolean isFunction(CriteriaType type)
Check if CriteriaType operation is a function.- Parameters:
type- CriteriaType- Returns:
- True if match, or false.
-
isUnary
public static boolean isUnary(CriteriaType type)
Check if CriteriaType operation is unary, with format of (ops A -> B).- Parameters:
type- CriteriaType- Returns:
- True if match, or false.
-
-