org.hibernate.type.descriptor.ValueBinder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
JPMS Module-Info's for a few of the Jakarta Libraries just until they add them in themselves
/*
* 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 .
*/
package org.hibernate.type.descriptor;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.SQLException;
/**
* Contract for binding values to a {@link PreparedStatement}.
*
* @author Steve Ebersole
*/
public interface ValueBinder {
/**
* Bind a value to a prepared statement.
*
* @param st The prepared statement to which to bind the value.
* @param value The value to bind.
* @param index The position at which to bind the value within the prepared statement
* @param options The options.
*
* @throws SQLException Indicates a JDBC error occurred.
*/
public void bind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException;
/**
* Bind a value to a CallableStatement.
*
* @param st The prepared statement to which to bind the value.
* @param value The value to bind.
* @param name The name to bind the value within the prepared statement
* @param options The options.
*
* @throws SQLException Indicates a JDBC error occurred.
*/
public void bind(CallableStatement st, X value, String name, WrapperOptions options) throws SQLException;
}