private void batchImport ( ) { m_jdbcTemplate . batchUpdate ( createInsertQuery ( ) , new BatchPreparedStatementSetter ( ) { public void setValues ( PreparedStatement ps , int i ) throws SQLException { int j = 1 ; for ( String property : m_propertyNames ) { Map params = ( Map ) m_batch . get ( i ) ; ps . setObject ( j ++ , params . get ( property ) ) ; } } public int getBatchSize ( ) { return m_batch . size ( ) ; } } ) ; }
Perform batch import into database .