Пример #1
0
 /**
  * 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;
 }
Пример #2
0
 /**
  * Delete the project from the database.
  *
  * @return true if can delete
  */
 public boolean delete() {
   dao.remove(project);
   notifyObservers();
   return true;
 }