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 3deb1f80aa7b640d0edbdfef567cae8c7d474fa2
Author: Dan Haywood <[email protected]>
AuthorDate: Sun May 26 11:34:10 2024 +0100

    adds PetName meta-annotation
---
 .../domainapp/modules/petowner/types/PetName.java  | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git 
a/module-petowner/src/main/java/domainapp/modules/petowner/types/PetName.java 
b/module-petowner/src/main/java/domainapp/modules/petowner/types/PetName.java
new file mode 100644
index 0000000..292a4b7
--- /dev/null
+++ 
b/module-petowner/src/main/java/domainapp/modules/petowner/types/PetName.java
@@ -0,0 +1,22 @@
+package domainapp.modules.petowner.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.causeway.applib.annotation.Optionality;
+import org.apache.causeway.applib.annotation.Parameter;
+import org.apache.causeway.applib.annotation.ParameterLayout;
+import org.apache.causeway.applib.annotation.Property;
+
+@Property(maxLength = PetName.MAX_LEN, optionality = Optionality.MANDATORY)
+@Parameter(maxLength = PetName.MAX_LEN, optionality = Optionality.MANDATORY)
+@ParameterLayout(named = "Name")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, 
ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface PetName {
+
+    int MAX_LEN = 60;
+
+}

Reply via email to