You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2021/12/20 10:23:08 UTC

[isis] branch master updated: ISIS-2882: add date/time style attributes to ValueSemantics annot.

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new f5b8731  ISIS-2882: add date/time style attributes to ValueSemantics annot.
f5b8731 is described below

commit f5b8731c1bc582fb5dd9f8c699b573d19342fecf
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Dec 20 11:22:59 2021 +0100

    ISIS-2882: add date/time style attributes to ValueSemantics annot.
---
 .../apache/isis/applib/annotation/ValueSemantics.java   | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/ValueSemantics.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/ValueSemantics.java
index e360d1d..22a5a44 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/ValueSemantics.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/ValueSemantics.java
@@ -6,6 +6,7 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 import java.math.BigDecimal;
+import java.time.format.FormatStyle;
 import java.util.Locale;
 
 import javax.persistence.Column;
@@ -48,7 +49,6 @@ public @interface ValueSemantics {
     // -- NUMBER CONSTRAINTS
 
     /**
-     * EXPERIMENTAL - considered to be moved to a separate {@code @Digits} annotation<p>
      * If associated with a {@link Number}, the maximum number of total digits accepted for
      * this number.<br>
      * Can be omitted, if {@link Column#precision()} is used.<br>
@@ -60,7 +60,6 @@ public @interface ValueSemantics {
             default 65;
 
     /**
-     * EXPERIMENTAL - considered to be moved to a separate {@code @Digits} annotation<p>
      * If associated with a {@link Number}, the minimum number of integer digits required for
      * this number.<br>
      * default = {@code 1}
@@ -69,7 +68,6 @@ public @interface ValueSemantics {
             default 1;
 
     /**
-     * EXPERIMENTAL - considered to be moved to a separate {@code @Digits} annotation<p>
      * If associated with a {@link BigDecimal}, the maximum number of fractional digits accepted
      * for this number.<br>
      * Can be omitted, if {@link Column#scale()} is used.<br>
@@ -81,7 +79,6 @@ public @interface ValueSemantics {
             default 30;
 
     /**
-     * EXPERIMENTAL - considered to be moved to a separate {@code @Digits} annotation<p>
      * If associated with a {@link BigDecimal}, the minimum number of fractional digits
      * required for this number.<br>
      * default = {@code 0}
@@ -89,4 +86,16 @@ public @interface ValueSemantics {
     int minFractionalDigits()
             default 0;
 
+    /**
+     * If associated with a temporal date value, the style of a localized date.
+     */
+    FormatStyle dateFormatStyle()
+            default FormatStyle.MEDIUM;
+
+    /**
+     * If associated with a temporal time value, the style of a localized time.
+     */
+    FormatStyle timeFormatStyle()
+            default FormatStyle.MEDIUM;
+
 }