edvin
02/09/2018, 8:24 PMonCommit
handler in PersonModel
. It reads the data from the viewmodel after commit and creates a new Person object, which is then inserted into the item property of the viewmodel.edvin
02/09/2018, 8:24 PMchrbongardt
02/09/2018, 8:25 PMchrbongardt
02/09/2018, 8:25 PMedvin
02/09/2018, 9:07 PMedvin
02/09/2018, 9:08 PMlistVendors
function shows how to borrow a connection from the pool and return it once done with a query.edvin
02/09/2018, 9:08 PMVendor
edvin
02/09/2018, 9:09 PMtoModel
is called once for each entry in the ResultSet. Vendor then has a constructor that extracts the fields from the ResultSet:edvin
02/09/2018, 9:09 PMedvin
02/09/2018, 9:09 PMedvin
02/09/2018, 9:10 PMtoModel
function is generic enough that we could even include it in the framework.edvin
02/09/2018, 9:13 PMedvin
02/09/2018, 9:15 PMedvin
02/09/2018, 9:38 PMedvin
02/09/2018, 9:39 PMprepareStatement
and didn't just do exec
instead is that IDEA will help you with the SQL inside of a prepareStatement
function call, so if you make your own extension function on that you loose that ability.edvin
02/09/2018, 9:40 PMexec("DELETE FROM vendor WHERE id = ?") { setInt(1, vendor.id) }
, but then IDEA won't auto complete and verify the SQL.edvin
02/09/2018, 9:40 PMedvin
02/09/2018, 9:53 PMedvin
02/09/2018, 9:54 PMcarlw
02/09/2018, 9:57 PMedvin
02/09/2018, 9:58 PMedvin
02/09/2018, 10:02 PMedvin
02/09/2018, 11:34 PMedvin
02/09/2018, 11:34 PMedvin
02/09/2018, 11:36 PMedvin
02/10/2018, 10:34 AM