Skip to content

Commit bb0be44

Browse files
sebersolegavinking
authored andcommitted
HHH-19382 - Drop incubating SelectionQuery#setOrder methods
1 parent cb7b02b commit bb0be44

25 files changed

+319
-380
lines changed

hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureCallImpl.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import org.hibernate.query.BindableType;
4545
import org.hibernate.query.KeyedPage;
4646
import org.hibernate.query.KeyedResultList;
47-
import org.hibernate.query.Order;
4847
import org.hibernate.query.OutputableType;
4948
import org.hibernate.query.Query;
5049
import org.hibernate.query.QueryParameter;
@@ -411,16 +410,6 @@ public QueryParameterBindings getParameterBindings() {
411410
return parameterBindings;
412411
}
413412

414-
@Override
415-
public Query<R> setOrder(List<? extends Order<? super R>> orderList) {
416-
throw new UnsupportedOperationException("Ordering not supported for stored procedure calls");
417-
}
418-
419-
@Override
420-
public Query<R> setOrder(Order<? super R> order) {
421-
throw new UnsupportedOperationException("Ordering not supported for stored procedure calls");
422-
}
423-
424413

425414
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
426415
// Parameter registrations

hibernate-core/src/main/java/org/hibernate/query/Order.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* <p>
2020
* This is a convenience class which allows query result ordering rules to be
2121
* passed around the system before being applied to a {@link Query} by calling
22-
* {@link org.hibernate.query.programmatic.SelectionSpecification#sort(Order)}.
22+
* {@link org.hibernate.query.specification.SelectionSpecification#sort(Order)}.
2323
* <pre>
2424
* SelectionSpecification.create(Book.class,
2525
* "from Book b join b.authors a where a.name = :name")
@@ -30,7 +30,7 @@
3030
* </pre>
3131
* <p>
3232
* {@code Order}s may be stacked using {@link List#of} and
33-
* {@link org.hibernate.query.programmatic.SelectionSpecification#resort(List)}.
33+
* {@link org.hibernate.query.specification.SelectionSpecification#resort(List)}.
3434
* <pre>
3535
* SelectionSpecification.create(Book.class,
3636
* "from Book b join b.authors a where a.name = :name")
@@ -51,8 +51,8 @@
5151
* used by Hibernate Data Repositories to implement Jakarta Data
5252
* query methods.
5353
*
54-
* @see org.hibernate.query.programmatic.SelectionSpecification#sort(Order)
55-
* @see org.hibernate.query.programmatic.SelectionSpecification#resort(List)
54+
* @see org.hibernate.query.specification.SelectionSpecification#sort(Order)
55+
* @see org.hibernate.query.specification.SelectionSpecification#resort(List)
5656
* @see org.hibernate.query.restriction.Restriction
5757
*
5858
* @author Gavin King

hibernate-core/src/main/java/org/hibernate/query/Query.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -928,11 +928,6 @@ default Query<R> setPage(Page page) {
928928
@Override
929929
Query<R> setLockMode(LockModeType lockMode);
930930

931-
@Override @Incubating
932-
Query<R> setOrder(List<? extends Order<? super R>> orderList);
933-
934-
@Override @Incubating
935-
Query<R> setOrder(Order<? super R> order);
936931

937932
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
938933
// deprecated methods

hibernate-core/src/main/java/org/hibernate/query/SelectionQuery.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -596,32 +596,6 @@ default Stream<R> stream() {
596596
*/
597597
SelectionQuery<R> setLockMode(String alias, LockMode lockMode);
598598

599-
/**
600-
* If the result type of this query is an entity class, add one or more
601-
* {@linkplain Order rules} for ordering the query results.
602-
*
603-
* @param orderList one or more instances of {@link Order}
604-
*
605-
* @see Order
606-
*
607-
* @since 6.3
608-
*/
609-
@Incubating
610-
SelectionQuery<R> setOrder(List<? extends Order<? super R>> orderList);
611-
612-
/**
613-
* If the result type of this query is an entity class, add a
614-
* {@linkplain Order rule} for ordering the query results.
615-
*
616-
* @param order an instance of {@link Order}
617-
*
618-
* @see Order
619-
*
620-
* @since 6.3
621-
*/
622-
@Incubating
623-
SelectionQuery<R> setOrder(Order<? super R> order);
624-
625599
/**
626600
* Specifies whether follow-on locking should be applied
627601
*/

hibernate-core/src/main/java/org/hibernate/query/programmatic/package-info.java

Lines changed: 0 additions & 12 deletions
This file was deleted.

hibernate-core/src/main/java/org/hibernate/query/restriction/Restriction.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
/**
2121
* A rule for restricting query results. This allows restrictions to be added to
22-
* a {@link org.hibernate.query.programmatic.SelectionSpecification} by calling
23-
* {@link org.hibernate.query.programmatic.SelectionSpecification#restrict(Restriction)}.
22+
* a {@link org.hibernate.query.specification.SelectionSpecification} by calling
23+
* {@link org.hibernate.query.specification.SelectionSpecification#restrict(Restriction)}.
2424
* <pre>
2525
* SelectionSpecification.create(Book.class)
2626
* .restrict(Restriction.like(Book_.title, "%Hibernate%", false))
@@ -47,9 +47,9 @@
4747
* is used by Hibernate Data Repositories to implement Jakarta Data
4848
* query methods.
4949
*
50-
* @see org.hibernate.query.programmatic.SelectionSpecification
51-
* @see org.hibernate.query.programmatic.MutationSpecification
52-
* @see org.hibernate.query.programmatic.QuerySpecification#restrict(Restriction)
50+
* @see org.hibernate.query.specification.SelectionSpecification
51+
* @see org.hibernate.query.specification.MutationSpecification
52+
* @see org.hibernate.query.specification.QuerySpecification#restrict(Restriction)
5353
*
5454
* @see Path
5555
* @see Order

hibernate-core/src/main/java/org/hibernate/query/programmatic/MutationSpecification.java renamed to hibernate-core/src/main/java/org/hibernate/query/specification/MutationSpecification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* SPDX-License-Identifier: Apache-2.0
33
* Copyright Red Hat Inc. and Hibernate Authors
44
*/
5-
package org.hibernate.query.programmatic;
5+
package org.hibernate.query.specification;
66

77
import jakarta.persistence.criteria.CommonAbstractCriteria;
88
import jakarta.persistence.criteria.CriteriaUpdate;
@@ -14,7 +14,7 @@
1414
import org.hibernate.StatelessSession;
1515
import org.hibernate.query.IllegalMutationQueryException;
1616
import org.hibernate.query.MutationQuery;
17-
import org.hibernate.query.programmatic.internal.MutationSpecificationImpl;
17+
import org.hibernate.query.specification.internal.MutationSpecificationImpl;
1818
import org.hibernate.query.restriction.Restriction;
1919

2020
/**

hibernate-core/src/main/java/org/hibernate/query/programmatic/QuerySpecification.java renamed to hibernate-core/src/main/java/org/hibernate/query/specification/QuerySpecification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* SPDX-License-Identifier: Apache-2.0
33
* Copyright Red Hat Inc. and Hibernate Authors
44
*/
5-
package org.hibernate.query.programmatic;
5+
package org.hibernate.query.specification;
66

77
import jakarta.persistence.EntityManager;
88
import jakarta.persistence.criteria.CriteriaBuilder;

hibernate-core/src/main/java/org/hibernate/query/programmatic/SelectionSpecification.java renamed to hibernate-core/src/main/java/org/hibernate/query/specification/SelectionSpecification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* SPDX-License-Identifier: Apache-2.0
33
* Copyright Red Hat Inc. and Hibernate Authors
44
*/
5-
package org.hibernate.query.programmatic;
5+
package org.hibernate.query.specification;
66

77
import jakarta.persistence.EntityManager;
88
import jakarta.persistence.criteria.CriteriaQuery;
@@ -15,7 +15,7 @@
1515
import org.hibernate.query.IllegalSelectQueryException;
1616
import org.hibernate.query.Order;
1717
import org.hibernate.query.SelectionQuery;
18-
import org.hibernate.query.programmatic.internal.SelectionSpecificationImpl;
18+
import org.hibernate.query.specification.internal.SelectionSpecificationImpl;
1919
import org.hibernate.query.restriction.Path;
2020
import org.hibernate.query.restriction.Restriction;
2121

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* SPDX-License-Identifier: Apache-2.0
33
* Copyright Red Hat Inc. and Hibernate Authors
44
*/
5-
package org.hibernate.query.programmatic.internal;
5+
package org.hibernate.query.specification.internal;
66

77
import jakarta.persistence.EntityManager;
88
import jakarta.persistence.criteria.CriteriaBuilder;
@@ -15,7 +15,7 @@
1515
import org.hibernate.SharedSessionContract;
1616
import org.hibernate.StatelessSession;
1717
import org.hibernate.engine.spi.SharedSessionContractImplementor;
18-
import org.hibernate.query.programmatic.MutationSpecification;
18+
import org.hibernate.query.specification.MutationSpecification;
1919
import org.hibernate.query.IllegalMutationQueryException;
2020
import org.hibernate.query.MutationQuery;
2121
import org.hibernate.query.restriction.Restriction;

0 commit comments

Comments
 (0)