/** * Save the project to the database. * * @return true if successfully save, otherwise false */ public boolean save() { if (project.getName().isEmpty()) { error = "Project name must not be empty!"; return false; } dao.save(project); notifyObservers(); return true; }
/** * Delete the project from the database. * * @return true if can delete */ public boolean delete() { dao.remove(project); notifyObservers(); return true; }