Interface DocumentModel
-
- All Implemented Interfaces:
public interface DocumentModelDocument model classes must implement this interface. It adds a documentMeta property that's used by Couchbase Lite.
-
-
Method Summary
Modifier and Type Method Description abstract DocumentMetagetDocumentMeta()This tags the model instance with the document ID and revision it was read from, which enables conflict detection when it's later saved. abstract UnitsetDocumentMeta(@Transient() DocumentMeta documentMeta)This tags the model instance with the document ID and revision it was read from, which enables conflict detection when it's later saved. -
-
Method Detail
-
getDocumentMeta
abstract DocumentMeta getDocumentMeta()
This tags the model instance with the document ID and revision it was read from, which enables conflict detection when it's later saved. You may read this property, but DO NOT alter it. It should be implemented as a stored property defaulting to
null, for example:@Transient override var documentMeta: DocumentMeta? = null
-
setDocumentMeta
abstract Unit setDocumentMeta(@Transient() DocumentMeta documentMeta)
This tags the model instance with the document ID and revision it was read from, which enables conflict detection when it's later saved. You may read this property, but DO NOT alter it. It should be implemented as a stored property defaulting to
null, for example:@Transient override var documentMeta: DocumentMeta? = null
-
-
-
-