Package org.hibernate.jdbc

Defines the notion of a unit of JDBC work that may be executed by the session at the request of the client.

Execution of a unit of work may be requested by calling SharedSessionContract.doWork(org.hibernate.jdbc.Work) or SharedSessionContract.doReturningWork(org.hibernate.jdbc.ReturningWork).

For example:

 session.doWork(connection -> {
     try ( PreparedStatement ps = connection.prepareStatement( " ... " ) ) {
         ps.execute();
     }
 });
 
See Also:
Work, ReturningWork, Expectation