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 6e03c4fc489bb98aa32ce20133f1911d91f93a74 Author: Dan Haywood <[email protected]> AuthorDate: Sat May 25 15:06:57 2024 +0100 Defines PhoneNumber meta-annotation --- .../modules/petowner/types/PhoneNumber.java | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/module-petowner/src/main/java/domainapp/modules/petowner/types/PhoneNumber.java b/module-petowner/src/main/java/domainapp/modules/petowner/types/PhoneNumber.java new file mode 100644 index 0000000..9e83aec --- /dev/null +++ b/module-petowner/src/main/java/domainapp/modules/petowner/types/PhoneNumber.java @@ -0,0 +1,28 @@ +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.Editing; +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( + editing = Editing.ENABLED, + maxLength = PhoneNumber.MAX_LEN, + optionality = Optionality.OPTIONAL +) +@Parameter( + maxLength = PhoneNumber.MAX_LEN, + optionality = Optionality.OPTIONAL +) +@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE }) +@Retention(RetentionPolicy.RUNTIME) +public @interface PhoneNumber { + + int MAX_LEN = 40; +}
