You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2024/09/16 15:55:18 UTC

(causeway-app-petclinic) tag demo-2a created (now 2fbdb17)

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a change to tag demo-2a
in repository https://gitbox.apache.org/repos/asf/causeway-app-petclinic.git


      at 2fbdb17  (commit)
This tag includes the following new commits:

     new 2fbdb17  hides 'visits' collection if the pet owner doesn't have any pets

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(causeway-app-petclinic) 01/01: hides 'visits' collection if the pet owner doesn't have any pets

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to tag demo-2a
in repository https://gitbox.apache.org/repos/asf/causeway-app-petclinic.git

commit 2fbdb1793728b98bfab2e0c7fac9939639c29bcc
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jun 27 17:09:08 2024 +0100

    hides 'visits' collection if the pet owner doesn't have any pets
---
 .../java/domainapp/modules/visit/contributions/PetOwner_visits.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/module-visit/src/main/java/domainapp/modules/visit/contributions/PetOwner_visits.java b/module-visit/src/main/java/domainapp/modules/visit/contributions/PetOwner_visits.java
index 70dc7be..051be47 100644
--- a/module-visit/src/main/java/domainapp/modules/visit/contributions/PetOwner_visits.java
+++ b/module-visit/src/main/java/domainapp/modules/visit/contributions/PetOwner_visits.java
@@ -2,6 +2,7 @@ package domainapp.modules.visit.contributions;
 
 import domainapp.modules.petowner.dom.pet.Pet;
 import domainapp.modules.petowner.dom.petowner.PetOwner;
+import domainapp.modules.petowner.dom.petowner.PetOwnerRepository;
 import domainapp.modules.visit.dom.visit.Visit;
 import domainapp.modules.visit.dom.visit.VisitRepository;
 
@@ -30,6 +31,11 @@ public class PetOwner_visits {
         return visitRepository.findByPetOwner(petOwner);
     }
 
+    @MemberSupport
+    public boolean hideColl() {
+        return petOwner.getPets().isEmpty();
+    }
+
     @Inject VisitRepository visitRepository;
 
 }