Top Description Interfaces Classes
[default module]

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 org.hibernate.SharedSessionContract#doWork(org.hibernate.jdbc.Work) or org.hibernate.SharedSessionContract#doReturningWork(org.hibernate.jdbc.ReturningWork).

For example:

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

Interface Summary

Modifier and TypeInterface and Description
public interface
Expectation

Defines an expected DML operation outcome.

public interface
ReturningWork<T>

A discrete piece of work making use of a JDBC connection and returning a result.

public interface
Work

A discrete piece of work making use of a JDBC connection.

public interface
WorkExecutorVisitable<T>

This interface provides a way to execute unrelated "work" objects using polymorphism.

Class Summary

Modifier and TypeClass and Description
public abstract class
AbstractReturningWork<T>

An abstract implementation of ReturningWork that accepts a WorkExecutor visitor for executing a discrete piece of work and returning a result.

public abstract class
AbstractWork

An abstract implementation of Work that accepts a WorkExecutor visitor for executing a discrete piece of work.

public class
BatchedTooManyRowsAffectedException

Much like TooManyRowsAffectedException, indicates that more rows than what we were expecting were affected.

public class
BatchFailedException

Indicates a failed batch entry (-3 return).

public class
Expectations

Holds various often used Expectation definitions.

public class
TooManyRowsAffectedException

Indicates that more rows were affected then we were expecting to be.

public class
WorkExecutor<T>

A visitor used for executing a discrete piece of work encapsulated in a Work or ReturningWork instance.