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 78379c9ab5fc2be1784ec2cc08b42d65e5340da6
Author: Dan Haywood <[email protected]>
AuthorDate: Thu May 23 06:41:28 2024 +0100

    renames PetOwner's lastCheckedIn property to lastVisit
---
 .../java/domainapp/modules/petowner/dom/petowner/PetOwner.java     | 7 +++----
 .../java/domainapp/modules/petowner/fixture/PetOwner_persona.java  | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

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 833c426..fd63bc4 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
@@ -40,7 +40,6 @@ import org.apache.causeway.applib.annotation.Property;
 import org.apache.causeway.applib.annotation.PropertyLayout;
 import org.apache.causeway.applib.annotation.Publishing;
 import org.apache.causeway.applib.annotation.TableDecorator;
-import org.apache.causeway.applib.annotation.Title;
 import org.apache.causeway.applib.jaxb.PersistentEntityAdapter;
 import org.apache.causeway.applib.layout.LayoutConstants;
 import org.apache.causeway.applib.services.message.MessageService;
@@ -166,7 +165,7 @@ public class PetOwner implements Comparable<PetOwner>, 
CalendarEventable {
     @PropertyLayout(fieldSetId = LayoutConstants.FieldSetId.DETAILS, sequence 
= "3")
     @Column(nullable = true)
     @Getter @Setter
-    private java.time.LocalDate lastCheckedIn;
+    private java.time.LocalDate lastVisit;
 
 
     @Override
@@ -176,8 +175,8 @@ public class PetOwner implements Comparable<PetOwner>, 
CalendarEventable {
 
     @Override
     public CalendarEvent toCalendarEvent() {
-        if (getLastCheckedIn() != null) {
-            long epochMillis = 
getLastCheckedIn().toEpochSecond(LocalTime.MIDNIGHT, 
ZoneOffset.systemDefault().getRules().getOffset(getLastCheckedIn().atStartOfDay()))
 * 1000L;
+        if (getLastVisit() != null) {
+            long epochMillis = 
getLastVisit().toEpochSecond(LocalTime.MIDNIGHT, 
ZoneOffset.systemDefault().getRules().getOffset(getLastVisit().atStartOfDay())) 
* 1000L;
             return new CalendarEvent(epochMillis, getCalendarName(), 
titleService.titleOf(this), getNotes());
         } else {
             return null;
diff --git 
a/module-petowner/src/main/java/domainapp/modules/petowner/fixture/PetOwner_persona.java
 
b/module-petowner/src/main/java/domainapp/modules/petowner/fixture/PetOwner_persona.java
index a698ff6..7950f0a 100644
--- 
a/module-petowner/src/main/java/domainapp/modules/petowner/fixture/PetOwner_persona.java
+++ 
b/module-petowner/src/main/java/domainapp/modules/petowner/fixture/PetOwner_persona.java
@@ -74,7 +74,7 @@ implements Persona<PetOwner, PetOwner_persona.Builder> {
                 petOwner.setKnownAs(persona.knownAs);
             }
 
-            
petOwner.setLastCheckedIn(clockService.getClock().nowAsLocalDate().plusDays(fakeDataService.ints().between(-10,
 +10)));
+            
petOwner.setLastVisit(clockService.getClock().nowAsLocalDate().plusDays(fakeDataService.ints().between(-10,
 +10)));
 
             return petOwner;
         }

Reply via email to