org.springframework.jdbc.core.ParameterDisposer
, org.springframework.jdbc.core.PreparedStatementCreator
, org.springframework.jdbc.core.PreparedStatementSetter
, org.springframework.jdbc.core.SqlProvider
static final class OracleNamedParameterJdbcTemplate.NamedPreparedStatementCreator extends Object implements org.springframework.jdbc.core.PreparedStatementCreator, org.springframework.jdbc.core.PreparedStatementSetter, org.springframework.jdbc.core.SqlProvider, org.springframework.jdbc.core.ParameterDisposer
Modifier and Type | Field | Description |
---|---|---|
private String[] |
generatedKeysColumnNames |
|
private org.springframework.jdbc.core.namedparam.SqlParameterSource |
parameterSource |
|
private boolean |
returnGeneratedKeys |
|
private String |
sql |
Constructor | Description |
---|---|
NamedPreparedStatementCreator(String sql,
org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource) |
|
NamedPreparedStatementCreator(String sql,
org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource,
boolean returnGeneratedKeys,
String[] generatedKeysColumnNames) |
Modifier and Type | Method | Description |
---|---|---|
void |
cleanupParameters() |
|
private static Object |
convertToBindable(Object object) |
OJDBC does not support binding common Java types most notably
Date this method converts some of the to
bindable types. |
private static Object |
convertToSqlTemporal(Date date) |
|
private static Object |
copyDate(Date date) |
|
PreparedStatement |
createPreparedStatement(Connection connection) |
|
String |
getSql() |
|
private static void |
setNull(oracle.jdbc.OraclePreparedStatement oracleStatement,
String parameterName,
int sqlType,
String typeName) |
|
private static void |
setValue(oracle.jdbc.OraclePreparedStatement oracleStatement,
String parameterName,
Object value,
int sqlType) |
|
void |
setValues(PreparedStatement ps) |
|
private static void |
validateValue(Object value) |
private final String sql
private final org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource
private final boolean returnGeneratedKeys
@Nullable private final String[] generatedKeysColumnNames
NamedPreparedStatementCreator(String sql, org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource)
public PreparedStatement createPreparedStatement(Connection connection) throws SQLException
createPreparedStatement
in interface org.springframework.jdbc.core.PreparedStatementCreator
SQLException
public void setValues(PreparedStatement ps) throws SQLException
setValues
in interface org.springframework.jdbc.core.PreparedStatementSetter
SQLException
private static void validateValue(Object value)
private static void setValue(oracle.jdbc.OraclePreparedStatement oracleStatement, String parameterName, Object value, int sqlType) throws SQLException
SQLException
private static Object convertToBindable(Object object)
Date
this method converts some of the to
bindable types.object
- the object to bind with may need conversionStatementCreatorUtils.setValue(PreparedStatement, int, int, String, Integer, Object)
private static Object convertToSqlTemporal(Date date)
date
- the date to convert, not nullStatementCreatorUtils.isDateValue(Class)
private static void setNull(oracle.jdbc.OraclePreparedStatement oracleStatement, String parameterName, int sqlType, String typeName) throws SQLException
SQLException
public String getSql()
getSql
in interface org.springframework.jdbc.core.SqlProvider
public void cleanupParameters()
cleanupParameters
in interface org.springframework.jdbc.core.ParameterDisposer
Copyright © 2018. All rights reserved.