Enum Class FieldType
- All Implemented Interfaces:
Serializable,Comparable<FieldType>,Constable
Enumeration of field value types that can be used to represent a
Bson types are identified by a
Document field value. This
enumeration contains a subset of BsonType that is supported by the mapping and conversion
components.
Bson types are identified by a
byte value. This enumeration typically returns the
according bson type value except for IMPLICIT which is a marker to derive the field type from a property.- Since:
- 2.2
- Author:
- Mark Paluch, Christoph Strobl
- See Also:
-
BsonType
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintReturns the BSON type identifier.Class<?>Returns the Java class used to represent the type.static FieldTypeReturns the enum constant of this class with the specified name.static FieldType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IMPLICIT
Implicit type that is derived from the property value. -
DOUBLE
-
STRING
-
ARRAY
-
BINARY
-
OBJECT_ID
-
BOOLEAN
-
DATE_TIME
-
PATTERN
-
SCRIPT
-
INT32
-
TIMESTAMP
-
INT64
-
DECIMAL128
-
-
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
-
getBsonType
public int getBsonType()Returns the BSON type identifier. Can be-1ifFieldTypemaps to a synthetic Bson type.- Returns:
- the BSON type identifier. Can be
-1ifFieldTypemaps to a synthetic Bson type.
-
getJavaClass
Returns the Java class used to represent the type.- Returns:
- the Java class used to represent the type.
-