public enum FieldType extends Enum<FieldType>
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.BsonType| Enum Constant and Description |
|---|
IMPLICIT
Implicit type that is derived from the property value.
|
OBJECT_ID |
STRING |
| Modifier and Type | Method and Description |
|---|---|
int |
getBsonType()
Returns the BSON type identifier.
|
Class<?> |
getJavaClass()
Returns the Java class used to represent the type.
|
static FieldType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FieldType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FieldType IMPLICIT
public static final FieldType STRING
public static final FieldType OBJECT_ID
public static FieldType[] values()
for (FieldType c : FieldType.values()) System.out.println(c);
public static FieldType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getBsonType()
-1 if FieldType maps to a synthetic Bson type.-1 if FieldType maps to a synthetic Bson type.public Class<?> getJavaClass()
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.