org.hibernate.type.descriptor.ValueExtractor 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
Hibernate's core ORM functionality
/*
* 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.ResultSet;
import java.sql.SQLException;
/**
* Contract for extracting value via JDBC from {@link ResultSet} or as output
* param from {@link CallableStatement}.
*
* @author Steve Ebersole
*/
public interface ValueExtractor {
/**
* Extract value from result set
*
* @throws SQLException Indicates a JDBC error occurred.
*/
X extract(ResultSet rs, int paramIndex, WrapperOptions options) throws SQLException;
/**
* Extract value from a callable output parameter by index
*
* @throws SQLException Indicates a JDBC error occurred.
*/
X extract(CallableStatement statement, int paramIndex, WrapperOptions options) throws SQLException;
/**
* Extract value from a callable output parameter by name
*
* @throws SQLException Indicates a JDBC error occurred.
*/
X extract(CallableStatement statement, String paramName, WrapperOptions options) throws SQLException;
}