spring-framework / org.springframework.jdbc.support / GeneratedKeyHolder

GeneratedKeyHolder

open class GeneratedKeyHolder : KeyHolder

Default implementation of the KeyHolder interface, to be used for holding auto-generated keys (as potentially returned by JDBC insert statements).

Create an instance of this class for each insert operation, and pass it to the corresponding org.springframework.jdbc.core.JdbcTemplate or {org.springframework.jdbc.object.SqlUpdate} methods.

Author
Thomas Risberg

Author
Juergen Hoeller

Since
1.1

Constructors

<init>

GeneratedKeyHolder()

Create a new GeneratedKeyHolder with a default list.

GeneratedKeyHolder(keyList: MutableList<MutableMap<String, Any>>)

Create a new GeneratedKeyHolder with a given list.

Functions

getKey

open fun getKey(): Number

getKeyList

open fun getKeyList(): MutableList<MutableMap<String, Any>>

getKeys

open fun getKeys(): MutableMap<String, Any>