code: private boolean isRelated(Task task, List<Relation> list)
     {
        boolean result = false;
        for (Relation relation : list)
        {
           if (relation.getTargetTask().getUniqueID().intValue() == task.getUniqueID().intValue())
           {
              result = true;
              break;
           }
        }
        return result;
     }
docs: Internal method used to test for the existence of a relationship
  with a task.
  
  @param task target task
  @param list list of relationships
  @return boolean flag