Class JdbcUtil
java.lang.Object
org.springframework.data.jdbc.support.JdbcUtil
Contains methods dealing with the quirks of JDBC, independent of any Entity, Aggregate or Repository abstraction.
- Author:
- Jens Schauder, Thomas Lang
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SQLTypejdbcTypeFor(int sqlType) Deprecated.This is now a noopstatic SQLTypejdbcTypeFor(Class<?> type) Deprecated.UsetargetSqlTypeFor(Class)instead.static intsqlTypeFor(Class<?> type) Deprecated.usetargetSqlTypeFor(Class)instead.static intsqlTypeFor(SQLType jdbcType) Deprecated.there is no replacement.static SQLTypetargetSqlTypeFor(Class<?> type) Returns theSQLTypevalue suitable for passing a value of the provided type to JDBC driver.
-
Field Details
-
TYPE_UNKNOWN
-
-
Method Details
-
sqlTypeFor
Deprecated.usetargetSqlTypeFor(Class)instead.Returns theTypesvalue suitable for passing a value of the provided type to aPreparedStatement.- Parameters:
type- The type of value to be bound to aPreparedStatement.- Returns:
- One of the values defined in
TypesorJdbcUtils.TYPE_UNKNOWN.
-
targetSqlTypeFor
Returns theSQLTypevalue suitable for passing a value of the provided type to JDBC driver.- Parameters:
type- The type of value to be bound to aPreparedStatement.- Returns:
- a matching
SQLTypeorTYPE_UNKNOWN.
-
sqlTypeFor
Deprecated.there is no replacement.- Parameters:
jdbcType- value to be converted. May be null.- Returns:
- One of the values defined in
TypesorJdbcUtils.TYPE_UNKNOWN.
-
jdbcTypeFor
Deprecated.This is now a noopConverts a value defined inTypesinto aJDBCTypeinstance or null if the value isJdbcUtils.TYPE_UNKNOWN- Parameters:
sqlType- One of the values defined inTypesorJdbcUtils.TYPE_UNKNOWN.- Returns:
- a matching
JDBCTypeinstance or null.
-
jdbcTypeFor
Deprecated.UsetargetSqlTypeFor(Class)instead.Returns theJDBCTypesuitable for passing a value of the provided type to aPreparedStatement.- Parameters:
type- The type of value to be bound to aPreparedStatement.- Returns:
- a matching
JDBCTypeinstance or null.
-