feat(document): add undatedOnly Specification for the undated-only filter
undatedOnly(false) is a no-op (null predicate); undatedOnly(true) returns documentDate IS NULL, matching the existing hasStatus null-as-no-op pattern. Real-Postgres tests pin the load-bearing guarantees H2 cannot prove: ASC NULLS-LAST ordering, BETWEEN excludes null-dated rows, and that undated=true combined with a from/to range returns empty (the collision rule). Refs #668
This commit is contained in:
@@ -55,6 +55,12 @@ public class DocumentSpecifications {
|
||||
return (root, query, cb) -> status == null ? null : cb.equal(root.get("status"), status);
|
||||
}
|
||||
|
||||
// Filtert auf undatierte Dokumente (meta_date IS NULL) — für die "Nur undatierte"-Triage.
|
||||
// false → kein Prädikat (no-op), true → documentDate IS NULL (issue #668).
|
||||
public static Specification<Document> undatedOnly(boolean undated) {
|
||||
return (root, query, cb) -> undated ? cb.isNull(root.get("documentDate")) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filtert nach vorausgeweiteten Tag-ID-Sets mit AND- oder OR-Logik.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user