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
-
Method Summary
Modifier and TypeMethodDescriptionstatic SQLType
jdbcTypeFor
(int sqlType) Deprecated.This is now a noopstatic SQLType
jdbcTypeFor
(Class<?> type) Deprecated.UsetargetSqlTypeFor(Class)
instead.static int
sqlTypeFor
(Class<?> type) Deprecated.usetargetSqlTypeFor(Class)
instead.static int
sqlTypeFor
(SQLType jdbcType) Deprecated.there is no replacement.static SQLType
targetSqlTypeFor
(Class<?> type) Returns theSQLType
value suitable for passing a value of the provided type to JDBC driver.
-
Field Details
-
TYPE_UNKNOWN
-
-
Method Details
-
sqlTypeFor
Deprecated.usetargetSqlTypeFor(Class)
instead.Returns theTypes
value 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
Types
orJdbcUtils.TYPE_UNKNOWN
.
-
targetSqlTypeFor
Returns theSQLType
value 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
SQLType
orTYPE_UNKNOWN
.
-
sqlTypeFor
Deprecated.there is no replacement.- Parameters:
jdbcType
- value to be converted. May be null.- Returns:
- One of the values defined in
Types
orJdbcUtils.TYPE_UNKNOWN
.
-
jdbcTypeFor
Deprecated.This is now a noopConverts a value defined inTypes
into aJDBCType
instance or null if the value isJdbcUtils.TYPE_UNKNOWN
- Parameters:
sqlType
- One of the values defined inTypes
orJdbcUtils.TYPE_UNKNOWN
.- Returns:
- a matching
JDBCType
instance or null.
-
jdbcTypeFor
Deprecated.UsetargetSqlTypeFor(Class)
instead.Returns theJDBCType
suitable for passing a value of the provided type to aPreparedStatement
.- Parameters:
type
- The type of value to be bound to aPreparedStatement
.- Returns:
- a matching
JDBCType
instance or null.
-