Package org.bson
Interface BSONObject
- All Known Subinterfaces:
DBObject
- All Known Implementing Classes:
BasicBSONList,BasicBSONObject,BasicDBList,BasicDBObject,CommandResult,GridFSDBFile,GridFSFile,GridFSInputFile,LazyBSONList,LazyBSONObject,LazyDBList,LazyDBObject,ReflectionDBObject
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
A key-value map that can be saved to the database.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Checks if this object contains a field with the given name.booleancontainsKey(String key) Deprecated.Please usecontainsField(String)insteadDeprecated.Gets a field from this object by a given name.keySet()Deprecated.Returns this object's fields' namesDeprecated.Sets a name/value pair in this object.voidDeprecated.Sets all key/value pairs from a map into this objectvoidputAll(BSONObject o) Deprecated.Sets all key/value pairs from an object into this objectremoveField(String key) Deprecated.Removes a field with a given name from this object.toMap()Deprecated.Returns a map representing this BSONObject.
-
Method Details
-
put
Deprecated.Sets a name/value pair in this object.- Parameters:
key- Name to setv- Corresponding value- Returns:
- the previous value associated with
key, ornullif there was no mapping forkey. (Anullreturn can also indicate that the map previously associatednullwithkey.)
-
putAll
Deprecated.Sets all key/value pairs from an object into this object- Parameters:
o- the object
-
putAll
Deprecated.Sets all key/value pairs from a map into this object- Parameters:
m- the map
-
get
Deprecated.Gets a field from this object by a given name.- Parameters:
key- The name of the field fetch- Returns:
- The field, if found
-
toMap
Map toMap()Deprecated.Returns a map representing this BSONObject.- Returns:
- the map
-
removeField
Deprecated.Removes a field with a given name from this object.- Parameters:
key- The name of the field to remove- Returns:
- The value removed from this object
-
containsKey
Deprecated.Please usecontainsField(String)insteadDeprecated- Parameters:
key- the key to check- Returns:
- True if the key is present
-
containsField
Deprecated.Checks if this object contains a field with the given name.- Parameters:
s- Field name for which to check- Returns:
- True if the field is present
-
keySet
Deprecated.Returns this object's fields' names- Returns:
- The names of the fields in this object
-