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

import java.util.Objects;

/**
 * Lookup result indicating that a master record exists and the document is not yet terminal.
 * <p>
 * The document is known (fingerprint exists in the persistence store) but its overall
 * status is neither {@link de.gecheckt.pdf.umbenenner.domain.model.ProcessingStatus#SUCCESS}
 * nor {@link de.gecheckt.pdf.umbenenner.domain.model.ProcessingStatus#FAILED_FINAL}.
 * The use case may continue with normal processing using the provided record.
 * <p>
 * The existing {@link DocumentRecord} is supplied so the use case can inspect the
 * current status, failure counters, and other fields required to apply retry rules
 * without an additional lookup.
 *
 * @param record the current master record for this document; never null
 */
public record DocumentKnownProcessable(DocumentRecord record) implements DocumentRecordLookupResult {

    /**
     * Compact constructor validating the non-null contract.
     *
     * @throws NullPointerException if {@code record} is null
     */
    public DocumentKnownProcessable {
        Objects.requireNonNull(record, "record must not be null");
    }
}
