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/05/26 13:39:07 UTC
(causeway-app-petclinic) 05/08: adds notes property for Pet
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 51dda9eb16fafe28658b3e5800b5b29cc29cbc5d
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sun May 26 13:49:38 2024 +0100
adds notes property for Pet
---
.../src/main/java/domainapp/modules/petowner/dom/pet/Pet.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/module-petowner/src/main/java/domainapp/modules/petowner/dom/pet/Pet.java b/module-petowner/src/main/java/domainapp/modules/petowner/dom/pet/Pet.java
index bccc8de..5e3872c 100644
--- a/module-petowner/src/main/java/domainapp/modules/petowner/dom/pet/Pet.java
+++ b/module-petowner/src/main/java/domainapp/modules/petowner/dom/pet/Pet.java
@@ -20,12 +20,15 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.apache.causeway.applib.annotation.DomainObject;
import org.apache.causeway.applib.annotation.DomainObjectLayout;
+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.Title;
import org.apache.causeway.applib.jaxb.PersistentEntityAdapter;
import org.apache.causeway.persistence.jpa.applib.integration.CausewayEntityListener;
+import domainapp.modules.petowner.types.Notes;
+
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
@@ -90,6 +93,13 @@ public class Pet implements Comparable<Pet> {
@PropertyLayout(fieldSetId = "details", sequence = "1")
private PetSpecies species;
+ @Notes
+ @Column(length = Notes.MAX_LEN, nullable = true)
+ @Getter @Setter
+ @Property(commandPublishing = Publishing.ENABLED, executionPublishing = Publishing.ENABLED)
+ @PropertyLayout(fieldSetId = "details", sequence = "2")
+ private String notes;
+
private final static Comparator<Pet> comparator =
Comparator.comparing(Pet::getPetOwner).thenComparing(Pet::getName);