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/25 15:12:47 UTC
(causeway-app-petclinic) 04/07: Adds EmailAddress value type
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 95d38a718efe2a812ae2beecc00065c4c1166143
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat May 25 16:11:07 2024 +0100
Adds EmailAddress value type
---
.../domainapp/modules/petowner/value/EmailAddress.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/module-petowner/src/main/java/domainapp/modules/petowner/value/EmailAddress.java b/module-petowner/src/main/java/domainapp/modules/petowner/value/EmailAddress.java
new file mode 100644
index 0000000..7d613af
--- /dev/null
+++ b/module-petowner/src/main/java/domainapp/modules/petowner/value/EmailAddress.java
@@ -0,0 +1,18 @@
+package domainapp.modules.petowner.value;
+
+import lombok.AccessLevel;
+
+import javax.persistence.Column;
+
+@javax.persistence.Embeddable
+@org.apache.causeway.applib.annotation.Value
+@lombok.Getter
+@lombok.Setter(AccessLevel.PRIVATE)
+@lombok.AllArgsConstructor(staticName = "of")
+@lombok.NoArgsConstructor
+public class EmailAddress {
+ public static final int MAX_LEN = 40;
+
+ @Column(length = EmailAddress.MAX_LEN, nullable = true, name = "emailAddress")
+ String emailAddress;
+}
\ No newline at end of file