package jp.sf.amateras.mirage.type;

import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public interface ValueType {

	public boolean isSupport(Class<?> type);

	public Object get(Class<?> type, ResultSet rs, int index) throws SQLException;

	public Object get(Class<?> type, ResultSet rs, String columnName) throws SQLException;

	public Object get(Class<?> type, CallableStatement cs, int index) throws SQLException;

	public Object get(Class<?> type, CallableStatement cs, String parameterName) throws SQLException;

	public void set(Class<?> type, PreparedStatement stmt, Object value, int index) throws SQLException;

	public Class<?> getJavaType(int sqlType);

    public void registerOutParameter(Class<?> type, CallableStatement cs, int index) throws SQLException;

    public void registerOutParameter(Class<?> type, CallableStatement cs, String parameterName) throws SQLException;

}
