Constructor and Description |
---|
MutableDocument()
Creates a new Document object with a new random UUID.
|
MutableDocument(Map<String,Object> data)
Initializes a new CBLDocument object with a new random UUID and the dictionary as the content.
|
MutableDocument(String id)
Creates a new Document object with the given ID.
|
MutableDocument(String id,
Map<String,Object> data)
Initializes a new Document object with a given ID and the dictionary as the content.
|
contains, count, equals, finalize, getBlob, getBoolean, getData, getDate, getDouble, getFloat, getId, getInt, getKeys, getLong, getNumber, getSequence, getString, getValue, hashCode, isDeleted, iterator, toMap, toMutable
clone, getClass, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public MutableDocument()
public MutableDocument(String id)
id
- the document ID.public MutableDocument(Map<String,Object> data)
data
- the Map objectpublic MutableDocument(String id, Map<String,Object> data)
id
- the document ID.data
- the Map objectpublic MutableDocument setData(Map<String,Object> data)
data
- the dictionary object.public MutableDocument setValue(String key, Object value)
key
- the key.value
- the object value.public MutableDocument setString(String key, String value)
public MutableDocument setNumber(String key, Number value)
public MutableDocument setInt(String key, int value)
public MutableDocument setLong(String key, long value)
public MutableDocument setFloat(String key, float value)
public MutableDocument setDouble(String key, double value)
public MutableDocument setBoolean(String key, boolean value)
public MutableDocument setBlob(String key, Blob value)
public MutableDocument setDate(String key, Date value)
public MutableDocument setArray(String key, Array value)
public MutableDocument setDictionary(String key, Dictionary value)
public MutableDocument remove(String key)
key
- the key.public MutableArray getArray(String key)
public MutableDictionary getDictionary(String key)
getDictionary
in class Document
key
- the key.public int count()
public int getInt(String key)
public long getLong(String key)
public float getFloat(String key)
public double getDouble(String key)
public boolean getBoolean(String key)
public boolean contains(String key)