Interface JsonSchemaObject.Type
- All Known Implementing Classes:
JsonSchemaObject.Type.BsonType
,JsonSchemaObject.Type.JsonType
- Enclosing interface:
- JsonSchemaObject
public static interface JsonSchemaObject.Type
Type represents either a JSON schema type or a MongoDB specific bsonType.
- Since:
- 2.1
- Author:
- Christoph Strobl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final Set<JsonSchemaObject.Type>
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final Set<JsonSchemaObject.Type>
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
static final JsonSchemaObject.Type
-
Method Summary
Modifier and TypeMethodDescriptionstatic JsonSchemaObject.Type
static JsonSchemaObject.Type
static JsonSchemaObject.Type
static JsonSchemaObject.Type
static JsonSchemaObject.Type
bsonTypeOf
(String name) static Set<JsonSchemaObject.Type>
static JsonSchemaObject.Type
dateType()
static JsonSchemaObject.Type
static JsonSchemaObject.Type
intType()
static JsonSchemaObject.Type
static JsonSchemaObject.Type
jsonTypeOf
(String name) static Set<JsonSchemaObject.Type>
static JsonSchemaObject.Type
longType()
static JsonSchemaObject.Type
nullType()
static JsonSchemaObject.Type
static JsonSchemaObject.Type
static JsonSchemaObject.Type
static JsonSchemaObject.Type
Create aJsonSchemaObject.Type
with its defaultrepresentation
via the name.static JsonSchemaObject.Type
Get theJsonSchemaObject.Type
representation.static JsonSchemaObject.Type
static JsonSchemaObject.Type
default JsonSchemaObject.Type
Get the bsonType representation of the given type.value()
Get theJsonSchemaObject.Type
value.
-
Field Details
-
OBJECT_ID
-
REGULAR_EXPRESSION
-
DOUBLE
-
BINARY_DATA
-
DATE
-
JAVA_SCRIPT
-
INT_32
-
INT_64
-
DECIMAL_128
-
TIMESTAMP
-
BSON_TYPES
-
OBJECT
-
ARRAY
-
NUMBER
-
BOOLEAN
-
STRING
-
NULL
-
JSON_TYPES
-
-
Method Details
-
objectIdType
- Returns:
- a constant
JsonSchemaObject.Type
representingbsonType : 'objectId'
.
-
regexType
- Returns:
- a constant
JsonSchemaObject.Type
representingbsonType : 'regex'
.
-
doubleType
- Returns:
- a constant
JsonSchemaObject.Type
representingbsonType : 'double'
.
-
binaryType
- Returns:
- a constant
JsonSchemaObject.Type
representingbsonType : 'binData'
.
-
dateType
- Returns:
- a constant
JsonSchemaObject.Type
representingbsonType : 'date'
.
-
javascriptType
- Returns:
- a constant
JsonSchemaObject.Type
representingbsonType : 'javascript'
.
-
intType
- Returns:
- a constant
JsonSchemaObject.Type
representingbsonType : 'int'
.
-
longType
- Returns:
- a constant
JsonSchemaObject.Type
representingbsonType : 'long'
.
-
bigDecimalType
- Returns:
- a constant
JsonSchemaObject.Type
representingbsonType : 'decimal128'
.
-
timestampType
- Returns:
- a constant
JsonSchemaObject.Type
representingbsonType : 'timestamp'
.
-
objectType
- Returns:
- a constant
JsonSchemaObject.Type
representingtype : 'object'
.
-
arrayType
- Returns:
- a constant
JsonSchemaObject.Type
representingtype : 'array'
.
-
numberType
- Returns:
- a constant
JsonSchemaObject.Type
representingtype : 'number'
.
-
booleanType
- Returns:
- a constant
JsonSchemaObject.Type
representingtype : 'boolean'
.
-
stringType
- Returns:
- a constant
JsonSchemaObject.Type
representingtype : 'string'
.
-
nullType
- Returns:
- a constant
JsonSchemaObject.Type
representingtype : 'null'
.
-
bsonTypeOf
- Returns:
- new
JsonSchemaObject.Type
representing the givenbsonType
.
-
jsonTypeOf
- Returns:
- new
JsonSchemaObject.Type
representing the giventype
.
-
of
Create aJsonSchemaObject.Type
with its defaultrepresentation
via the name.- Parameters:
name
- must not be null.- Returns:
- the matching type instance.
- Since:
- 2.2
-
jsonTypes
- Returns:
- all known JSON types.
-
bsonTypes
- Returns:
- all known BSON types.
-
representation
String representation()- Returns:
- never null.
-
value
Object value()Get theJsonSchemaObject.Type
value. Like string, number,...- Returns:
- never null.
-
toBsonType
Get the bsonType representation of the given type.- Returns:
- never null.
- Since:
- 2.2
-