All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.jdbc.package-info Maven / Gradle / Ivy

There is a newer version: 6.6.2.Final
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later
 * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
 */

/**
 * A small API allowing the client of a Hibernate session to interact directly
 * with JDBC, using the same connection and transaction obtained by the session.
 * 

* {@link org.hibernate.jdbc.Work} and {@link org.hibernate.jdbc.ReturningWork} * define 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: *

    *
  • * {@link org.hibernate.SharedSessionContract#doWork(org.hibernate.jdbc.Work)} or *
  • * {@link org.hibernate.SharedSessionContract#doReturningWork(org.hibernate.jdbc.ReturningWork)}. *
*

* For example: *

 * session.doWork(connection -> {
 *     try ( PreparedStatement ps = connection.prepareStatement( " ... " ) ) {
 *         ps.execute();
 *     }
 * });
 * 
*

* The interface {@link org.hibernate.jdbc.Expectation} defines a contract for * checking the results of a JDBC operation which executes user-written SQL: *

    *
  • {@link org.hibernate.jdbc.Expectation.RowCount} is used to check returned * row counts, *
  • {@link org.hibernate.jdbc.Expectation.OutParameter} is used to check out * parameters of stored procedures, and *
  • user-written implementations of {@code Expectation} are also supported. *
* An {@code Expectation} class may be specified along with the user-written SQL * using {@link org.hibernate.annotations.SQLInsert#verify}, * {@link org.hibernate.annotations.SQLUpdate#verify}, or * {@link org.hibernate.annotations.SQLDelete#verify}. * * * @see org.hibernate.jdbc.Work * @see org.hibernate.jdbc.ReturningWork * @see org.hibernate.jdbc.Expectation */ package org.hibernate.jdbc;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy