|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mongodb.RawDBObject
public class RawDBObject
This object wraps the binary object format ("BSON") used for the transport of serialized objects to / from the Mongo database.
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public Object get(String key)
BSONObject
get
in interface BSONObject
key
- The name of the field fetch
public Map toMap()
BSONObject
toMap
in interface BSONObject
public Object put(String key, Object v)
BSONObject
put
in interface BSONObject
key
- Name to setv
- Corresponding value
public void putAll(BSONObject o)
BSONObject
putAll
in interface BSONObject
o
- the objectpublic void putAll(Map m)
BSONObject
putAll
in interface BSONObject
m
- the mappublic Object removeField(String key)
BSONObject
removeField
in interface BSONObject
key
- The name of the field to remove
@Deprecated public boolean containsKey(String key)
BSONObject
containsKey
in interface BSONObject
public boolean containsField(String field)
BSONObject
containsField
in interface BSONObject
field
- Field name for which to check
public Set<String> keySet()
BSONObject
keySet
in interface BSONObject
public boolean isPartialObject()
DBObject
isPartialObject
in interface DBObject
public void markAsPartialObject()
DBObject
markAsPartialObject
in interface DBObject
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |