public String saveEditedPet() {
   PetType petType = petTypeDao.findById(this.petTypeId);
   this.pet.setType(petType);
   petDao.update(this.pet);
   long ownerId = this.owner.getId();
   this.owner = this.ownerDao.findById(ownerId);
   return "showOwner.jsf";
 }
 public String addNewPet() {
   PetType petType = petTypeDao.findById(this.petTypeId);
   this.pet.setType(petType);
   this.owner.addPet(this.pet);
   petDao.addNew(this.pet);
   ownerDao.update(this.owner);
   return "showOwner.jsf";
 }
 public String saveVisit() {
   visitDao.addNew(this.visit);
   this.visit.setPet(this.pet);
   this.pet.addVisit(this.visit);
   petDao.update(this.pet);
   long ownerId = this.owner.getId();
   this.owner = this.ownerDao.findById(ownerId);
   return "showOwner.jsf";
 }
 public String addVisitToPetForm(long petId) {
   this.pet = petDao.findById(petId);
   this.petTypeId = this.pet.getType().getId();
   this.visit = new Visit();
   return "addVisitToPet.jsf";
 }
 public String editPetForm(long petId) {
   this.pet = petDao.findById(petId);
   this.petTypeId = this.pet.getType().getId();
   return "editPet.jsf";
 }