Package org.sqlproc.engine.jdbc.type
Class JdbcCharType
- java.lang.Object
-
- org.sqlproc.engine.type.SqlDefaultType
-
- org.sqlproc.engine.type.SqlCharType
-
- org.sqlproc.engine.jdbc.type.JdbcCharType
-
- All Implemented Interfaces:
JdbcSqlType,SqlMetaType,SqlTaggedMetaType
public class JdbcCharType extends SqlCharType implements JdbcSqlType
The JDBC META type CHARACTER.- Author:
- Vladimir Hudec
-
-
Field Summary
-
Fields inherited from class org.sqlproc.engine.type.SqlDefaultType
logger
-
-
Constructor Summary
Constructors Constructor Description JdbcCharType()
-
Method Summary
All Methods Instance Methods Concrete 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.ObjectgetProviderSqlType()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.-
Methods inherited from class org.sqlproc.engine.type.SqlCharType
getClassTypes, getMetaTypes
-
Methods inherited from class org.sqlproc.engine.type.SqlDefaultType
addScalar, getClassTypesForDefault, setParameter, setResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sqlproc.engine.type.SqlMetaType
addScalarEntryLog, error, getResult, setParameterEntryLog, setResultEntryLog
-
-
-
-
Method Detail
-
getProviderSqlType
public Object getProviderSqlType()
Returns the type provided by the stack on top of which the SQL Processor works.- Specified by:
getProviderSqlTypein interfaceSqlMetaType- Returns:
- the provided type
-
getDatabaseSqlType
public 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.- Specified by:
getDatabaseSqlTypein interfaceJdbcSqlType- Returns:
- the provided type
-
get
public Object get(ResultSet rs, String columnLabel) throws SQLException
Description copied from interface:JdbcSqlTypeRetrieves the value of the designated column in the current row of thisResultSetobject as a Java type value.- Specified by:
getin interfaceJdbcSqlType- 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
public void set(PreparedStatement st, int index, Object value) throws SQLException
Description copied from interface:JdbcSqlTypeSets the designated parameter to the given Java value. The JDBC driver converts this to the appropriate SQL type value.- Specified by:
setin interfaceJdbcSqlType- 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
public Object get(CallableStatement cs, int index) throws SQLException
Retrieves the value of the designated parameter fromCallableStatementobject as a Java type value.- Specified by:
getin interfaceJdbcSqlType- 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
-
-