java.lang.Object | |||||
↳ | java.util.AbstractMap<K, V> | ||||
↳ | java.util.HashMap<K, V> | ||||
↳ | java.util.LinkedHashMap<K, V> | ||||
↳ | org.bson.BasicBSONObject | ||||
↳ | com.mongodb.BasicDBObject |
Known Direct Subclasses |
a basic implementation of bson object that is mongo specific.
A DBObject
can be created as follows, using this class:
DBObject obj = new BasicDBObject(); obj.put( "foo", "bar" );
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an empty object.
| |||||||||||
creates an empty object
| |||||||||||
creates an object with the given key/value
| |||||||||||
Creates an object from a map.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a key/value pair to this object
| |||||||||||
whether markAsPartialObject was ever called
only matters if you are going to upsert and do not want to risk losing fields
| |||||||||||
if this object was retrieved with only some fields (using a field filter)
this method will be called to mark it as such.
| |||||||||||
Returns a JSON serialization of this object
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.bson.BasicBSONObject
| |||||||||||
From class
java.util.LinkedHashMap
| |||||||||||
From class
java.util.HashMap
| |||||||||||
From class
java.util.AbstractMap
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.mongodb.DBObject
| |||||||||||
From interface
java.util.Map
| |||||||||||
From interface
org.bson.BSONObject
|
Creates an empty object.
creates an empty object
size | an estimate of number of fields that will be inserted |
---|
creates an object with the given key/value
key | key under which to store |
---|---|
value | value to stor |
Add a key/value pair to this object
key | the field name |
---|---|
val | the field value |
this
whether markAsPartialObject was ever called only matters if you are going to upsert and do not want to risk losing fields
if this object was retrieved with only some fields (using a field filter) this method will be called to mark it as such.