Annotation Type Decimal
-
@Documented @Target({METHOD,FIELD}) @Retention(RUNTIME) @Repeatable(List.class) @PropertyMapping(processor=@PropertyMappingAnnotationProcessorRef(type=DecimalProcessor.class,retrieval=CONSTRUCTOR)) public @interface Decimal
Maps a property to a scaled number field in the index, i.e. a numeric field for integer or floating-point values that require a higher precision than doubles but always have roughly the same scale.Useful for
BigDecimal
andBigInteger
in particular.Simplified version for Infinispan of
ScaledNumberField
- Since:
- 14.0
- See Also:
decimalScale()
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
aggregable
int
decimalScale
String
indexNullAs
String
name
boolean
projectable
boolean
searchable
boolean
sortable
-
-
-
Element Detail
-
name
String name
- Returns:
- The name of the index field.
- Default:
- ""
-
-
-
decimalScale
int decimalScale
- Returns:
- How the scale of values should be adjusted before indexing as a fixed-precision integer.
A positive
decimalScale
will shift the decimal point to the right before rounding to the nearest integer and indexing, effectively retaining that many digits after the decimal place in the index. Since numbers are indexed with a fixed number of bits, this increase in precision also means that the maximum value that can be indexed will be smaller. A negativedecimalScale
will shift the decimal point to the left before rounding to the nearest integer and indexing, effectively setting that many of the smaller digits to zero in the index. Since numbers are indexed with a fixed number of bits, this decrease in precision also means that the maximum value that can be indexed will be larger. By default, two decimals will be used.
- Default:
- 2
-
-
-
projectable
boolean projectable
- Returns:
- Whether projections are enabled for this field.
- See Also:
Basic.projectable()
- Default:
- false
-
-
-
sortable
boolean sortable
- Returns:
- Whether this field should be sortable.
- See Also:
Basic.sortable()
- Default:
- false
-
-
-
searchable
boolean searchable
- Returns:
- Whether this field should be searchable.
- See Also:
Basic.searchable()
- Default:
- true
-
-
-
aggregable
boolean aggregable
- Returns:
- Whether aggregations are enabled for this field.
- See Also:
Basic.aggregable()
- Default:
- false
-
-
-
indexNullAs
String indexNullAs
- Returns:
- A value used instead of null values when indexing.
- See Also:
Basic.indexNullAs()
- Default:
- "__Infinispan_indexNullAs_doNotIndexNull"
-
-