@@ -2686,41 +2686,44 @@ customized logging Handler instances, so alternate logging backends can be used
26862686The implementation that implements the API’s SPI may use a different logging approach.
26872687
26882688
2689- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2690- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2691- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2692- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2693- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2694- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2695- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2696- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2697- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2698-
2699-
27002689[[MetadataModeling]]
2701- == Meta-Data Modeling ==
2690+ == Meta-Data Contexts and Query Models ==
27022691=== Overview ===
27032692
2704- The JSR uses a unified meta-data model to support also more advanced use cases, which are not explicitly specified.
2693+ The JSR uses a unified meta-data model to support more advanced use cases, which are not explicitly specified.
27052694Mostly reasons for not specifying these aspects is that these things are highly use case and organization dependent
27062695aspects. In general there are 2 flavors of meta-data used throughout the JSR:
27072696
27082697. _Contexts_ provide additional information on value types or services, such as currencies, amounts, conversions or
27092698 formats. Contexts are accessible directly from the corresponding value types, by calling methods named
2710- +getXXXContext ()+.
2711- . _Queries_ models a generic and flexible way to configure services, such as currencies, amounts, conversions or formats
2712- as needed . Queries can be passed to the different accessor singletons, and also are forwarded to the SPI
2699+ +getContext ()+.
2700+ . _Queries_ models a generic and flexible way to configure/parametrize services for accessing currencies, amounts,
2701+ conversions or formats . Queries can be passed to the different accessor singletons, and also are forwarded to the SPI
27132702 implementations effectively providing the data/services required.
27142703
27152704Similarly there are two abstract base classes provided:
27162705
27172706. +AbstractContext+ models an abstract base type, which is extended by all context implementations within this JSR,
27182707 such as +MonetaryContext, CurrencyContext, RoundingContext, ProviderContext, ConversionContext, AmountFormatContext+.
2719- . +AbstractQuery+ models an abstract base type , which is extended by all query implementations within this JSR,
2708+ . +AbstractQuery+ models an abstract base query , which is extended by all query implementations within this JSR,
27202709 such as +MonetaryAmountFactoryQuery, CurrencyQuery, RoundingQuery, ConversionQuery, AmountFormatQuery+.
27212710
27222711The following sections give further information on these concepts.
27232712
2713+
2714+
2715+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%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2737,9 +2740,8 @@ implements Serializable{
27372740 ...
27382741 public String getProviderName();
27392742 public Long getTimestampMillis();
2740- public TemporalAccessor getTimestamp();
2743+ public LocalDateTime getTimestamp();
27412744
2742- public boolean isEmpty();
27432745 public Boolean getBoolean(String key);
27442746 public Integer getInt(String key);
27452747 public Long getLong(String key);
@@ -2748,19 +2750,23 @@ implements Serializable{
27482750 public String getText(String key);
27492751 public <T> T get(Class<T> type);
27502752 public <T> T get(String key, Class<T> type);
2753+
2754+ public boolean isEmpty();
2755+ public Class<?> getType(String key);
27512756 public Set<String> getKeys(Class<?> type)
2752- public <T> Map<String,T> getValues(Class<T> type)
27532757}
27542758-------------------------------------------------------------------------------
27552759
27562760Hereby
27572761
27582762* each context instance is related to a provider, that created the context, accessible from +getProviderName()+.
2759- * each context instance can have an (optional) timestamp.
2763+ * each context instance can have an (optional) timestamp, e.g. usable for historic data .
27602764* additional attributes can be set, which models a type safe interface for adding properties, without
27612765 duplicating artifacts or creating non portable dependencies.
27622766 ** identified by the attribute’s type.
27632767 ** identified an arbitrary literal key
2768+ * the +getXXX, get+ methods only return values of the resulting type is assignment compatible, so no class cast
2769+ exceptions do occur.
27642770
27652771The classes extending this class hereby are thread-safe and immutable:
27662772
@@ -2797,26 +2803,20 @@ public abstract class AbstractContextBuilder<B extends AbstractContextBuilder, C
27972803implements Serializable{
27982804 public B setProviderName(String provider);
27992805 public B setTimestampMillis(long timestamp);
2800- public B setTimestamp(TemporalAccessor timestamp);
2806+ public B setTimestamp(LocalDateTime timestamp);
28012807
28022808 public B set(Object value);
28032809 public <T> B set(T value, Class<? extends T> type);
28042810 public B set(String key, Object value);
28052811 public <T> B set(String key, T value, Class<? extends T> type)
2806- public B set(int value);
28072812 public B set(String key, int value);
2808- public B set(long value);
28092813 public B set(String key, long value);
2810- public B set(float value);
28112814 public B set(String key, float value);
2812- public B set(double value);
28132815 public B set(String key, double value);
2814- public B set(String key, String value);
28152816
28162817 public B importContext(AbstractContext context, boolean overwriteDuplicates);
28172818 public B importContext(AbstractContext context);
2818- public B removeAttributes(Class<?> type, String... keys);
2819- public B removeAll(Class<?> type);
2819+ public B removeAttributes(String... keys);
28202820
28212821 public abstract C build();
28222822
0 commit comments