- All Implemented Interfaces:
Serializable,Comparable<SqlOperation>,Constable
The SQL mode provides context for the SqlTemplate processor, enabling validation and inference by the
SQL template logic. Each mode indicates the type of SQL operation being performed, which allows the framework to
adapt behavior accordingly.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic SqlOperationReturns the enum constant of this class with the specified name.static SqlOperation[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SELECT
Represents a SELECT operation.This mode is used for queries that retrieve data from the database without modifying its state. The SQL template processor uses this mode to validate that the query conforms to the structure of a SELECT statement.
-
INSERT
Represents an INSERT operation.This mode is used for queries that add new records to the database. The SQL template processor validates that parameters align with the fields being inserted.
-
UPDATE
Represents an UPDATE operation.This mode is used for queries that modify existing records in the database. The SQL template processor ensures that the query includes a WHERE clause (if required) to avoid unintentional updates across all rows.
-
DELETE
Represents a DELETE operation.This mode is used for queries that remove records from the database. The SQL template processor validates the presence of a WHERE clause (if required) to prevent unintended deletion of all rows.
-
UNDEFINED
Represents an undefined operation.This mode is used when the type of SQL operation cannot be determined. The SQL template processor may apply relaxed validation or inference rules when this mode is specified.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-