Enum Class MongoCustomConversions.BigDecimalRepresentation
java.lang.Object
java.lang.Enum<MongoCustomConversions.BigDecimalRepresentation>
org.springframework.data.mongodb.core.convert.MongoCustomConversions.BigDecimalRepresentation
- All Implemented Interfaces:
Serializable, Comparable<MongoCustomConversions.BigDecimalRepresentation>, Constable
- Enclosing class:
MongoCustomConversions
public static enum MongoCustomConversions.BigDecimalRepresentation
extends Enum<MongoCustomConversions.BigDecimalRepresentation>
Strategy to represent
BigDecimal and BigInteger values in MongoDB.- Since:
- 4.5
- Author:
- Mark Paluch, Christoph Strobl
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionStore numbers usingDecimal128(default).Deprecated.since 5.0.Pass on values to the MongoDB Java Driver without any prior conversion. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
Deprecated.since 5.0. Storing values asStringretains precision, but prevents efficient range queries. PreferDECIMAL128for better query support. -
DECIMAL128
Store numbers usingDecimal128(default). Requires MongoDB Server 3.4 or later. -
UNSPECIFIED
Pass on values to the MongoDB Java Driver without any prior conversion.- Since:
- 5.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-