diff --git a/hibernate-core/src/main/java/org/hibernate/query/MutationQuery.java b/hibernate-core/src/main/java/org/hibernate/query/MutationQuery.java index e1b814893d..093247fd16 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/MutationQuery.java +++ b/hibernate-core/src/main/java/org/hibernate/query/MutationQuery.java @@ -19,9 +19,9 @@ import jakarta.persistence.Parameter; import jakarta.persistence.TemporalType; /** - * Models a mutation (insert, update and delete) query. It is a slimmed + * Models a mutation (insert, update, or delete) query. It is a slimmed * down version of {@link Query}, but providing only methods relevant to - * mutation queries + * mutation queries. * * @author Steve Ebersole */ diff --git a/hibernate-core/src/main/java/org/hibernate/query/Query.java b/hibernate-core/src/main/java/org/hibernate/query/Query.java index df53aacc27..9f846b01ee 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/Query.java +++ b/hibernate-core/src/main/java/org/hibernate/query/Query.java @@ -37,15 +37,33 @@ import jakarta.persistence.TemporalType; import jakarta.persistence.TypedQuery; /** - * Represents an HQL or Criteria query. - * - * Hibernate extension of {@link TypedQuery}, adapting to the - * {@link org.hibernate.query.CommonQueryContract} hierarchy + * Represents a {@link jakarta.persistence.criteria.CriteriaBuilder criteria query} + * or a query written in HQL. The subtype {@link NativeQuery} represents a query + * written in native SQL. + *
+ * This type simply mixes {@link TypedQuery} defined by JPA with {@link SelectionQuery} + * and {@link MutationQuery}. Unfortunately, JPA does not distinguish between + * {@link SelectionQuery selection queries} and {@link MutationQuery mutation queries}, + * so we lose that distinction here. However, every {@code Query} may logically be + * classified as one or the other. + *
+ * A {@code Query} controls how a query is executed, and allows arguments to be + * bound to its parameters. + *