Package org.sqlproc.engine.jdbc.type
Interface JdbcSqlType
-
- All Known Implementing Classes:
JdbcBigDecimalType,JdbcBigIntegerType,JdbcBlobType,JdbcBooleanType,JdbcByteArrayType,JdbcByteArrayWrapperType,JdbcByteType,JdbcCharType,JdbcClobType,JdbcDateTimeType,JdbcDateType,JdbcDoubleType,JdbcEnumIntegerType,JdbcEnumStringType,JdbcFloatType,JdbcFromDateType,JdbcInstantType,JdbcIntegerType,JdbcLocalDateTimeType,JdbcLocalDateType,JdbcLocalTimeType,JdbcLongType,JdbcShortType,JdbcStringType,JdbcTextType,JdbcTimestampType,JdbcTimeType,JdbcToDateType
public interface JdbcSqlTypeThe contract which has to be implemented by all JDBC META types.- Author:
- Vladimir Hudec
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectget(CallableStatement cs, int index)Retrieves the value of the designated parameter fromCallableStatementobject as a Java type value.Objectget(ResultSet rs, String columnLabel)Retrieves the value of the designated column in the current row of thisResultSetobject as a Java type value.IntegergetDatabaseSqlType()Returns the type provided by the stack on top of which the SQL Processor works.voidset(PreparedStatement st, int index, Object value)Sets the designated parameter to the given Java value.
-
-
-
Method Detail
-
get
Object get(ResultSet rs, String columnLabel) throws SQLException
Retrieves the value of the designated column in the current row of thisResultSetobject as a Java type value.- Parameters:
rs- a ResultSet instancecolumnLabel- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column- Returns:
- the column value; if the value is SQL
NULL, the value returned isnull - Throws:
SQLException- if the columnLabel is not valid; if a database access error occurs or this method is called on a closed result set
-
set
void set(PreparedStatement st, int index, Object value) throws SQLException
Sets the designated parameter to the given Java value. The JDBC driver converts this to the appropriate SQL type value.- Parameters:
st- a PreparedStatement instanceindex- the first parameter is 1, the second is 2, ...value- the parameter value- Throws:
SQLException- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closedPreparedStatement
-
get
Object get(CallableStatement cs, int index) throws SQLException
Retrieves the value of the designated parameter fromCallableStatementobject as a Java type value.- Parameters:
cs- a CallableStatement instanceindex- the first parameter is 1, the second is 2, ...- Returns:
- the parameter value; if the value is SQL
NULL, the value depends on the Java type - Throws:
SQLException- if the parameterIndex is not valid; if a database access error occurs or this method is called on a closed CallableStatement
-
getDatabaseSqlType
Integer getDatabaseSqlType()
Returns the type provided by the stack on top of which the SQL Processor works. It has to support null input/output values.- Returns:
- the provided type
-
-