#!/usr/bin/env bash # Prints the flush settings and queue types straight from the Hibernate jar, so nothing here is quoted from prose. # Run "mvn -q dependency:resolve" first so the jar is in ~/.m2. Needs a JDK (javap). set -euo pipefail JAR=$(find "$HOME/.m2" -name 'hibernate-core-8.0.0.CR2.jar' | head -1) echo "jar: $(basename "$JAR")" javap -constants -cp "$JAR" org.hibernate.cfg.FlushSettings 2>/dev/null javap -cp "$JAR" org.hibernate.action.queue.spi.QueueType 2>/dev/null | grep 'static final .*QueueType [A-Z]*;' javap -cp "$JAR" 'org.hibernate.action.queue.spi.PlanningOptions$UniqueCycleStrategy' 2>/dev/null | grep 'static final .*UniqueCycleStrategy [A-Z_]*;' echo "legacy execution order (enum constants, in declaration order):" javap -p -cp "$JAR" 'org.hibernate.engine.spi.ActionQueueLegacy$OrderedActions' 2>/dev/null | grep -E 'OrderedActions [A-Z][A-Za-z]*;'