/** * Returns the Java class name if this column. * * @param columnIndex (1,2,...) * @return the class name */ @Override public String getColumnClassName(int columnIndex) throws SQLException { int type = DataType.getValueTypeFromResultSet(this, columnIndex); return DataType.getTypeClassName(type); }
/** * Gets the Java class name of the object that will be returned * if ResultSet.getObject is called. * * @param column the column index (1,2,...) * @return the Java class name * @throws SQLException if the result set is closed or invalid */ @Override public String getColumnClassName(int column) throws SQLException { try { debugCodeCall("getColumnClassName", column); checkColumnIndex(column); int type = result.getColumnType(--column); return DataType.getTypeClassName(type); } catch (Exception e) { throw logAndConvert(e); } }
/** * Returns the Java class name of the parameter. * "java.lang.String" is returned if the type is not known. * * @param param the column index (1,2,...) * @return the Java class name */ @Override public String getParameterClassName(int param) throws SQLException { try { debugCodeCall("getParameterClassName", param); ParameterInterface p = getParameter(param); int type = p.getType(); if (type == Value.UNKNOWN) { type = Value.STRING; } return DataType.getTypeClassName(type); } catch (Exception e) { throw logAndConvert(e); } }