Exemplo n.º 1
0
 /**
  * deleting the task from the Database
  *
  * @task : the task that will get deleted
  *
  * return true if and only if the delete operation was done successfully
  **/
 public override bool delete(String id)
 {
     //Logging
     Logging.paramenterLogging(nameof(delete), false
                               , new Pair(nameof(id), id));
     //Deleting task from database
     try {
         driver.executeQuery(parser.getDelete(tableName, idColumn, id));
         return(true);
     } catch (Exception e) {
         Logging.logInfo(true, e.Message);
     }
     //Logging
     Logging.paramenterLogging(nameof(delete), true
                               , new Pair(nameof(id), id));
     //TaskNote not found in the database
     throw new DatabaseException(DatabaseConstants.NOT_FOUND(id));
 }