Execution of a unit of work may be requested by calling
org. or
org..
For example:
session.doWork(connection -> {
try ( PreparedStatement ps = connection.prepareStatement( " ... " ) ) {
ps.execute();
}
});
org.hibernate.jdbc.Work , org.hibernate.jdbc.ReturningWork , org.hibernate.jdbc.Expectation
| Modifier and Type | Interface and Description |
|---|---|
| public interface | Expectation
Defines an expected DML operation outcome. |
| public interface | |
| 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. |
| Modifier and Type | Class and Description |
|---|---|
| public abstract class | AbstractReturningWork<T>
An abstract implementation of |
| public abstract class | AbstractWork
An abstract implementation of |
| public class | BatchedTooManyRowsAffectedException
Much like |
| public class | BatchFailedException
Indicates a failed batch entry (-3 return). |
| public class | Expectations
Holds various often used |
| 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
|