public class RawDBObject extends Object implements DBObject
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsField(String field)
Checks if this object contains a field with the given name.
|
boolean |
containsKey(String key)
Deprecated.
|
Object |
get(String key)
Gets a field from this object by a given name.
|
boolean |
isPartialObject()
whether markAsPartialObject was ever called
only matters if you are going to upsert and do not want to risk losing fields
|
Set<String> |
keySet()
Returns this object's fields' names
|
void |
markAsPartialObject()
if this object was retrieved with only some fields (using a field filter)
this method will be called to mark it as such.
|
Object |
put(String key,
Object v)
Sets a name/value pair in this object.
|
void |
putAll(BSONObject o)
Sets all key/value pairs from an object into this object
|
void |
putAll(Map m)
Sets all key/value pairs from a map into this object
|
Object |
removeField(String key)
Removes a field with a given name from this object.
|
Map |
toMap()
Returns a map representing this BSONObject.
|
String |
toString() |
public Object get(String key)
BSONObjectget in interface BSONObjectkey - The name of the field fetchpublic Map toMap()
BSONObjecttoMap in interface BSONObjectpublic Object put(String key, Object v)
BSONObjectput in interface BSONObjectkey - Name to setv - Corresponding valuepublic void putAll(BSONObject o)
BSONObjectputAll in interface BSONObjecto - the objectpublic void putAll(Map m)
BSONObjectputAll in interface BSONObjectm - the mappublic Object removeField(String key)
BSONObjectremoveField in interface BSONObjectkey - The name of the field to remove@Deprecated public boolean containsKey(String key)
BSONObjectcontainsKey in interface BSONObjectpublic boolean containsField(String field)
BSONObjectcontainsField in interface BSONObjectfield - Field name for which to checkpublic Set<String> keySet()
BSONObjectkeySet in interface BSONObjectpublic boolean isPartialObject()
DBObjectisPartialObject in interface DBObjectpublic void markAsPartialObject()
DBObjectmarkAsPartialObject in interface DBObject