public BatchResult deleteBatch ( TableDefinition tableDef , DBObjectBatch batch ) { checkServiceState ( ) ; List < String > objIDs = new ArrayList <> ( ) ; for ( DBObject dbObj : batch . getObjects ( ) ) { Utils . require ( ! Utils . isEmpty ( dbObj . getObjectID ( ) ) , "All objects must have _ID defined" ) ; objIDs . add ( dbObj . getObjectID ( ) ) ; } BatchObjectUpdater batchUpdater = new BatchObjectUpdater ( tableDef ) ; return batchUpdater . deleteBatch ( objIDs ) ; }
Delete a batch of objects from the given table . All objects must have an ID assigned . Deleting an already - deleted object is a no - op .