package de.gecheckt.pdf.umbenenner.application.port.out;

/**
 * Sealed result type for a document master record lookup via {@link DocumentRecordRepository}.
 * <p>
 * The use case uses this result to make the per-document processing decision
 * without additional assumptions:
 * <ul>
 *   <li>{@link DocumentUnknown} — the fingerprint is not yet in the persistence store;
 *       the document must be processed for the first time.</li>
 *   <li>{@link DocumentKnownProcessable} — a master record exists but the document is
 *       not in a terminal state; normal processing may continue.</li>
 *   <li>{@link DocumentTerminalSuccess} — the document was already processed
 *       successfully; skip with {@link de.gecheckt.pdf.umbenenner.domain.model.ProcessingStatus#SKIPPED_ALREADY_PROCESSED}.</li>
 *   <li>{@link DocumentTerminalFinalFailure} — the document has finally failed; skip
 *       with {@link de.gecheckt.pdf.umbenenner.domain.model.ProcessingStatus#SKIPPED_FINAL_FAILURE}.</li>
 *   <li>{@link PersistenceLookupTechnicalFailure} — the lookup itself failed due to a
 *       technical infrastructure problem; the document cannot be processed in this run.</li>
 * </ul>
 * <p>
 * <strong>Architecture boundary:</strong> No JDBC, SQLite, or filesystem types appear
 * in this sealed hierarchy or in any of its implementations.
 *
 */
public sealed interface DocumentRecordLookupResult
        permits DocumentUnknown,
                DocumentKnownProcessable,
                DocumentTerminalSuccess,
                DocumentTerminalFinalFailure,
                PersistenceLookupTechnicalFailure {
}
