public long addCompletedBatch(RequestBatch requestBatch){
  long completedBatchId=insertBatchAsCompleted(requestBatch);
  for (  Request request : requestBatch.getRequests()) {
    request.setBatchId(completedBatchId);
    File file=new File(request.getDestinationPath());
    long length=file.exists() ? file.length() : 0;
    insertRequestAsCompletedDownload(request.getDestinationPath(),length,request);
  }
  return completedBatchId;
}

public long addCompletedBatch ( RequestBatch requestBatch ) { long completedBatchId = insertBatchAsCompleted ( requestBatch ) ; for ( Request request : requestBatch . getRequests ( ) ) { request . setBatchId ( completedBatchId ) ; File file = new File ( request . getDestinationPath ( ) ) ; long length = file . exists ( ) ? file . length ( ) : 0 ; insertRequestAsCompletedDownload ( request . getDestinationPath ( ) , length , request ) ; } return completedBatchId ; }
adds this batch to the downloads system .
