class TaskStore {

    public boolean delete(final int id) {
        boolean result = false;
        try {
            this.tx(
                    session -> {
                        session.delete(new Task(id));
                        return null;
                    }
            );
            result = true;
        } catch (Exception e) {
            LOG.error(e.getMessage(), e);
        }
        return result;
    }

}