public class

LazyWriteableDBObject

extends LazyDBObject
java.lang.Object
   ↳ org.bson.LazyBSONObject
     ↳ com.mongodb.LazyDBObject
       ↳ com.mongodb.LazyWriteableDBObject

Summary

[Expand]
Inherited Fields
From class org.bson.LazyBSONObject
Public Constructors
LazyWriteableDBObject(BSONByteBuffer buff, LazyBSONCallback cbk)
LazyWriteableDBObject(BSONByteBuffer buff, int offset, LazyBSONCallback cbk)
LazyWriteableDBObject(byte[] data, LazyBSONCallback cbk)
LazyWriteableDBObject(byte[] data, int offset, LazyBSONCallback cbk)
Public Methods
boolean containsField(String s)
Checks if this object contains a field with the given name.
Object get(String key)
Gets a field from this object by a given name.
boolean isEmpty()
Set<String> keySet()
Returns this object's fields' names
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.
[Expand]
Inherited Methods
From class com.mongodb.LazyDBObject
From class org.bson.LazyBSONObject
From class java.lang.Object
From interface com.mongodb.DBObject
From interface org.bson.BSONObject

Public Constructors

public LazyWriteableDBObject (BSONByteBuffer buff, LazyBSONCallback cbk)

public LazyWriteableDBObject (BSONByteBuffer buff, int offset, LazyBSONCallback cbk)

public LazyWriteableDBObject (byte[] data, LazyBSONCallback cbk)

public LazyWriteableDBObject (byte[] data, int offset, LazyBSONCallback cbk)

Public Methods

public boolean containsField (String s)

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

public Object get (String key)

Gets a field from this object by a given name.

Parameters
key The name of the field fetch
Returns
  • The field, if found

public boolean isEmpty ()

public Set<String> keySet ()

Returns this object's fields' names

Returns
  • the set of all keys in the document

public Object put (String key, Object v)

Sets a name/value pair in this object.

Parameters
key Name to set
v Corresponding value
Returns
  • v

public void putAll (BSONObject o)

Sets all key/value pairs from an object into this object

Parameters
o the object

public void putAll (Map m)

Sets all key/value pairs from a map into this object

Parameters
m the map

public Object removeField (String key)

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