Interface ParameterTypeConverter<S,T>
- Type Parameters:
S
- Source TypeT
- Target Type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Since Spring does not have the concept of type handlers, it is a best practice to only use Java data types that have a clear correlation to SQL data types (for example Java String correlates automatically with VARCHAR). Using a parameter type converter will allow you to use data types in your model classes that would otherwise be difficult to use with Spring.
A parameter type converter is associated with a SqlColumn.
This interface is based on Spring's general Converter interface and is intentionally compatible with it. Existing converters may be reused if they are marked with this additional interface.
The converter is only used for parameters in a parameter map. It is not used for result set processing. It is also not used for insert statements that are based on an external row class. The converter will be called in the following circumstances:
- Parameters in a general insert statement (for the Value and ValueWhenPresent mappings)
- Parameters in an update statement (for the Value and ValueWhenPresent mappings)
- Parameters in a where clause in any statement (for conditions that accept a value or multiple values)
- Since:
- 1.1.5
- Author:
- Jeff Butler
- See Also:
-
Method Summary
-
Method Details
-
convert
-