Class SimpleDocumentVersion

    • Constructor Detail

      • SimpleDocumentVersion

        public SimpleDocumentVersion​(SimpleDocument documentVersion,
                                     HistorisedDocument masterVersion)
        The default constructor of a simple document version.
        Parameters:
        documentVersion - the original version.
        masterVersion -
    • Method Detail

      • getVersionMaster

        public HistorisedDocument getVersionMaster()
        Description copied from class: SimpleDocument
        Returns the master of versioned document. If not versionned, it returns itself. If versioned, it returns the master of versioned document (the last created or updated in other words).
        Overrides:
        getVersionMaster in class SimpleDocument
        Returns:
        the master version of this document.
      • getRealVersionPk

        public SimpleDocumentPK getRealVersionPk()
        Gets the real value of the PK of the version and not the one of the head version.
        Returns:
        the historised PK value of the historised version.
      • getRealVersionForeignId

        public String getRealVersionForeignId()
        Gets the real value of the foreign identifier of the version and not the one of the head version.
        Returns:
        the historised foreign identifier value of the historised version.
      • isVersioned

        public boolean isVersioned()
        Description copied from interface: Attachment
        Is this attachment versioned? A document is versioned if each change is historized and comes to a new minor or major version.
        Specified by:
        isVersioned in interface Attachment
        Overrides:
        isVersioned in class SimpleDocument
        Returns:
        true if this attachment is versioned, false otherwise.
      • getLastPublicVersion

        public SimpleDocument getLastPublicVersion()
        Description copied from class: SimpleDocument
        Returns the more recent public version of this document - null if none exists.
        Overrides:
        getLastPublicVersion in class SimpleDocument
        Returns:
        the more recent public version of this document - null if none exists.