This is an automated email from the ASF dual-hosted git repository. danhaywood pushed a commit to branch v2 in repository https://gitbox.apache.org/repos/asf/causeway-app-petclinic.git
commit a39e6c5d1724e71901c9daa8e298e852d33d2984 Author: Dan Haywood <[email protected]> AuthorDate: Sun May 26 13:48:44 2024 +0100 updates addPet, to set the species of each --- .../main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java b/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java index bf4f670..8ac0b63 100644 --- a/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java +++ b/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java @@ -68,6 +68,7 @@ import lombok.val; import domainapp.modules.petowner.PetOwnerModule; import domainapp.modules.petowner.dom.pet.Pet; +import domainapp.modules.petowner.dom.pet.PetSpecies; import domainapp.modules.petowner.types.Name; import domainapp.modules.petowner.types.Notes; import domainapp.modules.petowner.types.PetName; @@ -164,9 +165,10 @@ public class PetOwner implements Comparable<PetOwner>, CalendarEventable { @Action @ActionLayout(associateWith = "pets", sequence = "1") - public PetOwner addPet(@PetName final String name) { + public PetOwner addPet(@PetName final String name, final PetSpecies species) { final var pet = new Pet(); pet.setName(name); + pet.setSpecies(species); pet.setPetOwner(this); pets.add(pet); return this;
