Some methods returning org.hibernate.query.Query are not defined for StatelessSession

Description

There are some methods returning org.hibernate.query.Query that are available to Session, but not StatelessSession.

I'm looking into moving the following non-JPA methods from Session into SharedSessionContract, so they are available to both Session and StatelessSession:

In addition, the following method should be copied into StatelessSession (it can't be moved up to SharedSessionContract because it conflicts with a default method in QueryProducerImplementor):

Also, at this point, org.hibernate.query.Query is stable enough that we can remove @Incubating. That will clarify that references to org.hibernate.Query should be changed to org.hibernate.query.Query.

Note that the following do not need to be added because they are already declared in QueryProducer:

--------------------------------------------------------------------------------------------------------------------------------------

Background:

In 5.2:

  • org.hibernate.query.Query was introduced, annotated with @Incubating;

  • org.hibernate.Query was deprecated, indicating that org.hibernate.query.Query should be used instead;

  • references to org.hibernate.Query were changed to org.hibernate.query.Query in the user guide.

The documentation for @Incubating says:

This causes a dilemma about whether applications should migrate from the old API to the new class.

Environment

None

Assignee

Gail Badner

Reporter

Gail Badner

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure