diff --git a/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/ReactiveActionQueue.java b/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/ReactiveActionQueue.java index 250901abf..66f1730f1 100644 --- a/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/ReactiveActionQueue.java +++ b/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/ReactiveActionQueue.java @@ -29,6 +29,7 @@ import org.hibernate.action.spi.Executable; import org.hibernate.cache.CacheException; import org.hibernate.engine.spi.ActionQueue; +import org.hibernate.engine.spi.ComparableExecutable; import org.hibernate.engine.spi.EntityEntry; import org.hibernate.engine.spi.ExecutableList; import org.hibernate.engine.spi.SessionFactoryImplementor; @@ -203,7 +204,7 @@ public void ensureInitialized(ReactiveActionQueue instance) { } }; - public abstract > ExecutableList getActions(ReactiveActionQueue instance); + public abstract ExecutableList getActions(ReactiveActionQueue instance); public abstract void ensureInitialized(ReactiveActionQueue instance); } @@ -1332,17 +1333,4 @@ private boolean hasParent(BatchIdentifier batchIdentifier, List } - private abstract static class ListProvider & Serializable> { - abstract ExecutableList get(ReactiveActionQueue instance); - - abstract ExecutableList init(ReactiveActionQueue instance); - - ExecutableList getOrInit(ReactiveActionQueue instance) { - ExecutableList list = get( instance ); - if ( list == null ) { - list = init( instance ); - } - return list; - } - } } diff --git a/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/impl/ReactiveEntityInsertAction.java b/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/impl/ReactiveEntityInsertAction.java index 2b196804d..ef48ba006 100644 --- a/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/impl/ReactiveEntityInsertAction.java +++ b/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/impl/ReactiveEntityInsertAction.java @@ -12,6 +12,7 @@ import org.hibernate.engine.internal.NonNullableTransientDependencies; import org.hibernate.engine.internal.Nullability; import org.hibernate.engine.internal.Versioning; +import org.hibernate.engine.spi.ComparableExecutable; import org.hibernate.engine.spi.EntityKey; import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; @@ -28,7 +29,7 @@ * * @see org.hibernate.action.internal.AbstractEntityInsertAction */ -public interface ReactiveEntityInsertAction extends ReactiveExecutable { +public interface ReactiveEntityInsertAction extends ReactiveExecutable, ComparableExecutable { boolean isEarlyInsert(); NonNullableTransientDependencies findNonNullableTransientEntities(); SharedSessionContractImplementor getSession(); diff --git a/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/impl/ReactiveEntityInsertActionHolder.java b/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/impl/ReactiveEntityInsertActionHolder.java index 352981ea7..9cfff7f3b 100644 --- a/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/impl/ReactiveEntityInsertActionHolder.java +++ b/hibernate-reactive-core/src/main/java/org/hibernate/reactive/engine/impl/ReactiveEntityInsertActionHolder.java @@ -13,10 +13,11 @@ import org.hibernate.action.spi.AfterTransactionCompletionProcess; import org.hibernate.action.spi.BeforeTransactionCompletionProcess; import org.hibernate.action.spi.Executable; +import org.hibernate.engine.spi.ComparableExecutable; import org.hibernate.event.spi.EventSource; import org.hibernate.reactive.engine.ReactiveExecutable; -public final class ReactiveEntityInsertActionHolder implements Executable, ReactiveExecutable, Comparable, +public final class ReactiveEntityInsertActionHolder implements Executable, ReactiveExecutable, ComparableExecutable, Serializable { private final ReactiveEntityInsertAction delegate; @@ -26,11 +27,6 @@ public ReactiveEntityInsertActionHolder(ReactiveEntityInsertAction delegate) { this.delegate = delegate; } - @Override - public int compareTo(ReactiveEntityInsertActionHolder o) { - return delegate.compareActionTo( o.delegate ); - } - @Override public Serializable[] getPropertySpaces() { return delegate.getPropertySpaces(); @@ -69,4 +65,19 @@ public CompletionStage reactiveExecute() { public ReactiveEntityInsertAction getDelegate() { return delegate; } + + @Override + public String getPrimarySortClassifier() { + return delegate.getPrimarySortClassifier(); + } + + @Override + public Object getSecondarySortIndex() { + return delegate.getSecondarySortIndex(); + } + + @Override + public int compareTo(final ComparableExecutable o) { + return delegate.compareTo( o ); + } }