You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2021/10/03 21:28:56 UTC
[isis-app-demo] 03/05: adds choices for removeAct to restrict names
to those owned
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/isis-app-demo.git
commit f98b8d048c3c368b6fd1bafcbcaf9e8aee40214f
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Oct 3 22:23:13 2021 +0100
adds choices for removeAct to restrict names to those owned
---
.../petclinic/modules/pets/dom/petowner/PetOwner_removePet.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner_removePet.java b/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner_removePet.java
index b68918d..045f14c 100644
--- a/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner_removePet.java
+++ b/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner_removePet.java
@@ -32,6 +32,12 @@ public class PetOwner_removePet {
.ifPresent(pet -> repositoryService.remove(pet));
return petOwner;
}
+ public List<String> choices0Act() {
+ return petRepository.findByPetOwner(petOwner)
+ .stream()
+ .map(Pet::getName)
+ .collect(Collectors.toList());
+ }
@Inject PetRepository petRepository;
@Inject RepositoryService repositoryService;