@ Override public synchronized void addBatch ( final String name , final EntityEntry entry ) throws DatabaseEngineException { try { final MappedEntity me = entities . get ( name ) ; if ( me == null ) { throw new DatabaseEngineException ( String . format ( "Unknown entity '%s'" , name ) ) ; } PreparedStatement ps = me . getInsert ( ) ; entityToPreparedStatement ( me . getEntity ( ) , ps , entry , true ) ; ps . addBatch ( ) ; } catch ( final Exception ex ) { throw new DatabaseEngineException ( "Error adding to batch" , ex ) ; } }
Add an entry to the batch .