diff --git a/hibernate-core/src/main/java/org/hibernate/procedure/ProcedureCallMemento.java b/hibernate-core/src/main/java/org/hibernate/procedure/ProcedureCallMemento.java index 24bd793c5b72..d6d941378241 100644 --- a/hibernate-core/src/main/java/org/hibernate/procedure/ProcedureCallMemento.java +++ b/hibernate-core/src/main/java/org/hibernate/procedure/ProcedureCallMemento.java @@ -8,6 +8,8 @@ import java.util.Map; +import org.hibernate.Session; +import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; /** @@ -16,6 +18,28 @@ * @author Steve Ebersole */ public interface ProcedureCallMemento { + /** + * Convert the memento back into an executable (connected) form. + * + * @param session The session to connect the procedure call to + * + * @return The executable call + */ + default ProcedureCall makeProcedureCall(Session session) { + return makeProcedureCall( (SharedSessionContractImplementor) session ); + } + + /** + * Convert the memento back into an executable (connected) form. + * + * @param session The session to connect the procedure call to + * + * @return The executable call + */ + default ProcedureCall makeProcedureCall(SessionImplementor session) { + return makeProcedureCall( (SharedSessionContractImplementor) session ); + } + /** * Convert the memento back into an executable (connected) form. *