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 classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final Set<JsonSchemaObject.Type>static final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final Set<JsonSchemaObject.Type>static final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final JsonSchemaObject.Typestatic final JsonSchemaObject.Type -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonSchemaObject.Typestatic JsonSchemaObject.Typestatic JsonSchemaObject.Typestatic JsonSchemaObject.Typestatic JsonSchemaObject.TypebsonTypeOf(String name) static Set<JsonSchemaObject.Type>static JsonSchemaObject.TypedateType()static JsonSchemaObject.Typestatic JsonSchemaObject.TypeintType()static JsonSchemaObject.Typestatic JsonSchemaObject.TypejsonTypeOf(String name) static Set<JsonSchemaObject.Type>static JsonSchemaObject.TypelongType()static JsonSchemaObject.TypenullType()static JsonSchemaObject.Typestatic JsonSchemaObject.Typestatic JsonSchemaObject.Typestatic JsonSchemaObject.TypeCreate aJsonSchemaObject.Typewith its defaultrepresentationvia the name.static JsonSchemaObject.TypeGet theJsonSchemaObject.Typerepresentation.static JsonSchemaObject.Typestatic JsonSchemaObject.Typedefault JsonSchemaObject.TypeGet the bsonType representation of the given type.value()Get theJsonSchemaObject.Typevalue.
-
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.TyperepresentingbsonType : 'objectId'.
-
regexType
- Returns:
- a constant
JsonSchemaObject.TyperepresentingbsonType : 'regex'.
-
doubleType
- Returns:
- a constant
JsonSchemaObject.TyperepresentingbsonType : 'double'.
-
binaryType
- Returns:
- a constant
JsonSchemaObject.TyperepresentingbsonType : 'binData'.
-
dateType
- Returns:
- a constant
JsonSchemaObject.TyperepresentingbsonType : 'date'.
-
javascriptType
- Returns:
- a constant
JsonSchemaObject.TyperepresentingbsonType : 'javascript'.
-
intType
- Returns:
- a constant
JsonSchemaObject.TyperepresentingbsonType : 'int'.
-
longType
- Returns:
- a constant
JsonSchemaObject.TyperepresentingbsonType : 'long'.
-
bigDecimalType
- Returns:
- a constant
JsonSchemaObject.TyperepresentingbsonType : 'decimal128'.
-
timestampType
- Returns:
- a constant
JsonSchemaObject.TyperepresentingbsonType : 'timestamp'.
-
objectType
- Returns:
- a constant
JsonSchemaObject.Typerepresentingtype : 'object'.
-
arrayType
- Returns:
- a constant
JsonSchemaObject.Typerepresentingtype : 'array'.
-
numberType
- Returns:
- a constant
JsonSchemaObject.Typerepresentingtype : 'number'.
-
booleanType
- Returns:
- a constant
JsonSchemaObject.Typerepresentingtype : 'boolean'.
-
stringType
- Returns:
- a constant
JsonSchemaObject.Typerepresentingtype : 'string'.
-
nullType
- Returns:
- a constant
JsonSchemaObject.Typerepresentingtype : 'null'.
-
bsonTypeOf
- Returns:
- new
JsonSchemaObject.Typerepresenting the givenbsonType.
-
jsonTypeOf
- Returns:
- new
JsonSchemaObject.Typerepresenting the giventype.
-
of
Create aJsonSchemaObject.Typewith its defaultrepresentationvia 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.Typevalue. Like string, number,...- Returns:
- never null.
-
toBsonType
Get the bsonType representation of the given type.- Returns:
- never null.
- Since:
- 2.2
-