question: public < T extends DataObject > void insertInBatches ( List < T > records , int partitionSize , DbClient dbClient , String type ) { List < List < T > > volume_partitions = Lists . partition ( records , partitionSize ) ; for ( List < T > partition : volume_partitions ) { try { dbClient . createObject ( partition ) ; _log . info ( "{} {} Records inserted to DB" , partition . size ( ) , type ) ; } catch ( DatabaseException e ) { _log . error ( "Error inserting {} records into the database:" , type , e ) ; } } }
target:  insert Discovered Objects in batches