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 b2aca73d729744d2a351c85a589421c9541a1985 Author: Dan Haywood <[email protected]> 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 a22d45b..9b73f3c 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; @@ -91,6 +94,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);
