private void updateTasks(List<Task> tasks,Predicate<Task> filter,Task.Status status,ControlRequest request){
  Collection<Task> filteredTasks=Collections2.filter(tasks,filter);
  for (  Task task : filteredTasks) {
    log.info("Found task {} with status {}",task.getId(),task.getStatus());
    task.setStatus(status.toString());
    if (NullColumnValueGetter.isNotNullValue(request.getLockGroup())) {
      Calendar cal=Calendar.getInstance();
      cal.setTimeInMillis(request.getTimestamp());
      task.setQueuedStartTime(cal);
      task.setQueueName(request.getLockGroup());
    }
 else {
      task.setQueueName(NullColumnValueGetter.getNullStr());
      task.setQueuedStartTime(null);
    }
  }
  dbClient.persistObject(tasks);
}

private void updateTasks ( List < Task > tasks , Predicate < Task > filter , Task . Status status , ControlRequest request ) { Collection < Task > filteredTasks = Collections2 . filter ( tasks , filter ) ; for ( Task task : filteredTasks ) { log . info ( "Found task {} with status {}" , task . getId ( ) , task . getStatus ( ) ) ; task . setStatus ( status . toString ( ) ) ; if ( NullColumnValueGetter . isNotNullValue ( request . getLockGroup ( ) ) ) { Calendar cal = Calendar . getInstance ( ) ; cal . setTimeInMillis ( request . getTimestamp ( ) ) ; task . setQueuedStartTime ( cal ) ; task . setQueueName ( request . getLockGroup ( ) ) ; } else { task . setQueueName ( NullColumnValueGetter . getNullStr ( ) ) ; task . setQueuedStartTime ( null ) ; } } dbClient . persistObject ( tasks ) ; }
updates tasks of a given status with queueing information .
