public class MongoJsonSchemaMapper extends Object implements JsonSchemaMapper
JsonSchemaMapper
implementation using the conversion and mapping infrastructure for mapping fields to the
provided domain type.Constructor and Description |
---|
MongoJsonSchemaMapper(MongoConverter converter)
Create a new
MongoJsonSchemaMapper facilitating the given MongoConverter . |
Modifier and Type | Method and Description |
---|---|
org.bson.Document |
mapSchema(org.bson.Document jsonSchema,
Class<?> type)
Map the required and properties fields the given
Document containing the
$jsonSchema against the given domain type. |
public MongoJsonSchemaMapper(MongoConverter converter)
MongoJsonSchemaMapper
facilitating the given MongoConverter
.converter
- must not be null.public org.bson.Document mapSchema(org.bson.Document jsonSchema, Class<?> type)
JsonSchemaMapper
Document
containing the
$jsonSchema against the given domain type. mapSchema
in interface JsonSchemaMapper
jsonSchema
- the Document
holding the raw schema representation. Must not be null.type
- the target type to map against. Must not be null.Document
containing the mapped $jsonSchema never null.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.