diff --git a/hibernate-core/src/main/java/org/hibernate/sql/exec/spi/AbstractJdbcOperationQuery.java b/hibernate-core/src/main/java/org/hibernate/sql/exec/spi/AbstractJdbcOperationQuery.java index 3d1082712b..b99c3e863d 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/exec/spi/AbstractJdbcOperationQuery.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/exec/spi/AbstractJdbcOperationQuery.java @@ -98,6 +98,11 @@ public class AbstractJdbcOperationQuery implements JdbcOperationQuery { return !appliedParameters.isEmpty(); } + @Override + public Map getAppliedParameters() { + return appliedParameters; + } + @Override public boolean isCompatibleWith(JdbcParameterBindings jdbcParameterBindings, QueryOptions queryOptions) { if ( !appliedParameters.isEmpty() ) { diff --git a/hibernate-core/src/main/java/org/hibernate/sql/exec/spi/JdbcOperationQuery.java b/hibernate-core/src/main/java/org/hibernate/sql/exec/spi/JdbcOperationQuery.java index 3988f61c80..0c688c577b 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/exec/spi/JdbcOperationQuery.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/exec/spi/JdbcOperationQuery.java @@ -7,10 +7,12 @@ package org.hibernate.sql.exec.spi; import java.util.Collections; +import java.util.Map; import java.util.Set; import org.hibernate.internal.FilterJdbcParameter; import org.hibernate.query.spi.QueryOptions; +import org.hibernate.sql.ast.tree.expression.JdbcParameter; /** * Unifying contract for any SQL statement we want to execute via JDBC. @@ -42,5 +44,10 @@ public interface JdbcOperationQuery extends JdbcOperation { */ boolean dependsOnParameterBindings(); + /** + * The parameters which were inlined into the query as literals. + */ + Map getAppliedParameters(); + boolean isCompatibleWith(JdbcParameterBindings jdbcParameterBindings, QueryOptions queryOptions); }