diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionDelegatorBaseImpl.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionDelegatorBaseImpl.java index 441f3d63e8..adc4f8c69b 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionDelegatorBaseImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionDelegatorBaseImpl.java @@ -42,7 +42,6 @@ import org.hibernate.jdbc.ReturningWork; import org.hibernate.jdbc.Work; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.procedure.ProcedureCall; -import org.hibernate.query.MutationNativeQuery; import org.hibernate.query.MutationQuery; import org.hibernate.query.SelectionQuery; import org.hibernate.query.criteria.HibernateCriteriaBuilder; @@ -551,7 +550,7 @@ public class SessionDelegatorBaseImpl implements SessionImplementor { } @Override - public MutationNativeQuery createNativeMutationQuery(String sqlString) { + public MutationQuery createNativeMutationQuery(String sqlString) { return delegate.createNativeMutationQuery( sqlString ); } diff --git a/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java b/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java index 0497ba3791..7162e46f10 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java @@ -54,7 +54,6 @@ import org.hibernate.procedure.spi.NamedCallableQueryMemento; import org.hibernate.query.IllegalMutationQueryException; import org.hibernate.query.IllegalNamedQueryOptionsException; import org.hibernate.query.JpaQuery; -import org.hibernate.query.MutationNativeQuery; import org.hibernate.query.MutationQuery; import org.hibernate.query.SelectionQuery; import org.hibernate.query.UnknownNamedQueryException; @@ -976,7 +975,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont } @Override - public MutationNativeQuery createNativeMutationQuery(String sqlString) { + public MutationQuery createNativeMutationQuery(String sqlString) { final NativeQueryImplementor> query = createNativeQuery( sqlString ); if ( query.isSelectQuery() == TRUE ) { throw new IllegalMutationQueryException( "Expecting a native mutation query, but found `" + sqlString + "`" ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/MutationNativeQuery.java b/hibernate-core/src/main/java/org/hibernate/query/MutationNativeQuery.java deleted file mode 100644 index 029670a57c..0000000000 --- a/hibernate-core/src/main/java/org/hibernate/query/MutationNativeQuery.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later - * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html - */ -package org.hibernate.query; - -import java.time.Instant; -import java.util.Calendar; -import java.util.Collection; -import java.util.Date; -import java.util.Map; - -import org.hibernate.FlushMode; - -import jakarta.persistence.Parameter; -import jakarta.persistence.TemporalType; - -/** - * @author Steve Ebersole - */ -public interface MutationNativeQuery extends MutationQuery { - @Override - MutationNativeQuery setParameter(String name, Object value); - - @Override -
MutationNativeQuery setParameter(String name, P value, Class
type); - - @Override -
MutationNativeQuery setParameter(String name, P value, BindableType
type); - - @Override - MutationNativeQuery setParameter(String name, Instant value, TemporalType temporalType); - - @Override - MutationNativeQuery setParameter(String name, Calendar value, TemporalType temporalType); - - @Override - MutationNativeQuery setParameter(String name, Date value, TemporalType temporalType); - - @Override - MutationNativeQuery setParameter(int position, Object value); - - @Override -
MutationNativeQuery setParameter(int position, P value, Class
type); - - @Override -
MutationNativeQuery setParameter(int position, P value, BindableType
type);
-
- @Override
- MutationNativeQuery setParameter(int position, Instant value, TemporalType temporalType);
-
- @Override
- MutationNativeQuery setParameter(int position, Date value, TemporalType temporalType);
-
- @Override
- MutationNativeQuery setParameter(int position, Calendar value, TemporalType temporalType);
-
- @Override
- MutationNativeQuery setParameter(QueryParameter parameter, P value, Class type);
-
- @Override
- MutationNativeQuery setParameter(QueryParameter parameter, P val, BindableType type);
-
- @Override
- MutationNativeQuery setParameterList(String name, Collection extends P> values, Class javaType);
-
- @Override
- MutationNativeQuery setParameterList(String name, Collection extends P> values, BindableType type);
-
- @Override
- MutationNativeQuery setParameterList(String name, Object[] values);
-
- @Override
- MutationNativeQuery setParameterList(String name, P[] values, Class javaType);
-
- @Override
- MutationNativeQuery setParameterList(String name, P[] values, BindableType type);
-
- @Override
- MutationNativeQuery setParameterList(int position, @SuppressWarnings("rawtypes") Collection values);
-
- @Override
- MutationNativeQuery setParameterList(int position, Collection extends P> values, Class javaType);
-
- @Override
- MutationNativeQuery setParameterList(int position, Collection extends P> values, BindableType type);
-
- @Override
- MutationNativeQuery setParameterList(int position, Object[] values);
-
- @Override
- MutationNativeQuery setParameterList(int position, P[] values, Class javaType);
-
- @Override
- MutationNativeQuery setParameterList(int position, P[] values, BindableType type);
-
- @Override
- MutationNativeQuery setParameterList(QueryParameter parameter, Collection extends P> values);
-
- @Override
- MutationNativeQuery setParameterList(QueryParameter parameter, Collection extends P> values, Class javaType);
-
- @Override
- MutationNativeQuery setParameterList(QueryParameter parameter, Collection extends P> values, BindableType type);
-
- @Override
- MutationNativeQuery setParameterList(QueryParameter parameter, P[] values);
-
- @Override
- MutationNativeQuery setParameterList(QueryParameter parameter, P[] values, Class javaType);
-
- @Override
- MutationNativeQuery setParameterList(QueryParameter parameter, P[] values, BindableType type);
-
- @Override
- MutationNativeQuery setProperties(Object bean);
-
- @Override
- MutationNativeQuery setProperties(Map bean);
-
- @Override
- MutationNativeQuery setHibernateFlushMode(FlushMode flushMode);
-
- @Override
- MutationNativeQuery setTimeout(int timeout);
-}
diff --git a/hibernate-core/src/main/java/org/hibernate/query/NativeQuery.java b/hibernate-core/src/main/java/org/hibernate/query/NativeQuery.java
index 284456842f..6b723ff07f 100644
--- a/hibernate-core/src/main/java/org/hibernate/query/NativeQuery.java
+++ b/hibernate-core/src/main/java/org/hibernate/query/NativeQuery.java
@@ -62,7 +62,7 @@ import org.hibernate.type.BasicTypeReference;
* @author Gavin King
* @author Steve Ebersole
*/
-public interface NativeQuery