Package org.bson
Class BsonDocumentWrapper<T>
java.lang.Object
org.bson.BsonValue
org.bson.BsonDocument
org.bson.BsonDocumentWrapper<T>
- Type Parameters:
T- the type of the document that is wrapped
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
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. If any methods are called which required access to the individual elements of the
document, then, on demand, the document will be unwrapped into a BsonDocument using a BsonDocumentWriter and the Encoder.
But if all that is done with this document is to encode it, then the Encoder will be used to do that.- Since:
- 3.0
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBsonDocumentWrapper(T wrappedDocument, Encoder<T> encoder) Deprecated.Construct a new instance with the given document and encoder for the document. -
Method Summary
Modifier and TypeMethodDescriptionstatic BsonDocumentasBsonDocument(Object document, CodecRegistry codecRegistry) Deprecated.A helper to convert an document of type Object to a BsonDocumentvoidclear()Deprecated.clone()Deprecated.booleancontainsKey(Object key) Deprecated.booleancontainsValue(Object value) Deprecated.entrySet()Deprecated.booleanDeprecated.Deprecated.Deprecated.Get the encoder to use for the wrapped document.Deprecated.Get the wrapped document.inthashCode()Deprecated.booleanisEmpty()Deprecated.booleanDeprecated.Determine whether the document has been unwrapped already.keySet()Deprecated.Deprecated.voidDeprecated.Deprecated.intsize()Deprecated.toString()Deprecated.values()Deprecated.Methods inherited from class org.bson.BsonDocument
append, asBsonReader, get, getArray, getArray, getBinary, getBinary, getBoolean, getBoolean, getBsonType, getDateTime, getDateTime, getDecimal128, getDecimal128, getDocument, getDocument, getDouble, getDouble, getFirstKey, getInt32, getInt32, getInt64, getInt64, getNumber, getNumber, getObjectId, getObjectId, getRegularExpression, getRegularExpression, getString, getString, getTimestamp, getTimestamp, isArray, isBinary, isBoolean, isDateTime, isDecimal128, isDocument, isDouble, isInt32, isInt64, isNull, isNumber, isObjectId, isString, isTimestamp, parse, toBsonDocument, toJson, toJsonMethods inherited from class org.bson.BsonValue
asArray, asBinary, asBoolean, asDateTime, asDBPointer, asDecimal128, asDocument, asDouble, asInt32, asInt64, asJavaScript, asJavaScriptWithScope, asNumber, asObjectId, asRegularExpression, asString, asSymbol, asTimestamp, isArray, isBinary, isBoolean, isDateTime, isDBPointer, isDecimal128, isDocument, isDouble, isInt32, isInt64, isJavaScript, isJavaScriptWithScope, isNull, isNumber, isObjectId, isRegularExpression, isString, isSymbol, isTimestampMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
BsonDocumentWrapper
Deprecated.Construct a new instance with the given document and encoder for the document.- Parameters:
wrappedDocument- the wrapped documentencoder- the encoder for the wrapped document
-
-
Method Details
-
asBsonDocument
Deprecated.A helper to convert an document of type Object to a BsonDocumentIf not already a BsonDocument it looks up the documents' class in the codecRegistry and wraps it into a BsonDocumentWrapper
- Parameters:
document- the document to convertcodecRegistry- the codecRegistry that can be used in the conversion of the Object- Returns:
- a BsonDocument
-
getWrappedDocument
Deprecated.Get the wrapped document.- Returns:
- the wrapped document
-
getEncoder
Deprecated.Get the encoder to use for the wrapped document.- Returns:
- the encoder
-
isUnwrapped
public boolean isUnwrapped()Deprecated.Determine whether the document has been unwrapped already.- Returns:
- true if the wrapped document has been unwrapped already
-
size
public int size()Deprecated. -
isEmpty
public boolean isEmpty()Deprecated. -
containsKey
Deprecated.- Specified by:
containsKeyin interfaceMap<String,BsonValue> - Overrides:
containsKeyin classBsonDocument
-
containsValue
Deprecated.- Specified by:
containsValuein interfaceMap<String,BsonValue> - Overrides:
containsValuein classBsonDocument
-
get
Deprecated. -
put
Deprecated. -
remove
Deprecated. -
putAll
Deprecated. -
clear
public void clear()Deprecated. -
keySet
Deprecated. -
values
Deprecated. -
entrySet
Deprecated. -
equals
Deprecated. -
hashCode
public int hashCode()Deprecated. -
toString
Deprecated.- Overrides:
toStringin classBsonDocument
-
clone
Deprecated.- Overrides:
clonein classBsonDocument
-