Skip to content

Commit 4fc8590

Browse files
committed
HHH-19364 change links in javadoc to point to new APIs
1 parent 83fca9f commit 4fc8590

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,25 @@
1818
/**
1919
* A rule for sorting a query result set.
2020
* <p>
21-
* This is a convenience class which allows query result ordering
22-
* rules to be passed around the system before being applied to
23-
* a {@link Query} by calling {@link SelectionQuery#setOrder(Order)}.
21+
* This is a convenience class which allows query result ordering rules to be
22+
* passed around the system before being applied to a {@link Query} by calling
23+
* {@link org.hibernate.query.programmatic.SelectionSpecification#sort(Order)}.
2424
* <pre>
25-
* session.createSelectionQuery("from Book b join b.authors a where a.name = :name", Book.class)
25+
* SelectionSpecification.create(Book.class,
26+
* "from Book b join b.authors a where a.name = :name")
27+
* .sort(asc(Book_.publicationDate))
28+
* .createQuery(session)
2629
* .setParameter("name", authorName)
27-
* .setOrder(asc(Book_.publicationDate))
2830
* .getResultList();
2931
* </pre>
3032
* <p>
3133
* {@code Order}s may be stacked using {@link List#of} and
32-
* {@link SelectionQuery#setOrder(List)}.
34+
* {@link org.hibernate.query.programmatic.SelectionSpecification#resort(List)}.
3335
* <pre>
34-
* session.createSelectionQuery("from Book b join b.authors a where a.name = :name", Book.class)
36+
* SelectionSpecification.create(Book.class,
37+
* "from Book b join b.authors a where a.name = :name")
38+
* .sort(List.of(asc(Book_.publicationDate), desc(Book_.ssn)))
3539
* .setParameter("name", authorName)
36-
* .setOrder(List.of(asc(Book_.publicationDate), desc(Book_.ssn)))
3740
* .getResultList();
3841
* </pre>
3942
* <p>
@@ -49,8 +52,8 @@
4952
* used by Hibernate Data Repositories to implement Jakarta Data
5053
* query methods.
5154
*
52-
* @see SelectionQuery#setOrder(Order)
53-
* @see SelectionQuery#setOrder(java.util.List)
55+
* @see org.hibernate.query.programmatic.SelectionSpecification#sort(Order)
56+
* @see org.hibernate.query.programmatic.SelectionSpecification#resort(List)
5457
* @see org.hibernate.query.restriction.Restriction
5558
*
5659
* @author Gavin King

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import org.hibernate.StatelessSession;
1515
import org.hibernate.query.IllegalMutationQueryException;
1616
import org.hibernate.query.MutationQuery;
17-
import org.hibernate.query.SelectionQuery;
1817
import org.hibernate.query.programmatic.internal.MutationSpecificationImpl;
1918
import org.hibernate.query.restriction.Restriction;
2019

@@ -28,7 +27,7 @@
2827
* kinds.
2928
* <p>
3029
* Once all {@linkplain #restrict restrictions} are specified, call
31-
* {@link #createQuery createQuery()} to obtain an {@linkplain SelectionQuery
30+
* {@link #createQuery createQuery()} to obtain an {@linkplain MutationQuery
3231
* executable mutation query object}.
3332
*
3433
* @param <T> The entity type which is the target of the mutation.

0 commit comments

Comments
 (0)