Interface DocumentModel

  • All Implemented Interfaces:

    
    public interface DocumentModel
    
                        

    Document model classes must implement this interface. It adds a documentMeta property that's used by Couchbase Lite.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      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.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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