Class ReprintableSourceDocument<D extends BaseOBObject & ClientEnabled & OrganizationEnabled>

    • Constructor Detail

      • ReprintableSourceDocument

        protected ReprintableSourceDocument​(String id)
        Builds a new source document for a ReprintableDocument
        Parameters:
        id - the ID of the source document
    • Method Detail

      • newSourceDocument

        public static ReprintableSourceDocument<?> newSourceDocument​(String id,
                                                                     ReprintableSourceDocument.DocumentType documentType)
        Retrieves a ReprintableSourceDocument instance with the information of the document identified by the provided ID and document type.
        Parameters:
        id - The ID of the BaseOBObject of the source document
        documentType - The type of source document
        Returns:
        the source document with the information of the document referenced by the given parameters
      • getName

        protected abstract String getName()
        Returns:
        a name that identifies the document
      • getId

        protected String getId()
      • exists

        public boolean exists()
        Returns:
        true if the document exists in the database or false otherwise
      • getReprintableDocument

        public Optional<ReprintableDocument> getReprintableDocument()
        Returns:
        an Optional representing the ReprintableDocument linked to the document. If the document does not have a ReprintableDocument linked to it, an empty Optional is returned.