public void setDocumentType(DocumentType type) {
        documentType = type;
    }
Sets the document type. Use only while deserializing - changing the document type after creation
has undefined behaviour.
document/src/main/java/com/yahoo/document/DocumentUpdate.java