Package | Description |
---|---|
org.bson |
Contains the base BSON classes.
|
org.bson.codecs |
This package contains all the default BSON codecs.
|
org.bson.conversions |
This package contains the Bson interface
|
Modifier and Type | Class and Description |
---|---|
class |
BsonDocumentWrapper<T>
A
BsonDocument that begins its life as a document of any type and an Encoder for that document, which lets an instance of
any class with an Encoder be treated as a BsonDocument. |
class |
RawBsonDocument
An immutable BSON document that is represented using only the raw bytes.
|
Modifier and Type | Method and Description |
---|---|
BsonDocument |
RawBsonDocument.append(String key,
BsonValue value) |
BsonDocument |
BsonDocument.append(String key,
BsonValue value)
Put the given key and value into this document, and return the document.
|
static BsonDocument |
BsonDocumentWrapper.asBsonDocument(Object document,
CodecRegistry codecRegistry)
A helper to convert an document of type Object to a BsonDocument
|
BsonDocument |
BsonValue.asDocument()
Gets this value as a BsonDocument if it is one, otherwise throws exception
|
BsonDocument |
RawBsonDocument.clone() |
BsonDocument |
BsonDocument.clone() |
BsonDocument |
BsonDocumentWrapper.clone() |
BsonDocument |
BsonDocumentWriter.getDocument()
Gets the document that the writer is writing to.
|
BsonDocument |
BsonDocument.getDocument(Object key)
Gets the value of the key if it is a BsonDocument, or throws if not.
|
BsonDocument |
BsonDocument.getDocument(Object key,
BsonDocument defaultValue)
If the document does not contain the given key, return the given default value.
|
BsonDocument |
BsonJavaScriptWithScope.getScope()
Get the scope.
|
static BsonDocument |
BsonDocument.parse(String json)
Parses a string in MongoDB Extended JSON format to a
BsonDocument |
<C> BsonDocument |
BsonDocument.toBsonDocument(Class<C> documentClass,
CodecRegistry codecRegistry) |
<C> BsonDocument |
Document.toBsonDocument(Class<C> documentClass,
CodecRegistry codecRegistry) |
Modifier and Type | Method and Description |
---|---|
BsonDocument |
BsonDocument.getDocument(Object key,
BsonDocument defaultValue)
If the document does not contain the given key, return the given default value.
|
Constructor and Description |
---|
BsonDocumentReader(BsonDocument document)
Construct a new instance.
|
BsonDocumentWriter(BsonDocument document)
Construct a new instance.
|
BsonJavaScriptWithScope(String code,
BsonDocument scope)
Construct a new instance with the given code and scope.
|
Context(BsonDocumentReader.Context parentContext,
BsonContextType contextType,
BsonDocument document) |
Modifier and Type | Method and Description |
---|---|
BsonDocument |
BsonDocumentCodec.decode(BsonReader reader,
DecoderContext decoderContext) |
BsonDocument |
BsonDocumentCodec.generateIdIfAbsentFromDocument(BsonDocument document) |
Modifier and Type | Method and Description |
---|---|
Class<BsonDocument> |
BsonDocumentCodec.getEncoderClass() |
Modifier and Type | Method and Description |
---|---|
boolean |
BsonDocumentCodec.documentHasId(BsonDocument document) |
void |
BsonDocumentCodec.encode(BsonWriter writer,
BsonDocument value,
EncoderContext encoderContext) |
BsonDocument |
BsonDocumentCodec.generateIdIfAbsentFromDocument(BsonDocument document) |
BsonValue |
BsonDocumentCodec.getDocumentId(BsonDocument document) |
Constructor and Description |
---|
BsonDocumentWrapperCodec(Codec<BsonDocument> bsonDocumentCodec)
Construct a new instance,
|
BsonJavaScriptWithScopeCodec(Codec<BsonDocument> documentCodec)
Construct a new instance with the given codec to use for the nested document
|
Modifier and Type | Method and Description |
---|---|
<TDocument> |
Bson.toBsonDocument(Class<TDocument> documentClass,
CodecRegistry codecRegistry)
Render the filter into a BsonDocument.
|
Copyright © 2018. All rights reserved.