public interface SimpleJdbcInsertOperations
SimpleJdbcInsert
.
This interface is not often used directly, but provides the option to enhance testability,
as it can easily be mocked or stubbed.Modifier and Type | Method and Description |
---|---|
int |
execute(Map<String,?> args)
Execute the insert using the values passed in.
|
int |
execute(SqlParameterSource parameterSource)
Execute the insert using the values passed in.
|
Number |
executeAndReturnKey(Map<String,?> args)
Execute the insert using the values passed in and return the generated key.
|
Number |
executeAndReturnKey(SqlParameterSource parameterSource)
Execute the insert using the values passed in and return the generated key.
|
KeyHolder |
executeAndReturnKeyHolder(Map<String,?> args)
Execute the insert using the values passed in and return the generated keys.
|
KeyHolder |
executeAndReturnKeyHolder(SqlParameterSource parameterSource)
Execute the insert using the values passed in and return the generated keys.
|
int[] |
executeBatch(Map<String,?>... batch)
Execute a batch insert using the batch of values passed in.
|
int[] |
executeBatch(SqlParameterSource... batch)
Execute a batch insert using the batch of values passed in.
|
SimpleJdbcInsertOperations |
includeSynonymsForTableColumnMetaData()
Include synonyms for the column meta data lookups via JDBC.
|
SimpleJdbcInsertOperations |
useNativeJdbcExtractorForMetaData(NativeJdbcExtractor nativeJdbcExtractor)
Use a the provided NativeJdbcExtractor during the column meta data
lookups via JDBC.
|
SimpleJdbcInsertOperations |
usingColumns(String... columnNames)
Specify the column names that the insert statement should be limited to use.
|
SimpleJdbcInsertOperations |
usingGeneratedKeyColumns(String... columnNames)
Specify the names of any columns that have auto generated keys.
|
SimpleJdbcInsertOperations |
withCatalogName(String catalogName)
Specify the catalog name, if any, to be used for the insert.
|
SimpleJdbcInsertOperations |
withoutTableColumnMetaDataAccess()
Turn off any processing of column meta data information obtained via JDBC.
|
SimpleJdbcInsertOperations |
withSchemaName(String schemaName)
Specify the schema name, if any, to be used for the insert.
|
SimpleJdbcInsertOperations |
withTableName(String tableName)
Specify the table name to be used for the insert.
|
SimpleJdbcInsertOperations withTableName(String tableName)
tableName
- the name of the stored tableSimpleJdbcInsertOperations withSchemaName(String schemaName)
schemaName
- the name of the schemaSimpleJdbcInsertOperations withCatalogName(String catalogName)
catalogName
- the name of the catalogSimpleJdbcInsertOperations usingColumns(String... columnNames)
columnNames
- one or more column namesSimpleJdbcInsertOperations usingGeneratedKeyColumns(String... columnNames)
columnNames
- one or more column namesSimpleJdbcInsertOperations withoutTableColumnMetaDataAccess()
SimpleJdbcInsertOperations includeSynonymsForTableColumnMetaData()
SimpleJdbcInsertOperations useNativeJdbcExtractorForMetaData(NativeJdbcExtractor nativeJdbcExtractor)
int execute(Map<String,?> args)
args
- Map containing column names and corresponding valueint execute(SqlParameterSource parameterSource)
parameterSource
- SqlParameterSource containing values to use for insertNumber executeAndReturnKey(Map<String,?> args)
This requires that the name of the columns with auto generated keys have been specified. This method will always return a KeyHolder but the caller must verify that it actually contains the generated keys.
args
- Map containing column names and corresponding valueNumber executeAndReturnKey(SqlParameterSource parameterSource)
This requires that the name of the columns with auto generated keys have been specified. This method will always return a KeyHolder but the caller must verify that it actually contains the generated keys.
parameterSource
- SqlParameterSource containing values to use for insertKeyHolder executeAndReturnKeyHolder(Map<String,?> args)
This requires that the name of the columns with auto generated keys have been specified. This method will always return a KeyHolder but the caller must verify that it actually contains the generated keys.
args
- Map containing column names and corresponding valueKeyHolder executeAndReturnKeyHolder(SqlParameterSource parameterSource)
This requires that the name of the columns with auto generated keys have been specified. This method will always return a KeyHolder but the caller must verify that it actually contains the generated keys.
parameterSource
- SqlParameterSource containing values to use for insertint[] executeBatch(Map<String,?>... batch)
batch
- an array of Maps containing a batch of column names and corresponding valueint[] executeBatch(SqlParameterSource... batch)
batch
- an array of SqlParameterSource containing values for the batch