app/src/main/java/com/adroitdevs/belanja/TasksModel.java
Task updateDocument(Task task) throws ConflictException {
        DocumentRevision rev = task.getDocumentRevision();
        rev.setBody(DocumentBodyFactory.create(task.asMap()));
        try {
            DocumentRevision updated = this.mDatastore.updateDocumentFromRevision(rev);
            return Task.fromRevision(updated);
        } catch (DocumentException de) {
            return null;
        }
    }
/**
     * Updates a Task document within the datastore.
     *
     * @param task task to update.
     * @return the updated revision of the Task.
     * @throws ConflictException if the task passed in has a rev which doesn't
     *                           match the current rev in the datastore.
     */
Updates a Task document within the datastore.
@param task task to update.
@return the updated revision of the Task.
@throws ConflictException if the task passed in has a rev which doesn't
match the current rev in the datastore.
Updates a Task document within the datastore . @param task task to update . @return the updated revision of the Task . @throws ConflictException if the task passed in has a rev which doesn ' t match the current rev in the datastore .
Task updateDocument(Task task) throws ConflictException {
        DocumentRevision rev = task.getDocumentRevision();
        rev.setBody(DocumentBodyFactory.create(task.asMap()));
        try {
            DocumentRevision updated = this.mDatastore.updateDocumentFromRevision(rev);
            return Task.fromRevision(updated);
        } catch (DocumentException de) {
            return null;
        }
    }
Task updateDocument ( Task task ) throws ConflictException { DocumentRevision rev = task . getDocumentRevision ( ) ; rev . setBody ( DocumentBodyFactory . create ( task . asMap ( ) ) ) ; try { DocumentRevision updated = this . mDatastore . updateDocumentFromRevision ( rev ) ; return Task . fromRevision ( updated ) ; } catch ( DocumentException de ) { return null ; } }
Updates a Task document within the datastore.
Updates a Task document within the datastore .