org.springframework.jdbc.core.ParameterDisposer, org.springframework.jdbc.core.PreparedStatementCreator, org.springframework.jdbc.core.PreparedStatementSetter, org.springframework.jdbc.core.SqlProviderstatic 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.PreparedStatementCreatorSQLExceptionpublic void setValues(PreparedStatement ps) throws SQLException
setValues in interface org.springframework.jdbc.core.PreparedStatementSetterSQLExceptionprivate static void validateValue(Object value)
private static void setValue(oracle.jdbc.OraclePreparedStatement oracleStatement,
String parameterName,
Object value,
int sqlType)
throws SQLException
SQLExceptionprivate 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
SQLExceptionpublic String getSql()
getSql in interface org.springframework.jdbc.core.SqlProviderpublic void cleanupParameters()
cleanupParameters in interface org.springframework.jdbc.core.ParameterDisposerCopyright © 2018. All rights reserved.