query For Object
fun <T : Any> queryForObject(connection: Connection, sql: String, parametersDto: Any?, resultType: Class<T>): T?
Execute a prepared statement and get the first row as an object. The statement is closed after this method returns.
Return
an object get from the first row of the ResultSet of this statement, or null of there is no row.
Parameters
connection
a Jdbc Connection
sql
a sql string with named parameters
parameters Dto
a data object to set the parameters, or null if the statement doesn't have any parameters
result Type
type of the returned result.