Class JdbcByteArrayWrapperType

All Implemented Interfaces:
JdbcSqlType, SqlMetaType, SqlTaggedMetaType

public class JdbcByteArrayWrapperType extends SqlByteArrayType implements JdbcSqlType
TThe JDBC META type BYTEARRAY.
Author:
Vladimir Hudec
  • Constructor Details

    • JdbcByteArrayWrapperType

      public JdbcByteArrayWrapperType()
  • Method Details

    • getClassTypes

      public Class<?>[] getClassTypes()
      Returns the list of Java class types related to this META type.
      Specified by:
      getClassTypes in interface SqlTaggedMetaType
      Overrides:
      getClassTypes in class SqlByteArrayType
      Returns:
      the list of Java class types related to this META type
    • getProviderSqlType

      public Object getProviderSqlType()
      Returns the type provided by the stack on top of which the SQL Processor works.
      Specified by:
      getProviderSqlType in interface SqlMetaType
      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:
      getDatabaseSqlType in interface JdbcSqlType
      Returns:
      the provided type
    • getMetaTypes

      public String[] getMetaTypes()
      Returns the list of names of this META type. These names can be used in the META SQL statements.
      Specified by:
      getMetaTypes in interface SqlTaggedMetaType
      Overrides:
      getMetaTypes in class SqlByteArrayType
      Returns:
      list of names of this META type. These names can be used in the META SQL statements
    • get

      public Object get(ResultSet rs, String columnLabel) throws SQLException
      Description copied from interface: JdbcSqlType
      Retrieves the value of the designated column in the current row of this ResultSet object as a Java type value.
      Specified by:
      get in interface JdbcSqlType
      Parameters:
      rs - a ResultSet instance
      columnLabel - 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 is null
      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: JdbcSqlType
      Sets the designated parameter to the given Java value. The JDBC driver converts this to the appropriate SQL type value.
      Specified by:
      set in interface JdbcSqlType
      Parameters:
      st - a PreparedStatement instance
      index - 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 closed PreparedStatement
    • get

      public Object get(CallableStatement cs, int index) throws SQLException
      Retrieves the value of the designated parameter from CallableStatement object as a Java type value.
      Specified by:
      get in interface JdbcSqlType
      Parameters:
      cs - a CallableStatement instance
      index - 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